Pārlūkot izejas kodu

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

Signed-off-by: emanuele <[email protected]>
emanuele 12 gadi atpakaļ
vecāks
revīzija
4f86ac96af
1 mainītis faili ar 9 papildinājumiem un 0 dzēšanām
  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?