From c615918829fae1496a09886ef929869fce9b9f6a Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Sun, 30 Aug 2009 14:40:55 -0700 Subject: [PATCH] Manage the selection so we don't automatically select an album whenever we expand a tree. --- modules/organize/controllers/organize.php | 4 ++-- modules/organize/views/organize_tree.html.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/organize/controllers/organize.php b/modules/organize/controllers/organize.php index 24e5bf9751..22f106e99f 100644 --- a/modules/organize/controllers/organize.php +++ b/modules/organize/controllers/organize.php @@ -136,7 +136,7 @@ public function tree($album_id) { $album = ORM::factory("item", $album_id); access::required("view", $album); - print self::_expanded_tree($album, $album); + print self::_expanded_tree($album); } /** @@ -144,7 +144,7 @@ public function tree($album_id) { * include albums along the descendant hierarchy that includes the selected album, and the * immediate child albums. */ - private static function _expanded_tree($root, $selected_album) { + private static function _expanded_tree($root, $selected_album=null) { $v = new View("organize_tree.html"); $v->album = $root; $v->selected = $selected_album; diff --git a/modules/organize/views/organize_tree.html.php b/modules/organize/views/organize_tree.html.php index a99d23375a..59f683efc0 100644 --- a/modules/organize/views/organize_tree.html.php +++ b/modules/organize/views/organize_tree.html.php @@ -4,14 +4,14 @@ + id == $selected->id ? "selected" : "" ?> " ref="id ?>"> title) ?>