diff options
author | root <root@sleepydogs.net> | 2009-09-13 09:01:55 -0700 |
---|---|---|
committer | root <root@sleepydogs.net> | 2009-09-13 09:01:55 -0700 |
commit | c62d1f440f077ba806b7ff0c6b90ef89c79b2fd3 (patch) | |
tree | b64f05e2a7bd8db7200e3c407904e255826b4cf2 /modules/user/controllers/logout.php | |
parent | b96ac1eb81b7ccd5bd050ffab0ca9ce1feec8f4f (diff) | |
parent | caa2002d7777e0ceb884d4c628650804620ca2b6 (diff) |
Merge branch 'master' of git://github.com/gallery/gallery3
Diffstat (limited to 'modules/user/controllers/logout.php')
-rw-r--r-- | modules/user/controllers/logout.php | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/modules/user/controllers/logout.php b/modules/user/controllers/logout.php index 63971789..45d397ad 100644 --- a/modules/user/controllers/logout.php +++ b/modules/user/controllers/logout.php @@ -19,18 +19,19 @@ */ class Logout_Controller extends Controller { public function index() { - access::verify_csrf(); + //access::verify_csrf(); $user = user::active(); user::logout(); - log::info("user", t("User %name logged out", array("name" => p::clean($user->name))), - html::anchor("user/$user->id", p::clean($user->name))); - if ($this->input->get("continue")) { - $item = url::get_item_from_uri($this->input->get("continue")); + log::info("user", t("User %name logged out", array("name" => $user->name)), + html::anchor("user/$user->id", html::clean($user->name))); + if ($continue_url = $this->input->get("continue")) { + $item = url::get_item_from_uri($continue_url); if (access::can("view", $item)) { - url::redirect($this->input->get("continue")); + // Don't use url::redirect() because it'll call url::site() and munge the continue url. + header("Location: $continue_url"); } else { - url::redirect(""); + url::redirect(item::root()->abs_url()); } } } |