summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlessandro Cosentino <cosenal@gmail.com>2012-06-13 17:23:42 -0400
committerAlessandro Cosentino <cosenal@gmail.com>2012-06-13 17:23:42 -0400
commitefd3ac96c8e8a02730ca8d6b7e31363c1bd0d0db (patch)
tree785b37fb52c0867a24e6784f2254306c813ca16f
parentd360bbbbea8e226bda2c4c0bb553c5cb9feb2fa1 (diff)
prints name of folders in left view
-rw-r--r--lib/folder.php2
-rw-r--r--lib/foldermapper.php2
-rw-r--r--templates/part.feeds.php10
3 files changed, 6 insertions, 8 deletions
diff --git a/lib/folder.php b/lib/folder.php
index 88d3300a5..a44630b9c 100644
--- a/lib/folder.php
+++ b/lib/folder.php
@@ -50,7 +50,7 @@ class OC_News_Folder extends OC_News_Collection {
}
public function getChildren(){
- return $children;
+ return $this->children;
}
} \ No newline at end of file
diff --git a/lib/foldermapper.php b/lib/foldermapper.php
index 5aecc2e3b..d6dcea632 100644
--- a/lib/foldermapper.php
+++ b/lib/foldermapper.php
@@ -31,7 +31,7 @@ class OC_News_FolderMapper {
$result = $stmt->execute(array($this->userid, 0));
while( $row = $result->fetchRow()){
- $child = new OC_News_Folder($row['id'], $row['name']);
+ $child = new OC_News_Folder($row['name'], $row['id']);
$root->addChild($child);
}
diff --git a/templates/part.feeds.php b/templates/part.feeds.php
index 5ddd90a6c..a3edb993a 100644
--- a/templates/part.feeds.php
+++ b/templates/part.feeds.php
@@ -1,12 +1,10 @@
-<?php foreach( $_['allfeeds'] as $collection ):
- $children = $collection->getChildren();
- echo sizeof($children);
+<?php
+ echo $_['allfeeds']->getName();
+ $children = $_['allfeeds']->getChildren();
+
foreach($children as $child) {
if ($child instanceOf OC_News_Folder){
- echo 'prova';
echo $child->getName();
}
}
-echo 'prova';
?>
-<?php endforeach; ?> \ No newline at end of file