summaryrefslogtreecommitdiff
path: root/modules/organize/controllers
diff options
context:
space:
mode:
authorBharat Mediratta <bharat@menalto.com>2009-08-29 11:29:38 -0700
committerBharat Mediratta <bharat@menalto.com>2009-08-29 11:29:38 -0700
commit775987dff99b4459d6fef255d67da3bd6cdeb7c5 (patch)
tree622cc4576217b19611ddc2b186afa739fb16ae93 /modules/organize/controllers
parent4408ed0684ad8b1a2e1623ef2103fdad8ae5d895 (diff)
Fix a bug where organize doesn't properly generate the tree at the root album.
Diffstat (limited to 'modules/organize/controllers')
-rw-r--r--modules/organize/controllers/organize.php7
1 files changed, 7 insertions, 0 deletions
diff --git a/modules/organize/controllers/organize.php b/modules/organize/controllers/organize.php
index de53c4ed..2b966657 100644
--- a/modules/organize/controllers/organize.php
+++ b/modules/organize/controllers/organize.php
@@ -136,6 +136,13 @@ class Organize_Controller extends Controller {
$v = new View("organize_tree.html");
$v->parents = $album->parents();
$v->album = $album;
+
+ if ($album->id == 1) {
+ $v->peers = array($album);
+ } else {
+ $v->peers = $album->parent()->children(null, 0, array("type" => "album"));
+ }
+
return $v;
}
}