mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-04 18:34:27 +02:00
fix problem with inserts and nested fetches
This commit is contained in:
2
NEWS
2
NEWS
@@ -1,3 +1,5 @@
|
|||||||
|
- fix problem with inserts and nested fetches
|
||||||
|
(Rainer Collet, Monte)
|
||||||
- added support for passing params to include_php
|
- added support for passing params to include_php
|
||||||
(Tim Riley, Monte)
|
(Tim Riley, Monte)
|
||||||
- added support for math operators in if statements (Monte)
|
- added support for math operators in if statements (Monte)
|
||||||
|
@@ -1052,6 +1052,11 @@ class Smarty
|
|||||||
$this->_inclusion_depth = 0;
|
$this->_inclusion_depth = 0;
|
||||||
|
|
||||||
if ($this->caching) {
|
if ($this->caching) {
|
||||||
|
if(!empty($this->_cache_info)) {
|
||||||
|
// nested call, init cache_info
|
||||||
|
$_cache_info = $this->_cache_info;
|
||||||
|
$this->_cache_info = array();
|
||||||
|
}
|
||||||
if ($this->_read_cache_file($_smarty_tpl_file, $_smarty_cache_id, $_smarty_compile_id, $_smarty_results)) {
|
if ($this->_read_cache_file($_smarty_tpl_file, $_smarty_cache_id, $_smarty_compile_id, $_smarty_results)) {
|
||||||
if (@count($this->_cache_info['insert_tags'])) {
|
if (@count($this->_cache_info['insert_tags'])) {
|
||||||
$this->_load_plugins($this->_cache_info['insert_tags']);
|
$this->_load_plugins($this->_cache_info['insert_tags']);
|
||||||
@@ -1085,9 +1090,12 @@ class Smarty
|
|||||||
return $_smarty_results;
|
return $_smarty_results;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$this->_cache_info = array();
|
|
||||||
$this->_cache_info['template'][] = $_smarty_tpl_file;
|
$this->_cache_info['template'][] = $_smarty_tpl_file;
|
||||||
}
|
}
|
||||||
|
if(isset($_cache_info)) {
|
||||||
|
// restore cache_info
|
||||||
|
$this->_cache_info = $_cache_info;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (count($this->autoload_filters)) {
|
if (count($this->autoload_filters)) {
|
||||||
|
@@ -1052,6 +1052,11 @@ class Smarty
|
|||||||
$this->_inclusion_depth = 0;
|
$this->_inclusion_depth = 0;
|
||||||
|
|
||||||
if ($this->caching) {
|
if ($this->caching) {
|
||||||
|
if(!empty($this->_cache_info)) {
|
||||||
|
// nested call, init cache_info
|
||||||
|
$_cache_info = $this->_cache_info;
|
||||||
|
$this->_cache_info = array();
|
||||||
|
}
|
||||||
if ($this->_read_cache_file($_smarty_tpl_file, $_smarty_cache_id, $_smarty_compile_id, $_smarty_results)) {
|
if ($this->_read_cache_file($_smarty_tpl_file, $_smarty_cache_id, $_smarty_compile_id, $_smarty_results)) {
|
||||||
if (@count($this->_cache_info['insert_tags'])) {
|
if (@count($this->_cache_info['insert_tags'])) {
|
||||||
$this->_load_plugins($this->_cache_info['insert_tags']);
|
$this->_load_plugins($this->_cache_info['insert_tags']);
|
||||||
@@ -1085,9 +1090,12 @@ class Smarty
|
|||||||
return $_smarty_results;
|
return $_smarty_results;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$this->_cache_info = array();
|
|
||||||
$this->_cache_info['template'][] = $_smarty_tpl_file;
|
$this->_cache_info['template'][] = $_smarty_tpl_file;
|
||||||
}
|
}
|
||||||
|
if(isset($_cache_info)) {
|
||||||
|
// restore cache_info
|
||||||
|
$this->_cache_info = $_cache_info;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (count($this->autoload_filters)) {
|
if (count($this->autoload_filters)) {
|
||||||
|
Reference in New Issue
Block a user