mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-05 02:44:27 +02:00
- bugfix different behaviour of uniqid() on cygwin. See https://bugs.php.net/bug.php?id=34908
(forum topic 20199)
This commit is contained in:
@@ -1,4 +1,8 @@
|
||||
===== trunk =====
|
||||
09.11.2011
|
||||
- bugfix different behaviour of uniqid() on cygwin. See https://bugs.php.net/bug.php?id=34908
|
||||
(forum topic 20199)
|
||||
|
||||
01.11.2011
|
||||
- bugfix {if} and {while} tags without condition did not throw a SmartyCompilerException (Issue #57)
|
||||
- bugfix multiline strings in config files could fail on longer strings (reopened Issue #55)
|
||||
|
@@ -132,7 +132,7 @@ class Smarty_Internal_Compile_Include extends Smarty_Internal_CompileBase {
|
||||
if (!isset($compiler->smarty->merged_templates_func[$tpl_name]) || $compiler->inheritance) {
|
||||
$tpl = new $compiler->smarty->template_class ($tpl_name, $compiler->smarty, $compiler->template, $compiler->template->cache_id, $compiler->template->compile_id);
|
||||
// save unique function name
|
||||
$compiler->smarty->merged_templates_func[$tpl_name]['func'] = $tpl->properties['unifunc'] = 'content_'.uniqid();
|
||||
$compiler->smarty->merged_templates_func[$tpl_name]['func'] = $tpl->properties['unifunc'] = 'content_'.uniqid('', false);
|
||||
// use current nocache hash for inlined code
|
||||
$compiler->smarty->merged_templates_func[$tpl_name]['nocache_hash'] = $tpl->properties['nocache_hash'] = $compiler->template->properties['nocache_hash'];
|
||||
if ($compiler->template->caching) {
|
||||
|
@@ -221,7 +221,7 @@ class Smarty_Internal_Template extends Smarty_Internal_TemplateBase {
|
||||
return false;
|
||||
}
|
||||
$this->properties['cache_lifetime'] = $this->cache_lifetime;
|
||||
$this->properties['unifunc'] = 'content_' . uniqid();
|
||||
$this->properties['unifunc'] = 'content_' . uniqid('', false);
|
||||
$content = $this->createTemplateCodeFrame($content, true);
|
||||
$_smarty_tpl = $this;
|
||||
eval("?>" . $content);
|
||||
@@ -390,7 +390,7 @@ class Smarty_Internal_Template extends Smarty_Internal_TemplateBase {
|
||||
}
|
||||
$this->properties['version'] = Smarty::SMARTY_VERSION;
|
||||
if (!isset($this->properties['unifunc'])) {
|
||||
$this->properties['unifunc'] = 'content_' . uniqid();
|
||||
$this->properties['unifunc'] = 'content_' . uniqid('', false);
|
||||
}
|
||||
if (!$this->source->recompiled) {
|
||||
$output .= "\$_valid = \$_smarty_tpl->decodeProperties(" . var_export($this->properties, true) . ',' . ($cache ? 'true' : 'false') . "); /*/%%SmartyHeaderCode%%*/?>\n";
|
||||
|
Reference in New Issue
Block a user