diff --git a/change_log.txt b/change_log.txt index c93617dc..37df8669 100644 --- a/change_log.txt +++ b/change_log.txt @@ -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) diff --git a/libs/sysplugins/smarty_internal_compile_include.php b/libs/sysplugins/smarty_internal_compile_include.php index d45db361..bd050c3f 100644 --- a/libs/sysplugins/smarty_internal_compile_include.php +++ b/libs/sysplugins/smarty_internal_compile_include.php @@ -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) { diff --git a/libs/sysplugins/smarty_internal_template.php b/libs/sysplugins/smarty_internal_template.php index dd2ee118..6367c0d1 100644 --- a/libs/sysplugins/smarty_internal_template.php +++ b/libs/sysplugins/smarty_internal_template.php @@ -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";