Browse Source

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

Signed-off-by: emanuele <[email protected]>
emanuele 11 years ago
parent
commit
0c5600c2c6
1 changed files with 7 additions and 5 deletions
  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');