summaryrefslogtreecommitdiff
path: root/modules/gallery/controllers
diff options
context:
space:
mode:
Diffstat (limited to 'modules/gallery/controllers')
-rw-r--r--modules/gallery/controllers/albums.php4
-rw-r--r--modules/gallery/controllers/quick.php5
2 files changed, 6 insertions, 3 deletions
diff --git a/modules/gallery/controllers/albums.php b/modules/gallery/controllers/albums.php
index efde4f09..f37609e6 100644
--- a/modules/gallery/controllers/albums.php
+++ b/modules/gallery/controllers/albums.php
@@ -23,16 +23,16 @@ class Albums_Controller extends Items_Controller {
* @see REST_Controller::_show($resource)
*/
public function _show($album) {
+ $page_size = module::get_var("gallery", "page_size", 9);
if (!access::can("view", $album)) {
if ($album->id == 1) {
- print new Theme_View("login_page.html", "album");
+ print new Theme_View("login_page.html");
return;
} else {
access::forbidden();
}
}
- $page_size = module::get_var("gallery", "page_size", 9);
$show = $this->input->get("show");
if ($show) {
diff --git a/modules/gallery/controllers/quick.php b/modules/gallery/controllers/quick.php
index 6efcb9de..d6f5213f 100644
--- a/modules/gallery/controllers/quick.php
+++ b/modules/gallery/controllers/quick.php
@@ -87,9 +87,12 @@ class Quick_Controller extends Controller {
access::required("view", $item->parent());
access::required("edit", $item->parent());
+ $msg = t("Made <b>%title</b> this album's cover", array("title" => $item->title));
+
item::make_album_cover($item);
+ message::success($msg);
- print json_encode(array("result" => "success"));
+ print json_encode(array("result" => "success", "reload" => 1));
}
public function delete($id) {