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:
messju
2005-11-29 12:22:54 +00:00
parent 12041ebeac
commit 1f838f15e7
2 changed files with 4 additions and 2 deletions

2
NEWS
View File

@@ -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)

View File

@@ -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++)
. '}\';}';
. '}\'; };';
}