From: cash Date: Sun, 6 Mar 2011 23:37:21 +0000 (+0000) Subject: custom index plugin checks return value on hook now X-Git-Url: https://gitweb.fluxo.info/?a=commitdiff_plain;h=f22a2d9caf90e6cf98a340bf5c8e9bc939c684af;p=lorea%2Felgg.git custom index plugin checks return value on hook now git-svn-id: http://code.elgg.org/elgg/trunk@8615 36083f99-b078-4883-b0ff-0f9b5a30f544 --- 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; }