summaryrefslogtreecommitdiff
path: root/modules/gallery
diff options
context:
space:
mode:
authorBharat Mediratta <bharat@menalto.com>2010-07-15 12:51:35 -0700
committerBharat Mediratta <bharat@menalto.com>2010-07-15 12:51:35 -0700
commit86a91c11cf8e2af8d100ee8a982a299d341ef032 (patch)
tree571724650d0fc744f8f022690917d81e3f8e918b /modules/gallery
parentfe2881a22aabd0ab5cb971809db6f325c3ce22d3 (diff)
Redirect users away from admin to the main site if you click logout on
the admin dashboard. Fixes ticket #1201
Diffstat (limited to 'modules/gallery')
-rw-r--r--modules/gallery/helpers/gallery_event.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/modules/gallery/helpers/gallery_event.php b/modules/gallery/helpers/gallery_event.php
index f90f8843..bdcfc67a 100644
--- a/modules/gallery/helpers/gallery_event.php
+++ b/modules/gallery/helpers/gallery_event.php
@@ -206,8 +206,10 @@ class gallery_event_Core {
$menu->append(Menu::factory("link")
->id("user_menu_logout")
->css_id("g-logout-link")
- ->url(url::site("logout?csrf=$csrf&amp;continue_url=" .
- urlencode($continue_url)))
+ ->url(
+ Router::$controller == "admin" ?
+ url::site("") :
+ url::site("logout?csrf=$csrf&amp;continue_url=" . urlencode($continue_url)))
->label(t("Logout")));
}
}