diff options
| author | Chad Kieffer <ckieffer@gmail.com> | 2009-06-23 23:56:05 -0600 |
|---|---|---|
| committer | Chad Kieffer <ckieffer@gmail.com> | 2009-06-23 23:56:05 -0600 |
| commit | c37fc39152ceeb5f4d51f9b297b313847bb445e5 (patch) | |
| tree | b27850ad7eff09217f4a9a34379ff3780cd1a19e /modules/gallery/controllers/albums.php | |
| parent | 200e17c884df8c2a265fab828be2ef869e580e35 (diff) | |
| parent | f9dbd4eb2feede5381d481f473bf7f0a77b49e4a (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.php | 7 |
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); |
