aboutsummaryrefslogtreecommitdiff
path: root/engine/lib
diff options
context:
space:
mode:
authorCash Costello <cash.costello@gmail.com>2012-06-16 13:23:52 -0400
committerCash Costello <cash.costello@gmail.com>2012-06-16 13:23:52 -0400
commit0f64abea5d18ea883bf40c1712f72423a1d1317b (patch)
tree36c4da9cdadd4de872b4193dfb7923c7232aff2a /engine/lib
parentb6daeeff44535de77f81396d6690f6eedbf57708 (diff)
downloadelgg-0f64abea5d18ea883bf40c1712f72423a1d1317b.tar.gz
elgg-0f64abea5d18ea883bf40c1712f72423a1d1317b.tar.bz2
Fixes #4485 walled garden lets a plugin take over index page
Diffstat (limited to 'engine/lib')
-rw-r--r--engine/lib/elgglib.php12
1 files changed, 11 insertions, 1 deletions
diff --git a/engine/lib/elgglib.php b/engine/lib/elgglib.php
index db1464bd8..4bbe87f57 100644
--- a/engine/lib/elgglib.php
+++ b/engine/lib/elgglib.php
@@ -2016,10 +2016,20 @@ function elgg_is_valid_options_for_batch_operation($options, $type) {
*
* @link http://docs.elgg.org/Tutorials/WalledGarden
* @elgg_plugin_hook index system
+ *
+ * @param string $hook The name of the hook
+ * @param string $type The type of hook
+ * @param bool $value Has a plugin already rendered an index page?
+ * @param array $params Array of parameters (should be empty)
* @return bool
* @access private
*/
-function elgg_walled_garden_index() {
+function elgg_walled_garden_index($hook, $type, $value, $params) {
+ if ($value) {
+ // do not create a second index page so return
+ return;
+ }
+
elgg_load_css('elgg.walled_garden');
elgg_load_js('elgg.walled_garden');