Skip to content

Commit

Permalink
The root album's edit form doesn't have a name field, so don't count
Browse files Browse the repository at this point in the history
on it being there in update().  Fixes ticket #1281.
  • Loading branch information
bharat committed Aug 9, 2010
1 parent b6a5014 commit 0ff81c7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion modules/gallery/controllers/albums.php
Expand Up @@ -132,7 +132,9 @@ public function update($album_id) {
$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) {
Expand Down

0 comments on commit 0ff81c7

Please sign in to comment.