diff --git a/libs/Smarty.class.php b/libs/Smarty.class.php index 58687918..a0f556aa 100644 --- a/libs/Smarty.class.php +++ b/libs/Smarty.class.php @@ -121,7 +121,7 @@ class Smarty extends Smarty_Internal_TemplateBase /** * smarty version */ - const SMARTY_VERSION = '3.1.30-dev/71'; + const SMARTY_VERSION = '3.1.30-dev/72'; /** * define variable scopes diff --git a/libs/sysplugins/smarty_internal_method_compileallconfig.php b/libs/sysplugins/smarty_internal_method_compileallconfig.php index c924edca..b8e8f47e 100644 --- a/libs/sysplugins/smarty_internal_method_compileallconfig.php +++ b/libs/sysplugins/smarty_internal_method_compileallconfig.php @@ -17,16 +17,17 @@ class Smarty_Internal_Method_CompileAllConfig extends Smarty_Internal_Method_Com * * @api Smarty::compileAllConfig() * - * @param \Smarty $smarty + * @param \Smarty $dummy smarty object of calling instance + * @param \Smarty $smarty passed smarty object * @param string $extension file extension * @param bool $force_compile force all to recompile * @param int $time_limit * @param int $max_errors * - * @return integer number of template files recompiled + * @return int number of template files recompiled */ - public function compileAllConfig(Smarty $smarty, $extension = '.conf', $force_compile = false, $time_limit = 0, - $max_errors = null) + public function compileAllConfig(Smarty $dummy, Smarty $smarty, $extension = '.conf', $force_compile = false, + $time_limit = 0, $max_errors = null) { return $this->compileAll($smarty, $extension, $force_compile, $time_limit, $max_errors, true); } diff --git a/libs/sysplugins/smarty_internal_method_compilealltemplates.php b/libs/sysplugins/smarty_internal_method_compilealltemplates.php index 96343112..cb60578d 100644 --- a/libs/sysplugins/smarty_internal_method_compilealltemplates.php +++ b/libs/sysplugins/smarty_internal_method_compilealltemplates.php @@ -23,7 +23,8 @@ class Smarty_Internal_Method_CompileAllTemplates * * @api Smarty::compileAllTemplates() * - * @param \Smarty $smarty + * @param \Smarty $dummy smarty object of calling instance + * @param \Smarty $smarty passed smarty object * @param string $extension file extension * @param bool $force_compile force all to recompile * @param int $time_limit @@ -31,7 +32,7 @@ class Smarty_Internal_Method_CompileAllTemplates * * @return integer number of template files recompiled */ - public function compileAllTemplates(Smarty $smarty, $extension = '.tpl', $force_compile = false, $time_limit = 0, + public function compileAllTemplates(Smarty $dummy, Smarty $smarty, $extension = '.tpl', $force_compile = false, $time_limit = 0, $max_errors = null) { return $this->compileAll($smarty, $extension, $force_compile, $time_limit, $max_errors); @@ -61,7 +62,7 @@ class Smarty_Internal_Method_CompileAllTemplates $sourceDir = $isConfig ? $smarty->getConfigDir() : $smarty->getTemplateDir(); // loop over array of source directories foreach ($sourceDir as $_dir) { - $_dir_1 = new RecursiveDirectoryIterator($_dir); + $_dir_1 = new RecursiveDirectoryIterator($_dir, defined('FilesystemIterator::FOLLOW_SYMLINKS') ? FilesystemIterator::FOLLOW_SYMLINKS : 0); $_dir_2 = new RecursiveIteratorIterator($_dir_1); foreach ($_dir_2 as $_fileinfo) { $_file = $_fileinfo->getFilename(); @@ -78,6 +79,10 @@ class Smarty_Internal_Method_CompileAllTemplates flush(); $_start_time = microtime(true); $_smarty = clone $smarty; + // + $_smarty->_cache = array(); + $_smarty->ext = new Smarty_Internal_Extension_Handler(); + $_smarty->ext->objType = $_smarty->_objType; $_smarty->force_compile = $force_compile; try { /* @var Smarty_Internal_Template $_tpl */