]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
Ensuring the Walled Garden hook properly exits before plugins can continue to extend...
authornickw <nickw@36083f99-b078-4883-b0ff-0f9b5a30f544>
Tue, 18 May 2010 19:57:33 +0000 (19:57 +0000)
committernickw <nickw@36083f99-b078-4883-b0ff-0f9b5a30f544>
Tue, 18 May 2010 19:57:33 +0000 (19:57 +0000)
git-svn-id: http://code.elgg.org/elgg/trunk@6087 36083f99-b078-4883-b0ff-0f9b5a30f544

engine/lib/elgglib.php
engine/lib/sites.php

index eac75403f0b3b91258f78c1073463c3983373fa6..93fb7dc2847adadeb67bd67e344a5a3333e0618a 100644 (file)
@@ -3177,6 +3177,9 @@ function elgg_walled_garden_index() {
        $layout = elgg_view_layout('one_column', $login);
 
        echo page_draw('', $layout);
+       
+       // @hack Index must exit to keep plugins from continuing to extend
+       exit;
        return TRUE;
 }
 
index 36630548e9f7e285abb708e72419b6d6a10a2648..e6eb71afc50b85f1c26b47bcf8c8904fe01134e9 100644 (file)
@@ -248,7 +248,8 @@ class ElggSite extends ElggEntity {
                global $CONFIG;
                
                if ($CONFIG->walled_garden && !isloggedin()) {
-                       register_plugin_hook('index', 'system', 'elgg_walled_garden_index');
+                       // hook into the index system call at the highest priority
+                       register_plugin_hook('index', 'system', 'elgg_walled_garden_index', 1);
                        
                        if (!$this->is_public_page()) {
                                register_error(elgg_echo('loggedinrequired'));