summaryrefslogtreecommitdiff
path: root/modules/gallery/controllers/login.php
diff options
context:
space:
mode:
authorBharat Mediratta <bharat@menalto.com>2010-06-12 15:28:03 -0700
committerBharat Mediratta <bharat@menalto.com>2010-06-12 15:28:03 -0700
commit87f8b6ff0a76f51183f14515723a8345f7c14fa6 (patch)
treea76c2faac252b835a11e467c7bb325bae2d8b6ed /modules/gallery/controllers/login.php
parentdceecabbf1b736604ceb2e08e803b12c99dc4509 (diff)
Bounce the user to the login page if they try to get to part of the
admin site as a guest. Also, theme the login/html page.
Diffstat (limited to 'modules/gallery/controllers/login.php')
-rw-r--r--modules/gallery/controllers/login.php9
1 files changed, 6 insertions, 3 deletions
diff --git a/modules/gallery/controllers/login.php b/modules/gallery/controllers/login.php
index 19335d88..2b60316b 100644
--- a/modules/gallery/controllers/login.php
+++ b/modules/gallery/controllers/login.php
@@ -38,7 +38,10 @@ class Login_Controller extends Controller {
}
public function html() {
- print auth::get_login_form("login/auth_html");
+ $view = new Theme_View("page.html", "other", "login");
+ $view->page_title = t("Login");
+ $view->content = auth::get_login_form("login/auth_html");
+ print $view;
}
public function auth_html() {
@@ -46,8 +49,8 @@ class Login_Controller extends Controller {
list ($valid, $form) = $this->_auth("login/auth_html");
if ($valid) {
- url::redirect($form->continue_url->value ? $form->continue_url_value :
- item::root()->abs_url());
+ $continue_url = $form->continue_url->value;
+ url::redirect($continue_url ? $continue_url : item::root()->abs_url());
} else {
$view = new Theme_View("page.html", "other", "login");
$view->page_title = t("Log in to Gallery");