1
0
Fork 0
mirror of https://github.com/Oreolek/ifhub.club.git synced 2024-07-02 22:45:02 +03:00

возможность в хуках шаблонов передавать параметры

This commit is contained in:
Mzhelskiy Maxim 2010-06-03 15:30:53 +00:00
parent 0fc43f914f
commit 23199c0f64

View file

@ -29,8 +29,9 @@ function smarty_function_hook($aParams,&$oSmarty) {
return; return;
} }
$sHookName='template_'.strtolower($aParams['run']); $sHookName='template_'.strtolower($aParams['run']);
$aResultHook=Engine::getInstance()->Hook_Run($sHookName); unset($aParams['run']);
$aResultHook=Engine::getInstance()->Hook_Run($sHookName,$aParams);
if (array_key_exists('template_result',$aResultHook)) { if (array_key_exists('template_result',$aResultHook)) {
return join('',$aResultHook['template_result']); return join('',$aResultHook['template_result']);
} }