From 6bc33ceece52f126ef0310ddf3aee47d3752cc54 Mon Sep 17 00:00:00 2001 From: cash Date: Tue, 22 Feb 2011 02:32:53 +0000 Subject: 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 --- engine/lib/pageowner.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'engine') 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'); -- cgit v1.2.3