From 0f64abea5d18ea883bf40c1712f72423a1d1317b Mon Sep 17 00:00:00 2001 From: Cash Costello Date: Sat, 16 Jun 2012 13:23:52 -0400 Subject: Fixes #4485 walled garden lets a plugin take over index page --- engine/lib/elgglib.php | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'engine/lib/elgglib.php') 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'); -- cgit v1.2.3