mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-06 03:14:27 +02:00
fixed code generation of non-cacheable blocks to play well with php's
"Alternative syntax" used for example in compiled {if}..{else}..{/if} blocks. (see: http://php.net/manual/en/control-structures.alternative-syntax.php on "Alternative syntax") thanks to kihara from the forum.
This commit is contained in:
2
NEWS
2
NEWS
@@ -1,3 +1,5 @@
|
||||
- fixed code generation of non-cacheable blocks to play well with php's
|
||||
"Alternative syntax for control structures" (kihara, messju)
|
||||
- fix handling of multiple identical inserts in one display()-call (messju)
|
||||
- replace {} string access with equivalent substr() to avoid E_STRICT
|
||||
warnings in PHP 5.1 (boots)
|
||||
|
@@ -2216,7 +2216,7 @@ class Smarty_Compiler extends Smarty {
|
||||
if (!isset($this->_cache_serial)) $this->_cache_serial = md5(uniqid('Smarty'));
|
||||
$_ret = 'if ($this->caching && !$this->_cache_including) { echo \'{nocache:'
|
||||
. $this->_cache_serial . '#' . $this->_nocache_count
|
||||
. '}\';}';
|
||||
. '}\'; };';
|
||||
return $_ret;
|
||||
}
|
||||
|
||||
@@ -2233,7 +2233,7 @@ class Smarty_Compiler extends Smarty {
|
||||
|| --$this->_cacheable_state>0) return '';
|
||||
return 'if ($this->caching && !$this->_cache_including) { echo \'{/nocache:'
|
||||
. $this->_cache_serial . '#' . ($this->_nocache_count++)
|
||||
. '}\';}';
|
||||
. '}\'; };';
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user