mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-06 11:24:27 +02:00
- bugfix replace modifier did not work in 3.0.7 on systems without multibyte support
- bugfix {$smarty.template} could return in 3.0.7 parent template name instead of child name when it needed to compile
This commit is contained in:
@@ -1,4 +1,9 @@
|
|||||||
===== SVN trunk =====
|
===== SVN trunk =====
|
||||||
|
01/03/2011
|
||||||
|
- bugfix replace modifier did not work in 3.0.7 on systems without multibyte support
|
||||||
|
- bugfix {$smarty.template} could return in 3.0.7 parent template name instead of
|
||||||
|
child name when it needed to compile
|
||||||
|
|
||||||
25/02/2011
|
25/02/2011
|
||||||
- bugfix for Smarty2 style compiler plugins on unnamed attribute passing like {tag $foo $bar}
|
- bugfix for Smarty2 style compiler plugins on unnamed attribute passing like {tag $foo $bar}
|
||||||
|
|
||||||
|
@@ -22,8 +22,10 @@
|
|||||||
*/
|
*/
|
||||||
function smarty_modifier_replace($string, $search, $replace)
|
function smarty_modifier_replace($string, $search, $replace)
|
||||||
{
|
{
|
||||||
require_once(SMARTY_PLUGINS_DIR . 'shared.mb_str_replace.php');
|
if (function_exists('mb_split')) {
|
||||||
return smarty_mb_str_replace($search, $replace, $string);
|
require_once(SMARTY_PLUGINS_DIR . 'shared.mb_str_replace.php');
|
||||||
|
return smarty_mb_str_replace($search, $replace, $string);
|
||||||
|
}
|
||||||
|
return str_replace($search, $replace, $string);
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
@@ -101,7 +101,7 @@ class Smarty_Internal_Compile_Include extends Smarty_Internal_CompileBase {
|
|||||||
$_caching = Smarty::CACHING_OFF;
|
$_caching = Smarty::CACHING_OFF;
|
||||||
}
|
}
|
||||||
// default for included templates
|
// default for included templates
|
||||||
if ($this->compiler->template->caching && !$this->compiler->nocache && !$this->compiler->tag_nocache) {
|
if ($compiler->template->caching && !$this->compiler->nocache && !$this->compiler->tag_nocache) {
|
||||||
$_caching = self::CACHING_NOCACHE_CODE;
|
$_caching = self::CACHING_NOCACHE_CODE;
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
|
@@ -52,7 +52,7 @@ class Smarty_Internal_TemplateCompilerBase {
|
|||||||
$this->tag_nocache = false;
|
$this->tag_nocache = false;
|
||||||
// save template object in compiler class
|
// save template object in compiler class
|
||||||
$this->template = $template;
|
$this->template = $template;
|
||||||
$this->smarty->_current_file = $this->template->getTemplateFilepath();
|
$this->smarty->_current_file = $saved_filepath = $this->template->getTemplateFilepath();
|
||||||
// template header code
|
// template header code
|
||||||
$template_header = '';
|
$template_header = '';
|
||||||
if (!$template->suppressHeader) {
|
if (!$template->suppressHeader) {
|
||||||
@@ -80,7 +80,9 @@ class Smarty_Internal_TemplateCompilerBase {
|
|||||||
}
|
}
|
||||||
// call compiler
|
// call compiler
|
||||||
$_compiled_code = $this->doCompile($_content);
|
$_compiled_code = $this->doCompile($_content);
|
||||||
} while ($this->abort_and_recompile);
|
} while ($this->abort_and_recompile);
|
||||||
|
// restore original filepath which could have been modified by template inheritance
|
||||||
|
$this->template->template_filepath = $saved_filepath;
|
||||||
// return compiled code to template object
|
// return compiled code to template object
|
||||||
if ($template->suppressFileDependency) {
|
if ($template->suppressFileDependency) {
|
||||||
$template->compiled_template = $_compiled_code;
|
$template->compiled_template = $_compiled_code;
|
||||||
|
Reference in New Issue
Block a user