Explorar o código

Obviously the previous way was relying on way too many assumptions. That should be more robust

Signed-off-by: emanuele <[email protected]>
emanuele %!s(int64=12) %!d(string=hai) anos
pai
achega
0c5600c2c6
Modificáronse 1 ficheiros con 7 adicións e 5 borrados
  1. 7 5
      index.php

+ 7 - 5
index.php

@@ -234,11 +234,13 @@ function smf_main()
 		// Action and board are both empty... BoardIndex! Unless someone else wants to do something different.
 		if (empty($board) && empty($topic))
 		{
-			$call = '';
-			call_integration_hook('integrate_default_action', array(&$call));
-			$call = strpos($call, '::') !== false ? explode('::', $call) : $call;
-			if (!empty($call) && is_callable($call))
-				return $call;
+			$defaultActions = call_integration_hook('integrate_default_action');
+			foreach ($defaultActions as $defaultAction)
+			{
+				$call = strpos($defaultAction, '::') !== false ? explode('::', $defaultAction) : $defaultAction;
+				if (!empty($call) && is_callable($call))
+					return $call;
+			}
 
 			require_once($sourcedir . '/BoardIndex.php');