]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
Fixes #2790 adds fix from 1.7 branch into trunk
authorcash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>
Tue, 22 Feb 2011 02:32:53 +0000 (02:32 +0000)
committercash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>
Tue, 22 Feb 2011 02:32:53 +0000 (02:32 +0000)
git-svn-id: http://code.elgg.org/elgg/trunk@8416 36083f99-b078-4883-b0ff-0f9b5a30f544

engine/lib/pageowner.php

index f4f96b0e6009aa30fb40ae2a693c464f55646971..d7f34539d2521458639275e4353900cbd25c9978 100644 (file)
@@ -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');