Eliminate temporary variables by passing the $item into the view and

making API calls on the item.

Signed-off-by: Tim Almdal <tnalmdal@shaw.ca>
This commit is contained in:
Bharat Mediratta
2009-07-02 20:11:03 +08:00
committed by Tim Almdal
parent b1f9eb1d12
commit 1a587fd016
2 changed files with 5 additions and 7 deletions

View File

@@ -27,9 +27,7 @@ class Server_Add_Controller extends Controller {
$item = ORM::factory("item", $id);
$view = new View("server_add_tree_dialog.html");
$view->action = url::abs_site("__ARGS__/{$id}__TASK_ID__?csrf=" . access::csrf_token());
$view->parents = $item->parents();
$view->album_title = $item->title;
$view->item = $item;
$tree = new View("server_add_tree.html");
$tree->data = array();