summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Almdal <tnalmdal@shaw.ca>2009-06-10 08:17:27 +0800
committerTim Almdal <tnalmdal@shaw.ca>2009-06-10 08:39:45 +0800
commita4a38ba76003f5ca8fec0f50b4a84b930c80dd20 (patch)
tree2a7ded0d28388b8cc55bd0079912e1103c504e73
parentb11ec14f2442cd92c4001e14afaadff80bff4ffb (diff)
Created not_authorized.html.php which is a prettier login screen if the root
album is not publicly browsable. Signed-off-by: Tim Almdal <tnalmdal@shaw.ca>
-rw-r--r--modules/gallery/controllers/albums.php10
-rw-r--r--themes/default/views/page.html.php7
2 files changed, 2 insertions, 15 deletions
diff --git a/modules/gallery/controllers/albums.php b/modules/gallery/controllers/albums.php
index 0fd89f05..9b837442 100644
--- a/modules/gallery/controllers/albums.php
+++ b/modules/gallery/controllers/albums.php
@@ -26,14 +26,8 @@ class Albums_Controller extends Items_Controller {
$page_size = module::get_var("gallery", "page_size", 9);
if (!access::can("view", $album)) {
if ($album->id == 1) {
- $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");
+ $template = new Theme_View("not_authorized.html", "album");
+ $template->content = new View("login_page.html");
print $template;
return;
} else {
diff --git a/themes/default/views/page.html.php b/themes/default/views/page.html.php
index a17b643d..6c77fb72 100644
--- a/themes/default/views/page.html.php
+++ b/themes/default/views/page.html.php
@@ -52,13 +52,6 @@
<script src="<?= $theme->url("js/jquery.localscroll.js") ?>" type="text/javascript"></script>
<script src="<?= $theme->url("js/ui.init.js") ?>" type="text/javascript"></script>
<?= $theme->head() ?>
- <? if (!empty($unauthorized)): ?>
- <script type="text/javascript">
- $(document).ready(function() {
- $("#gLoginLink").click();
- });
- </script>
- <? endif ?>
</head>
<body <?= $theme->main_element_attributes() ?>>