Explorar el Código

! Adding hookable fallback action as per #224

Signed-off-by: Peter Spicer <[email protected]>
Peter Spicer hace 10 años
padre
commit
17f8048ab8
Se han modificado 1 ficheros con 8 adiciones y 0 borrados
  1. 8 0
      index.php

+ 8 - 0
index.php

@@ -369,6 +369,14 @@ function smf_main()
 			return 'WrapAction';
 		}
 
+		$fallbackActions = call_integration_hook('integrate_fallback_action');
+		foreach ($fallbackActions as $fallbackAction)
+		{
+			$call = strpos($defaultAction, '::') !== false ? explode('::', $fallbackAction) : $fallbackAction;
+			if (!empty($call) && is_callable($call))
+				return $call;
+		}
+
 		// Fall through to the board index then...
 		require_once($sourcedir . '/BoardIndex.php');
 		return 'BoardIndex';