diff options
author | Bharat Mediratta <bharat@menalto.com> | 2010-07-20 06:42:20 -0700 |
---|---|---|
committer | Bharat Mediratta <bharat@menalto.com> | 2010-07-20 06:42:20 -0700 |
commit | 9e9eed11872f995f899f7d00205377c3407af308 (patch) | |
tree | 9777ce5480f9cb6eb29ea87d6385e0c184977341 /modules/gallery/helpers | |
parent | 04c89ef7b68e1ef7fbd82c799bb762798d5e438b (diff) |
Oops! Proper fix for #1201. My last fix just redirected back to the
main site, and didn't actually log you out.
Diffstat (limited to 'modules/gallery/helpers')
-rw-r--r-- | modules/gallery/helpers/gallery_event.php | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/modules/gallery/helpers/gallery_event.php b/modules/gallery/helpers/gallery_event.php index bdcfc67a..e3fa5e08 100644 --- a/modules/gallery/helpers/gallery_event.php +++ b/modules/gallery/helpers/gallery_event.php @@ -193,7 +193,9 @@ class gallery_event_Core { ->url(user_profile::url($user->id)) ->label($user->display_name())); - if (isset($theme->item)) { + if (Router::$controller == "admin") { + $continue_url = url::site(""); + } else if (isset($theme->item)) { if (access::user_can(identity::guest(), "view", $theme->item)) { $continue_url = $theme->item->abs_url(); } else { @@ -206,10 +208,7 @@ class gallery_event_Core { $menu->append(Menu::factory("link") ->id("user_menu_logout") ->css_id("g-logout-link") - ->url( - Router::$controller == "admin" ? - url::site("") : - url::site("logout?csrf=$csrf&continue_url=" . urlencode($continue_url))) + ->url(url::site("logout?csrf=$csrf&continue_url=" . urlencode($continue_url))) ->label(t("Logout"))); } } |