summaryrefslogtreecommitdiff
path: root/modules/gallery/controllers/logout.php
diff options
context:
space:
mode:
Diffstat (limited to 'modules/gallery/controllers/logout.php')
-rw-r--r--modules/gallery/controllers/logout.php12
1 files changed, 2 insertions, 10 deletions
diff --git a/modules/gallery/controllers/logout.php b/modules/gallery/controllers/logout.php
index fdbadf1b..9caafec8 100644
--- a/modules/gallery/controllers/logout.php
+++ b/modules/gallery/controllers/logout.php
@@ -22,16 +22,8 @@ class Logout_Controller extends Controller {
access::verify_csrf();
auth::logout();
if ($continue_url = Input::instance()->get("continue")) {
- $components = explode("/", parse_url($continue_url, PHP_URL_PATH), 4);
- $item = url::get_item_from_uri($components[3]);
- if (access::can("view", $item)) {
- // Don't use url::redirect() because it'll call url::site() and munge the continue url.
- header("Location: {$item->relative_url()}");
- } else {
- url::redirect(item::root()->abs_url());
- }
- } else {
- url::redirect(item::root()->abs_url());
+ url::redirect($continue_url);
}
+ url::redirect(item::root()->abs_url());
}
} \ No newline at end of file