summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBharat Mediratta <bharat@menalto.com>2010-08-09 15:18:25 -0700
committerBharat Mediratta <bharat@menalto.com>2010-08-09 15:18:25 -0700
commit0ff81c7ded9e61a16a2f900edfbe98d48847bf59 (patch)
tree8f4312d26bdba3830b232b9da5d3f1454345108a
parentb6a50140474b4ac20eb3bf6e1c9427674f728b54 (diff)
The root album's edit form doesn't have a name field, so don't count
on it being there in update(). Fixes ticket #1281.
-rw-r--r--modules/gallery/controllers/albums.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/modules/gallery/controllers/albums.php b/modules/gallery/controllers/albums.php
index f3f5dee3..fb7d5c59 100644
--- a/modules/gallery/controllers/albums.php
+++ b/modules/gallery/controllers/albums.php
@@ -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) {