make debug.tpl work with any delimiter

This commit is contained in:
mohrt
2002-07-09 13:34:19 +00:00
parent 1be32cd188
commit ab5236b55c
3 changed files with 21 additions and 0 deletions

1
NEWS
View File

@@ -1,3 +1,4 @@
- make debug.tpl work with any delimiter (Monte)
- change logic in assign() and append() to test var names - change logic in assign() and append() to test var names
against != '' instead of empty() (Monte) against != '' instead of empty() (Monte)
- fix PHP notice in append() function (Monte) - fix PHP notice in append() function (Monte)

View File

@@ -721,6 +721,12 @@ class Smarty
function _generate_debug_output() { function _generate_debug_output() {
// we must force compile the debug template in case the environment // we must force compile the debug template in case the environment
// changed between separate applications. // changed between separate applications.
$_orig_ldelim = $this->left_delimiter;
$_orig_rdelim = $this->right_delimiter;
$this->left_delimiter = '{';
$this->right_delimiter = '}';
ob_start(); ob_start();
$force_compile_orig = $this->force_compile; $force_compile_orig = $this->force_compile;
$this->force_compile = true; $this->force_compile = true;
@@ -732,6 +738,10 @@ function _generate_debug_output() {
$results = ob_get_contents(); $results = ob_get_contents();
$this->force_compile = $force_compile_orig; $this->force_compile = $force_compile_orig;
ob_end_clean(); ob_end_clean();
$this->left_delimiter = $_orig_ldelim;
$this->right_delimiter = $_orig_rdelim;
return $results; return $results;
} }

View File

@@ -721,6 +721,12 @@ class Smarty
function _generate_debug_output() { function _generate_debug_output() {
// we must force compile the debug template in case the environment // we must force compile the debug template in case the environment
// changed between separate applications. // changed between separate applications.
$_orig_ldelim = $this->left_delimiter;
$_orig_rdelim = $this->right_delimiter;
$this->left_delimiter = '{';
$this->right_delimiter = '}';
ob_start(); ob_start();
$force_compile_orig = $this->force_compile; $force_compile_orig = $this->force_compile;
$this->force_compile = true; $this->force_compile = true;
@@ -732,6 +738,10 @@ function _generate_debug_output() {
$results = ob_get_contents(); $results = ob_get_contents();
$this->force_compile = $force_compile_orig; $this->force_compile = $force_compile_orig;
ob_end_clean(); ob_end_clean();
$this->left_delimiter = $_orig_ldelim;
$this->right_delimiter = $_orig_rdelim;
return $results; return $results;
} }