diff options
Diffstat (limited to 'mod/custom_index/start.php')
| -rw-r--r-- | mod/custom_index/start.php | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/mod/custom_index/start.php b/mod/custom_index/start.php index 471a03999..48d03f27b 100644 --- a/mod/custom_index/start.php +++ b/mod/custom_index/start.php @@ -4,7 +4,7 @@ * */ -register_elgg_event_handler('init', 'system', 'custom_index_init'); +elgg_register_event_handler('init', 'system', 'custom_index_init'); function custom_index_init() { @@ -12,10 +12,15 @@ function custom_index_init() { elgg_extend_view('css/elgg', 'custom_index/css'); // Replace the default index page - register_plugin_hook('index', 'system', 'custom_index'); + elgg_register_plugin_hook_handler('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; } |
