summaryrefslogtreecommitdiff
path: root/modules/gallery/helpers/gallery_event.php
diff options
context:
space:
mode:
Diffstat (limited to 'modules/gallery/helpers/gallery_event.php')
-rw-r--r--modules/gallery/helpers/gallery_event.php13
1 files changed, 12 insertions, 1 deletions
diff --git a/modules/gallery/helpers/gallery_event.php b/modules/gallery/helpers/gallery_event.php
index ae7131ae..1b688843 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())))
+ urlencode($continue_url)))
->label(t("Logout")));
}
}