summaryrefslogtreecommitdiff
path: root/modules/gallery/controllers/albums.php
diff options
context:
space:
mode:
authorTim Almdal <tnalmdal@shaw.ca>2009-06-23 15:17:03 -0700
committerTim Almdal <tnalmdal@shaw.ca>2009-06-23 15:17:03 -0700
commit79522bd4f31f8e4d70e754e42d5d33c4031519c9 (patch)
tree12819f685a9983fb783af457ebd9aa5cded09c62 /modules/gallery/controllers/albums.php
parent8f443cef3e304c12f9e3555332880395051e7e3d (diff)
parentda09185a4baa739dd011804eb1301cdf2d126c11 (diff)
Merge branch 'master' of git@github.com:gallery/gallery3
Diffstat (limited to 'modules/gallery/controllers/albums.php')
-rw-r--r--modules/gallery/controllers/albums.php7
1 files changed, 5 insertions, 2 deletions
diff --git a/modules/gallery/controllers/albums.php b/modules/gallery/controllers/albums.php
index 17fdec6b..22f50fb8 100644
--- a/modules/gallery/controllers/albums.php
+++ b/modules/gallery/controllers/albums.php
@@ -167,7 +167,8 @@ class Albums_Controller extends Items_Controller {
$form = album::get_edit_form($album);
if ($valid = $form->validate()) {
// Make sure that there's not a conflict
- if (Database::instance()
+ if ($album->id != 1 &&
+ Database::instance()
->from("items")
->where("parent_id", $album->parent_id)
->where("id <>", $album->id)
@@ -188,7 +189,9 @@ class Albums_Controller extends Items_Controller {
$album->description = $form->edit_album->description->value;
$album->sort_column = $form->edit_album->sort_order->column->value;
$album->sort_order = $form->edit_album->sort_order->direction->value;
- $album->rename($form->edit_album->dirname->value);
+ if ($album->id != 1) {
+ $album->rename($form->edit_album->dirname->value);
+ }
$album->save();
module::event("item_updated", $orig, $album);