diff options
author | Bernhard Posselt <nukeawhale@gmail.com> | 2012-10-13 02:21:36 +0200 |
---|---|---|
committer | Bernhard Posselt <nukeawhale@gmail.com> | 2012-10-13 02:21:47 +0200 |
commit | dfcf639f2f7b6eaf82c48dd503f7c98ce9d2155e (patch) | |
tree | 603e257c5a60ec7b126b2e8716383d83052e26a8 /lib/feedmapper.php | |
parent | 8fd373e8d5194e315f840fe654b7031979910e88 (diff) |
refactored index php into controllers
Diffstat (limited to 'lib/feedmapper.php')
-rw-r--r-- | lib/feedmapper.php | 13 |
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. |