Permalink
Browse files

fix(notifications): set page context before pagesetup is fired

Due to race condition notification pages do not get the correct "settings" context
  • Loading branch information...
hypeJunction committed Jan 26, 2016
1 parent 65b1004 commit d4c86cde521956632c73c4858c1d27ad1d0f406d
@@ -41,6 +41,10 @@ function notifications_plugin_init() {
function notifications_page_handler($page) {
elgg_gatekeeper();
+
+ // Set the context to settings
+ elgg_set_context('settings');
+
$current_user = elgg_get_logged_in_user_entity();
// default to personal notifications
@@ -22,9 +22,6 @@
elgg_set_page_owner_guid($user->guid);
-// Set the context to settings
-elgg_set_context('settings');
-
$title = elgg_echo('notifications:subscriptions:changesettings:groups');
elgg_push_breadcrumb(elgg_echo('settings'), "settings/user/$user->username");
@@ -21,9 +21,6 @@
elgg_set_page_owner_guid($user->guid);
-// Set the context to settings
-elgg_set_context('settings');
-
$title = elgg_echo('notifications:subscriptions:changesettings');
elgg_push_breadcrumb(elgg_echo('settings'), "settings/user/$user->username");

0 comments on commit d4c86cd

Please sign in to comment.