summaryrefslogtreecommitdiffstats
path: root/lib/feedmapper.php
diff options
context:
space:
mode:
authorBernhard Posselt <nukeawhale@gmail.com>2012-10-13 02:21:36 +0200
committerBernhard Posselt <nukeawhale@gmail.com>2012-10-13 02:21:47 +0200
commitdfcf639f2f7b6eaf82c48dd503f7c98ce9d2155e (patch)
tree603e257c5a60ec7b126b2e8716383d83052e26a8 /lib/feedmapper.php
parent8fd373e8d5194e315f840fe654b7031979910e88 (diff)
refactored index php into controllers
Diffstat (limited to 'lib/feedmapper.php')
-rw-r--r--lib/feedmapper.php13
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/feedmapper.php b/lib/feedmapper.php
index 16804a1a7..35847acdf 100644
--- a/lib/feedmapper.php
+++ b/lib/feedmapper.php
@@ -72,6 +72,19 @@ class FeedMapper {
return $feeds;
}
+
+ /**
+ * @brief returns the number of feeds that a user has
+ * @returns the number of feeds that a user has
+ */
+ public function feedCount() {
+ $query = 'SELECT COUNT(*) AS size FROM ' . self::tableName . ' WHERE user_id = ?';
+ $stmt = \OCP\DB::prepare($query);
+ $result = $stmt->execute(array($this->userid))->fetchRow();
+ return $result['size'];
+ }
+
+
/**
* @brief Retrieve a feed from the database
* @param id The id of the feed in the database table.