aboutsummaryrefslogtreecommitdiff
path: root/engine/lib/pageowner.php
diff options
context:
space:
mode:
authorcash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-02-22 02:32:53 +0000
committercash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-02-22 02:32:53 +0000
commit6bc33ceece52f126ef0310ddf3aee47d3752cc54 (patch)
tree93514c799e2c90f936458b01a056ae2511e4da83 /engine/lib/pageowner.php
parentfc56e67041f1e53419f9730da452a10336079401 (diff)
downloadelgg-6bc33ceece52f126ef0310ddf3aee47d3752cc54.tar.gz
elgg-6bc33ceece52f126ef0310ddf3aee47d3752cc54.tar.bz2
Fixes #2790 adds fix from 1.7 branch into trunk
git-svn-id: http://code.elgg.org/elgg/trunk@8416 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine/lib/pageowner.php')
-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');