From a03926f90e120ffb8164e92f79b323b55287fdb4 Mon Sep 17 00:00:00 2001 From: Alessandro Cosentino Date: Wed, 13 Jun 2012 14:39:07 -0400 Subject: shows feeds in the left column --- lib/folder.php | 25 +++++++++++-------------- 1 file changed, 11 insertions(+), 14 deletions(-) (limited to 'lib/folder.php') diff --git a/lib/folder.php b/lib/folder.php index 2bdc1fb78..88d3300a5 100644 --- a/lib/folder.php +++ b/lib/folder.php @@ -3,20 +3,10 @@ * ownCloud - News app * * @author Alessandro Cosentino -* @copyright 2012 Alessandro Cosentino cosenal@gmail.com +* Copyright (c) 2012 - Alessandro Cosentino * -* This library is free software; you can redistribute it and/or -* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE -* License as published by the Free Software Foundation; either -* version 3 of the License, or any later version. -* -* This library is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU AFFERO GENERAL PUBLIC LICENSE for more details. -* -* You should have received a copy of the GNU Lesser General Public -* License along with this library. If not, see . +* This file is licensed under the Affero General Public License version 3 or later. +* See the COPYING-README file * */ @@ -29,8 +19,11 @@ class OC_News_Folder extends OC_News_Collection { private $children; private $parent; - public function __construct($name, $parent = null){ + public function __construct($name, $id = null, $parent = null){ $this->name = $name; + if ($id !== null){ + parent::__construct($id); + } $this->children = array(); if ($parent !== null){ $this->parent = $parent; @@ -55,5 +48,9 @@ class OC_News_Folder extends OC_News_Collection { public function addChild(OC_News_Collection $child){ $this->children[] = $child; } + + public function getChildren(){ + return $children; + } } \ No newline at end of file -- cgit v1.2.3