1
0
Fork 0
mirror of https://github.com/Oreolek/ifhub.club.git synced 2024-06-29 04:55:02 +03:00

fix Smarty 3 for delegate template

This commit is contained in:
Mzhelskiy Maxim 2011-04-27 17:49:25 +00:00
parent a1395fa80c
commit ed2e8febc5
2 changed files with 4 additions and 6 deletions

View file

@ -83,6 +83,9 @@ class Smarty_Internal_Template extends Smarty_Internal_Data {
*/
public function __construct($template_resource, $smarty, $_parent = null, $_cache_id = null, $_compile_id = null, $_caching = null, $_cache_lifetime = null)
{
// Hack for delegate template in LiveStreet
$template_resource=Engine::getInstance()->Plugin_GetDelegate('template',$template_resource);
// End hack -----------------------------------------------------------------------------------
$this->smarty = &$smarty;
// Smarty parameter
$this->cache_id = $_cache_id === null ? $this->smarty->cache_id : $_cache_id;

View file

@ -1,9 +1,4 @@
<?php
class lsSmarty extends Smarty {
function _smarty_include($params) {
if (isset($params['smarty_include_tpl_file'])) {
$params['smarty_include_tpl_file']=Engine::getInstance()->Plugin_GetDelegate('template',$params['smarty_include_tpl_file']);
}
parent::_smarty_include($params);
}
}