diff options
Diffstat (limited to 'modules/gallery/controllers')
-rw-r--r-- | modules/gallery/controllers/packager.php | 5 | ||||
-rw-r--r-- | modules/gallery/controllers/quick.php | 14 |
2 files changed, 14 insertions, 5 deletions
diff --git a/modules/gallery/controllers/packager.php b/modules/gallery/controllers/packager.php index 82c3c938..1354a01b 100644 --- a/modules/gallery/controllers/packager.php +++ b/modules/gallery/controllers/packager.php @@ -134,6 +134,11 @@ class Packager_Controller extends Controller { $line = preg_replace("/ENGINE=\S+ /", "", $line); } + // Null out ids in the vars table since it's an auto_increment table and this will result in + // more stable values so we'll have less churn in install.sql. + $line = preg_replace( + "/^INSERT INTO {vars} VALUES \(\d+/", "INSERT INTO {vars} VALUES (NULL", $line); + $buf .= $line; } $fd = fopen($sql_file, "wb"); diff --git a/modules/gallery/controllers/quick.php b/modules/gallery/controllers/quick.php index f2a77033..7f1ad43b 100644 --- a/modules/gallery/controllers/quick.php +++ b/modules/gallery/controllers/quick.php @@ -131,11 +131,15 @@ class Quick_Controller extends Controller { access::required("view", $item); access::required("edit", $item); - if ($item->is_album()) { - $form = album::get_edit_form($item); - } else { - $form = photo::get_edit_form($item); + switch ($item->type) { + case "album": + return print album::get_edit_form($item); + + case "photo": + return print photo::get_edit_form($item); + + case "movie": + return print movie::get_edit_form($item); } - print $form; } } |