aboutsummaryrefslogtreecommitdiff
path: root/engine
diff options
context:
space:
mode:
Diffstat (limited to 'engine')
-rw-r--r--engine/lib/pageowner.php7
1 files changed, 4 insertions, 3 deletions
diff --git a/engine/lib/pageowner.php b/engine/lib/pageowner.php
index f4f96b0e6..d7f34539d 100644
--- a/engine/lib/pageowner.php
+++ b/engine/lib/pageowner.php
@@ -261,9 +261,10 @@ function page_owner_boot() {
global $CONFIG;
elgg_register_plugin_hook_handler('page_owner', 'system', 'default_page_owner_handler');
-
- // initial context - will be replaced by page handler
- $CONFIG->context = array('main');
+
+ if (preg_match("/\/pg\/([\w\-\_]+)/", $_SERVER['REQUEST_URI'], $matches)) {
+ $CONFIG->context = $matches[1];
+ }
}
elgg_register_event_handler('boot', 'system', 'page_owner_boot');