]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
custom index plugin checks return value on hook now
authorcash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>
Sun, 6 Mar 2011 23:37:21 +0000 (23:37 +0000)
committercash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>
Sun, 6 Mar 2011 23:37:21 +0000 (23:37 +0000)
git-svn-id: http://code.elgg.org/elgg/trunk@8615 36083f99-b078-4883-b0ff-0f9b5a30f544

mod/custom_index/start.php

index 471a03999e17a418a4db0b6e24da486d1440271f..8577987985d8dd0ac795ba115121c5725fe9619a 100644 (file)
@@ -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;
        }