Skip to content

Commit

Permalink
Oops! Proper fix for #1201. My last fix just redirected back to the
Browse files Browse the repository at this point in the history
main site, and didn't actually log you out.
  • Loading branch information
bharat committed Jul 20, 2010
1 parent 04c89ef commit 9e9eed1
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions modules/gallery/helpers/gallery_event.php
Expand Up @@ -193,7 +193,9 @@ static function user_menu($menu, $theme) {
->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 {
Expand All @@ -206,10 +208,7 @@ static function user_menu($menu, $theme) {
$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")));
}
}
Expand Down

0 comments on commit 9e9eed1

Please sign in to comment.