From f22a2d9caf90e6cf98a340bf5c8e9bc939c684af Mon Sep 17 00:00:00 2001 From: cash Date: Sun, 6 Mar 2011 23:37:21 +0000 Subject: custom index plugin checks return value on hook now git-svn-id: http://code.elgg.org/elgg/trunk@8615 36083f99-b078-4883-b0ff-0f9b5a30f544 --- mod/custom_index/start.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'mod/custom_index') diff --git a/mod/custom_index/start.php b/mod/custom_index/start.php index 471a03999..857798798 100644 --- a/mod/custom_index/start.php +++ b/mod/custom_index/start.php @@ -15,7 +15,12 @@ function custom_index_init() { register_plugin_hook('index', 'system', 'custom_index'); } -function custom_index() { +function custom_index($hook, $type, $return, $params) { + if ($return == true) { + // another hook has already replaced the front page + return $return; + } + if (!include_once(dirname(__FILE__) . "/index.php")) { return false; } -- cgit v1.2.3