Ver Fonte

Also non-OOP developers want to include files! :P

Signed-off-by: emanuele <[email protected]>
emanuele há 12 anos atrás
pai
commit
4f86ac96af
1 ficheiros alterados com 9 adições e 0 exclusões
  1. 9 0
      Sources/Subs.php

+ 9 - 0
Sources/Subs.php

@@ -4074,6 +4074,15 @@ function call_integration_hook($hook, $parameters = array())
 		else
 		{
 			$call = $function;
+			if (strpos($function, ':') !== false)
+			{
+				list($func, $file) = explode(':', $function);
+				if (!empty($settings['theme_dir']))
+					include_once(strtr(trim($file), array('$boarddir' => $boarddir, '$sourcedir' => $sourcedir)));
+				else
+					include_once(strtr(trim($file), array('$boarddir' => $boarddir, '$sourcedir' => $sourcedir, '$themedir' => $settings['theme_dir'])));
+				$call = $function;
+			}
 		}
 
 		// Is it valid?