summaryrefslogtreecommitdiffstats
path: root/lib/foldermapper.php
diff options
context:
space:
mode:
authorAlessandro Cosentino <cosenal@gmail.com>2012-06-07 16:19:25 -0400
committerAlessandro Cosentino <cosenal@gmail.com>2012-06-07 16:19:25 -0400
commite583df60d3c77d4e7f64a889b8951907c594b922 (patch)
tree13d48731ecd73a612db1c4e92c59f0d5e0a35c10 /lib/foldermapper.php
parentb1fc686d2079d63fe5e6cf10124981e69aa73194 (diff)
creates a superclass collection for feeds and folders
Diffstat (limited to 'lib/foldermapper.php')
-rw-r--r--lib/foldermapper.php13
1 files changed, 6 insertions, 7 deletions
diff --git a/lib/foldermapper.php b/lib/foldermapper.php
index e9de89341..f4ff6239b 100644
--- a/lib/foldermapper.php
+++ b/lib/foldermapper.php
@@ -27,19 +27,18 @@ class OC_News_FolderMapper {
const tableName = '*PREFIX*news_folders';
+ public function root(){
+ $root = new OC_News_Folder('All feeds');
+
+ return $root;
+ }
+
/**
* @brief Retrieve a feed from the database
* @param id The id of the feed in the database table.
* @returns
*/
public function find($id){
- $stmt = OCP\DB::prepare('SELECT * FROM ' . self::tableName . ' WHERE id = ?');
- $result = $stmt->execute(array($id));
- $row = $result->fetchRow();
- $url = $row['url'];
- $title = $row['title'];
- $feed = new OC_News_Feed($url, $title, null, $id);
- return $feed;
}
/**