mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-04 18:34:27 +02:00
make debug.tpl work with any delimiter
This commit is contained in:
1
NEWS
1
NEWS
@@ -1,3 +1,4 @@
|
||||
- make debug.tpl work with any delimiter (Monte)
|
||||
- change logic in assign() and append() to test var names
|
||||
against != '' instead of empty() (Monte)
|
||||
- fix PHP notice in append() function (Monte)
|
||||
|
@@ -721,6 +721,12 @@ class Smarty
|
||||
function _generate_debug_output() {
|
||||
// we must force compile the debug template in case the environment
|
||||
// changed between separate applications.
|
||||
$_orig_ldelim = $this->left_delimiter;
|
||||
$_orig_rdelim = $this->right_delimiter;
|
||||
|
||||
$this->left_delimiter = '{';
|
||||
$this->right_delimiter = '}';
|
||||
|
||||
ob_start();
|
||||
$force_compile_orig = $this->force_compile;
|
||||
$this->force_compile = true;
|
||||
@@ -732,6 +738,10 @@ function _generate_debug_output() {
|
||||
$results = ob_get_contents();
|
||||
$this->force_compile = $force_compile_orig;
|
||||
ob_end_clean();
|
||||
|
||||
$this->left_delimiter = $_orig_ldelim;
|
||||
$this->right_delimiter = $_orig_rdelim;
|
||||
|
||||
return $results;
|
||||
}
|
||||
|
||||
|
@@ -721,6 +721,12 @@ class Smarty
|
||||
function _generate_debug_output() {
|
||||
// we must force compile the debug template in case the environment
|
||||
// changed between separate applications.
|
||||
$_orig_ldelim = $this->left_delimiter;
|
||||
$_orig_rdelim = $this->right_delimiter;
|
||||
|
||||
$this->left_delimiter = '{';
|
||||
$this->right_delimiter = '}';
|
||||
|
||||
ob_start();
|
||||
$force_compile_orig = $this->force_compile;
|
||||
$this->force_compile = true;
|
||||
@@ -732,6 +738,10 @@ function _generate_debug_output() {
|
||||
$results = ob_get_contents();
|
||||
$this->force_compile = $force_compile_orig;
|
||||
ob_end_clean();
|
||||
|
||||
$this->left_delimiter = $_orig_ldelim;
|
||||
$this->right_delimiter = $_orig_rdelim;
|
||||
|
||||
return $results;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user