Fix a bug where organize doesn't properly generate the tree at the root album.

This commit is contained in:
Bharat Mediratta
2009-08-29 11:29:38 -07:00
parent 4408ed0684
commit 775987dff9
2 changed files with 8 additions and 3 deletions

View File

@@ -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;
}
}