diff options
author | Alessandro Cosentino <cosenal@gmail.com> | 2012-05-28 23:40:18 -0400 |
---|---|---|
committer | Alessandro Cosentino <cosenal@gmail.com> | 2012-05-28 23:40:18 -0400 |
commit | 07fdf6ad3c3cc659a06099cd2011aab1ce2c8c5e (patch) | |
tree | ccc41c9c30206e5406415fc9b7dfe1fa24ea7401 /lib/folder.php | |
parent | 762b4d89bc0876d8d514a21bf22babcb012cf298 (diff) |
find a feed in the database by url;Detect when databse contains already a feed
Diffstat (limited to 'lib/folder.php')
-rw-r--r-- | lib/folder.php | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/folder.php b/lib/folder.php index a7036e8a7..f97960c7b 100644 --- a/lib/folder.php +++ b/lib/folder.php @@ -35,6 +35,7 @@ class OC_News_Folder { $this->name = $name; $this->parent = $parent; $this->feeds = array(); + $this->id = 0; } public function getName(){ @@ -50,7 +51,14 @@ class OC_News_Folder { } public function setId($id){ - $this->$id = $id; + $this->id = $id; + } + + public function getParentId(){ + if ($this->parent == null){ + return 0; + } + return $this->parent->getId(); } public function addFeed(OC_News_Feed $feed){ |