diff options
| author | Chad Kieffer <ckieffer@227.1.241.10.in-addr.arpa> | 2010-06-14 14:43:14 -0400 |
|---|---|---|
| committer | Chad Kieffer <ckieffer@227.1.241.10.in-addr.arpa> | 2010-06-14 14:43:14 -0400 |
| commit | 3c6e710aa75b309fd7ff50aa8f5c58721b17770f (patch) | |
| tree | 062b516f3fad5921e4ace326fa6b2f7f868ca87e /modules/gallery/helpers/gallery_event.php | |
| parent | 782c1e0ae0bc597629abcd88f844d863da45901a (diff) | |
| parent | 793780daa7665f7f86994235c4263fcb63554eb8 (diff) | |
Merge branch 'master' of github.com:gallery/gallery3
Diffstat (limited to 'modules/gallery/helpers/gallery_event.php')
| -rw-r--r-- | modules/gallery/helpers/gallery_event.php | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/modules/gallery/helpers/gallery_event.php b/modules/gallery/helpers/gallery_event.php index ae7131ae..55db47ce 100644 --- a/modules/gallery/helpers/gallery_event.php +++ b/modules/gallery/helpers/gallery_event.php @@ -157,11 +157,22 @@ class gallery_event_Core { ->view("login_current_user.html") ->url(user_profile::url($user->id)) ->label($user->display_name())); + + if (isset($theme->item)) { + if (access::user_can(identity::guest(), "view", $theme->item)) { + $continue_url = $theme->item->abs_url(); + } else { + $continue_url = item::root()->abs_url(); + } + } else { + $continue_url = url::abs_current(); + } + $menu->append(Menu::factory("link") ->id("user_menu_logout") ->css_id("g-logout-link") - ->url(url::site("logout?csrf=$csrf&continue=" . - urlencode(url::abs_current()))) + ->url(url::site("logout?csrf=$csrf&continue_url=" . + urlencode($continue_url))) ->label(t("Logout"))); } } |
