Skip to content

Commit

Permalink
If the argument to app() is not an album id, switch to the item parent.
Browse files Browse the repository at this point in the history
Fixes ticket #489.
  • Loading branch information
bharat committed Jun 30, 2009
1 parent f5f74e3 commit df84861
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions modules/gallery/controllers/simple_uploader.php
Expand Up @@ -22,6 +22,9 @@ public function app($id) {
$item = ORM::factory("item", $id);
access::required("view", $item);
access::required("add", $item);
if (!$item->is_album()) {
$item = $item->parent();
}

$v = new View("simple_uploader.html");
$v->item = $item;
Expand Down

0 comments on commit df84861

Please sign in to comment.