From 775987dff99b4459d6fef255d67da3bd6cdeb7c5 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Sat, 29 Aug 2009 11:29:38 -0700 Subject: Fix a bug where organize doesn't properly generate the tree at the root album. --- modules/organize/controllers/organize.php | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'modules/organize/controllers') 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; } } -- cgit v1.2.3