mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-05 10:54:27 +02:00
- improvement removed unnecessary sha1()
(and added previously forgotten templates for ClearCompileTests)
This commit is contained in:
@@ -3,6 +3,7 @@
|
|||||||
- @silenced unlink() in Smarty_Internal_Write_File since debuggers go haywire without it.
|
- @silenced unlink() in Smarty_Internal_Write_File since debuggers go haywire without it.
|
||||||
- bugfix Smarty::clearCompiledTemplate() threw an Exception if $cache_id was not present in $compile_dir when $use_sub_dirs = true.
|
- bugfix Smarty::clearCompiledTemplate() threw an Exception if $cache_id was not present in $compile_dir when $use_sub_dirs = true.
|
||||||
- bugfix {html_select_date} and {html_select_time} did not properly handle empty time arguments (Forum Topic 20190)
|
- bugfix {html_select_date} and {html_select_time} did not properly handle empty time arguments (Forum Topic 20190)
|
||||||
|
- improvement removed unnecessary sha1()
|
||||||
|
|
||||||
19.10.2011
|
19.10.2011
|
||||||
- revert PHP4 constructor message
|
- revert PHP4 constructor message
|
||||||
|
@@ -1173,7 +1173,7 @@ class Smarty extends Smarty_Internal_TemplateBase {
|
|||||||
$compile_id = $compile_id === null ? $this->compile_id : $compile_id;
|
$compile_id = $compile_id === null ? $this->compile_id : $compile_id;
|
||||||
// already in template cache?
|
// already in template cache?
|
||||||
$unique_template_name = Smarty_Resource::getUniqueTemplateName($this, $template);
|
$unique_template_name = Smarty_Resource::getUniqueTemplateName($this, $template);
|
||||||
$_templateId = sha1($unique_template_name . $cache_id . $compile_id);
|
$_templateId = $unique_template_name . $cache_id . $compile_id;
|
||||||
if ($do_clone) {
|
if ($do_clone) {
|
||||||
if (isset($this->template_objects[$_templateId])) {
|
if (isset($this->template_objects[$_templateId])) {
|
||||||
// return cached template object
|
// return cached template object
|
||||||
|
@@ -178,7 +178,7 @@ abstract class Smarty_CacheResource_KeyValueStore extends Smarty_CacheResource {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// remove from template cache
|
// remove from template cache
|
||||||
$_templateId = sha1($tpl->source->unique_resource . $tpl->cache_id . $tpl->compile_id);
|
$_templateId = $tpl->source->unique_resource . $tpl->cache_id . $tpl->compile_id;
|
||||||
unset($smarty->template_objects[$_templateId]);
|
unset($smarty->template_objects[$_templateId]);
|
||||||
}
|
}
|
||||||
return $uid;
|
return $uid;
|
||||||
|
@@ -154,7 +154,7 @@ class Smarty_Internal_CacheResource_File extends Smarty_CacheResource {
|
|||||||
|
|
||||||
// remove from template cache
|
// remove from template cache
|
||||||
$tpl->source; // have the template registered before unset()
|
$tpl->source; // have the template registered before unset()
|
||||||
$_templateId = sha1($tpl->source->unique_resource . $tpl->cache_id . $tpl->compile_id);
|
$_templateId = $tpl->source->unique_resource . $tpl->cache_id . $tpl->compile_id;
|
||||||
unset($smarty->template_objects[$_templateId]);
|
unset($smarty->template_objects[$_templateId]);
|
||||||
|
|
||||||
if ($tpl->source->exists) {
|
if ($tpl->source->exists) {
|
||||||
|
@@ -246,7 +246,7 @@ class Smarty_Internal_Template extends Smarty_Internal_TemplateBase {
|
|||||||
{
|
{
|
||||||
// already in template cache?
|
// already in template cache?
|
||||||
$unique_template_name = Smarty_Resource::getUniqueTemplateName($this->smarty, $template);
|
$unique_template_name = Smarty_Resource::getUniqueTemplateName($this->smarty, $template);
|
||||||
$_templateId = sha1($unique_template_name . $cache_id . $compile_id);
|
$_templateId = $unique_template_name . $cache_id . $compile_id;
|
||||||
if (isset($this->smarty->template_objects[$_templateId])) {
|
if (isset($this->smarty->template_objects[$_templateId])) {
|
||||||
// clone cached template object because of possible recursive call
|
// clone cached template object because of possible recursive call
|
||||||
$tpl = clone $this->smarty->template_objects[$_templateId];
|
$tpl = clone $this->smarty->template_objects[$_templateId];
|
||||||
@@ -620,7 +620,7 @@ class Smarty_Internal_Template extends Smarty_Internal_TemplateBase {
|
|||||||
// cache template object under a unique ID
|
// cache template object under a unique ID
|
||||||
// do not cache eval resources
|
// do not cache eval resources
|
||||||
if ($this->source->type != 'eval') {
|
if ($this->source->type != 'eval') {
|
||||||
$_templateId = sha1($this->source->unique_resource . $this->cache_id . $this->compile_id);
|
$_templateId = $this->source->unique_resource . $this->cache_id . $this->compile_id;
|
||||||
$this->smarty->template_objects[$_templateId] = $this;
|
$this->smarty->template_objects[$_templateId] = $this;
|
||||||
}
|
}
|
||||||
return $this->source;
|
return $this->source;
|
||||||
|
@@ -192,7 +192,7 @@ class Smarty_Internal_Utility {
|
|||||||
|
|
||||||
// remove from template cache
|
// remove from template cache
|
||||||
$tpl->source; // have the template registered before unset()
|
$tpl->source; // have the template registered before unset()
|
||||||
$_templateId = sha1($tpl->source->unique_resource . $tpl->cache_id . $tpl->compile_id);
|
$_templateId = $tpl->source->unique_resource . $tpl->cache_id . $tpl->compile_id;
|
||||||
unset($smarty->template_objects[$_templateId]);
|
unset($smarty->template_objects[$_templateId]);
|
||||||
|
|
||||||
if ($tpl->source->exists) {
|
if ($tpl->source->exists) {
|
||||||
|
Reference in New Issue
Block a user