diff options
author | Alessandro Cosentino <cosenal@gmail.com> | 2012-07-02 23:39:19 -0400 |
---|---|---|
committer | Alessandro Cosentino <cosenal@gmail.com> | 2012-07-02 23:39:19 -0400 |
commit | 72c730bf5fb21f58589a836483585dabd6866520 (patch) | |
tree | a57dab8dcf88ce5a4f1172ba89663aa52947fdb8 /lib/feedmapper.php | |
parent | f8f6fd3d778fe95bac15e52747ff5b1f6461c136 (diff) |
button to add feed; selection of a feed
Diffstat (limited to 'lib/feedmapper.php')
-rw-r--r-- | lib/feedmapper.php | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/lib/feedmapper.php b/lib/feedmapper.php index e64316d0c..1073bd288 100644 --- a/lib/feedmapper.php +++ b/lib/feedmapper.php @@ -16,7 +16,7 @@ class OC_News_FeedMapper { const tableName = '*PREFIX*news_feeds'; - + /** * @brief Retrieve a feed from the database * @param id The id of the feed in the database table. @@ -33,6 +33,26 @@ class OC_News_FeedMapper { } /** + * @brief Retrieve a feed from the database + * @param id The id of the feed in the database table. + * @returns + */ + public function findByFolderId($folderid){ + $stmt = OCP\DB::prepare('SELECT * FROM ' . self::tableName . ' WHERE folder_id = ?'); + $result = $stmt->execute(array($folderid)); + $feeds = array(); + while ($row = $result->fetchRow()) { + $url = $row['url']; + $title = $row['title']; + $id = $row['id']; + $feed = new OC_News_Feed($url, $title, null, $id); + $feeds[] = $feed; + } + return $feeds; + } + + + /** * @brief Retrieve a feed and all its items from the database * @param id The id of the feed in the database table. * @returns |