diff options
| author | mamouneyya <mamoun.diraneyya@gmail.com> | 2010-08-31 18:04:21 +0300 |
|---|---|---|
| committer | mamouneyya <mamoun.diraneyya@gmail.com> | 2010-08-31 18:04:21 +0300 |
| commit | 0b6664e8f9d19df025739bc4a0cf1821563d6b3d (patch) | |
| tree | 5b1de2331d4a9d0eb8d97bbb74be6d794d6260a1 /modules/gallery/controllers/albums.php | |
| parent | 0a128bab0a788288c5291491a68bd1c9ab432825 (diff) | |
| parent | 23d59dec7240dfa4bffe9d88f46a848e76ce0134 (diff) | |
Merge remote branch 'gallery3/master'
Diffstat (limited to 'modules/gallery/controllers/albums.php')
| -rw-r--r-- | modules/gallery/controllers/albums.php | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/modules/gallery/controllers/albums.php b/modules/gallery/controllers/albums.php index f3f5dee3..b0887195 100644 --- a/modules/gallery/controllers/albums.php +++ b/modules/gallery/controllers/albums.php @@ -68,7 +68,7 @@ class Albums_Controller extends Items_Controller { $template->set_global("item", $album); $template->set_global("children", $album->viewable()->children($page_size, $offset)); $template->set_global("children_count", $children_count); - $template->set_global("parents", $album->parents()); + $template->set_global("parents", $album->parents()->as_array()); // view calls empty() on this $template->content = new View("album.html"); // We can't use math in ORM or the query builder, so do this by hand. It's important @@ -132,7 +132,9 @@ class Albums_Controller extends Items_Controller { $album->description = $form->edit_item->description->value; $album->sort_column = $form->edit_item->sort_order->column->value; $album->sort_order = $form->edit_item->sort_order->direction->value; - $album->name = $form->edit_item->inputs["name"]->value; + if (array_key_exists("name", $form->edit_item->inputs)) { + $album->name = $form->edit_item->inputs["name"]->value; + } $album->slug = $form->edit_item->slug->value; $album->validate(); } catch (ORM_Validation_Exception $e) { |
