diff options
| author | Tim Almdal <tnalmdal@shaw.ca> | 2010-02-10 08:53:39 -0800 |
|---|---|---|
| committer | Tim Almdal <tnalmdal@shaw.ca> | 2010-02-10 08:53:39 -0800 |
| commit | 8ef08d20883d9b9aa0b7560ce3bf6da8a6632149 (patch) | |
| tree | d00e6302c95cfa0c7e0fec80805c4a2e1a33e768 /modules/gallery/controllers/albums.php | |
| parent | 17f0a1b10f3df250129188316c14b01f0e3b45f0 (diff) | |
Refactor the code to display the login page if the user does not have view
permission into the common auth::require_login() method.
Diffstat (limited to 'modules/gallery/controllers/albums.php')
| -rw-r--r-- | modules/gallery/controllers/albums.php | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/modules/gallery/controllers/albums.php b/modules/gallery/controllers/albums.php index 1d369b95..e1985cfb 100644 --- a/modules/gallery/controllers/albums.php +++ b/modules/gallery/controllers/albums.php @@ -30,13 +30,7 @@ class Albums_Controller extends Items_Controller { } if (!access::can("view", $album)) { - $view = new Theme_View("page.html", "other", "login"); - $view->page_title = t("Log in to Gallery"); - $view->content = new View("login_ajax.html"); - $view->content->form = auth::get_login_form("login/auth_html"); - // Avoid anti-phishing protection by passing the url as session variable. - Session::instance()->set("continue_url", url::current(true)); - print $view; + print auth::require_login(); return; } |
