From: nickw Date: Tue, 18 May 2010 19:57:33 +0000 (+0000) Subject: Ensuring the Walled Garden hook properly exits before plugins can continue to extend... X-Git-Url: https://gitweb.fluxo.info/?a=commitdiff_plain;h=9edaa3c385610ebb45a9e8282a002e666d7d8c91;p=lorea%2Felgg.git Ensuring the Walled Garden hook properly exits before plugins can continue to extend view. git-svn-id: http://code.elgg.org/elgg/trunk@6087 36083f99-b078-4883-b0ff-0f9b5a30f544 --- diff --git a/engine/lib/elgglib.php b/engine/lib/elgglib.php index eac75403f..93fb7dc28 100644 --- a/engine/lib/elgglib.php +++ b/engine/lib/elgglib.php @@ -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; } diff --git a/engine/lib/sites.php b/engine/lib/sites.php index 36630548e..e6eb71afc 100644 --- a/engine/lib/sites.php +++ b/engine/lib/sites.php @@ -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'));