summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorTim Almdal <tnalmdal@shaw.ca>2009-06-09 22:18:41 +0800
committerTim Almdal <tnalmdal@shaw.ca>2009-06-09 22:22:57 +0800
commit3c3a65b5a76c2cb53fe143f2b89d767b36dcafa2 (patch)
tree28261763712ee8cff3a3d6d256b76920e48934a3 /modules
parent8189c1fc6b655907990c7f005936a4758ab7e315 (diff)
Rather than just displaying the "unformatted" login screen when the root album
is not viewable by a guest, display the root album as if it was empty. When the page finishes loading force the login dialog to be displayed. Signed-off-by: Tim Almdal <tnalmdal@shaw.ca>
Diffstat (limited to 'modules')
-rw-r--r--modules/gallery/controllers/albums.php12
1 files changed, 10 insertions, 2 deletions
diff --git a/modules/gallery/controllers/albums.php b/modules/gallery/controllers/albums.php
index efde4f09..0fd89f05 100644
--- a/modules/gallery/controllers/albums.php
+++ b/modules/gallery/controllers/albums.php
@@ -23,16 +23,24 @@ 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");
+ $template = new Theme_View("page.html", "album");
+ $template->set_global("page_size", $page_size);
+ $template->set_global("item", $album);
+ $template->set_global("children", array());
+ $template->set_global("children_count", 0);
+ $template->set_global("parents", $album->parents());
+ $template->unauthorized = true;
+ $template->content = new View("album.html");
+ print $template;
return;
} else {
access::forbidden();
}
}
- $page_size = module::get_var("gallery", "page_size", 9);
$show = $this->input->get("show");
if ($show) {