diff --git a/NEWS b/NEWS
index 6e20d552..de5f1743 100644
--- a/NEWS
+++ b/NEWS
@@ -1,6 +1,6 @@
- - added regex_replace modifier, documented (Monte)
- - added debugging console feature, documented (Monte)
- - added custom function assign_debug_info, documented (Monte)
+ - added regex_replace modifier, documented. (Monte)
+ - added debugging console feature and custom function assign_debug_info,
+ documented. (Monte)
- added 'scope' attribute for {config_load}, 'global' is now deprecated but
is still supported. (Andrei)
- reduced template symbol table pollution by moving config array into the
diff --git a/Smarty.class.php b/Smarty.class.php
index f03ac825..507666a9 100644
--- a/Smarty.class.php
+++ b/Smarty.class.php
@@ -346,7 +346,7 @@ class Smarty
{
$tmp_array = array();
foreach($this->prefilter_funcs as $curr_func) {
- if($curr_func != $function_name) {
+ if ($curr_func != $function_name) {
$tmp_array[] = $curr_func;
}
}
@@ -505,7 +505,7 @@ class Smarty
($this->cache_lifetime == 0 ||
(time() - filemtime($cache_file) <= $this->cache_lifetime))) {
$results = $this->_read_file($cache_file);
- if($this->insert_tag_check) {
+ if ($this->insert_tag_check) {
$results = $this->_process_cached_inserts($results);
}
if ($display) {
@@ -541,22 +541,22 @@ class Smarty
if ($display && !$this->caching) {
echo $info_header;
$this->_process_template($tpl_file, $compile_path);
- if($this->show_info_include) {
+ if ($this->show_info_include) {
echo "\n\n";
}
include($compile_path);
- if($this->show_info_include) {
+ if ($this->show_info_include) {
echo "\n\n";
}
} else {
ob_start();
echo $info_header;
$this->_process_template($tpl_file, $compile_path);
- if($this->show_info_include) {
+ if ($this->show_info_include) {
echo "\n\n";
}
include($compile_path);
- if($this->show_info_include) {
+ if ($this->show_info_include) {
echo "\n\n";
}
$results = ob_get_contents();
@@ -576,72 +576,7 @@ class Smarty
}
}
-/*======================================================================*\
- Function: _display_debug_info
- Purpose: display debugging information
-\*======================================================================*/
- function _display_debug_info()
- {
- asort($this->_debug_tpl);
- reset($this->_debug_tpl);
- ksort($this->_tpl_vars);
- reset($this->_tpl_vars);
- echo "\n";
- }
-
-/*======================================================================*\
- Function: _print_debug_array
- Purpose: display debugging information
-\*======================================================================*/
- function _print_debug_array($array,$level)
- {
- foreach($array as $key => $val) {
- for($x=0; $x<$level; $x++) {
- echo '_smarty_console.document.write(" "); ';
- echo "\n";
- }
- $search = array('!"!','![\r\t\n]!');
- $replace = array("'",' ');
- echo '_smarty_console.document.write("{\$'.$key.'} = '.preg_replace($search,$replace,htmlspecialchars(substr($val,0,50))).'
"); ';
- echo "\n";
- if(is_array($val)) {
- $this->_print_debug_array($val,$level+1);
- }
- }
- }
-
+
/*======================================================================*\
Function: _process_template()
Purpose:
@@ -836,11 +771,14 @@ class Smarty
array_unshift($this->_config, $this->_config[0]);
$this->_process_template($_smarty_include_tpl_file, $compile_path);
- if($this->show_info_include) {
+
+ if ($this->show_info_include) {
echo "\n\n";
}
+
include($compile_path);
- if($this->show_info_include) {
+
+ if ($this->show_info_include) {
echo "\n\n";
}
diff --git a/libs/Smarty.class.php b/libs/Smarty.class.php
index f03ac825..507666a9 100644
--- a/libs/Smarty.class.php
+++ b/libs/Smarty.class.php
@@ -346,7 +346,7 @@ class Smarty
{
$tmp_array = array();
foreach($this->prefilter_funcs as $curr_func) {
- if($curr_func != $function_name) {
+ if ($curr_func != $function_name) {
$tmp_array[] = $curr_func;
}
}
@@ -505,7 +505,7 @@ class Smarty
($this->cache_lifetime == 0 ||
(time() - filemtime($cache_file) <= $this->cache_lifetime))) {
$results = $this->_read_file($cache_file);
- if($this->insert_tag_check) {
+ if ($this->insert_tag_check) {
$results = $this->_process_cached_inserts($results);
}
if ($display) {
@@ -541,22 +541,22 @@ class Smarty
if ($display && !$this->caching) {
echo $info_header;
$this->_process_template($tpl_file, $compile_path);
- if($this->show_info_include) {
+ if ($this->show_info_include) {
echo "\n\n";
}
include($compile_path);
- if($this->show_info_include) {
+ if ($this->show_info_include) {
echo "\n\n";
}
} else {
ob_start();
echo $info_header;
$this->_process_template($tpl_file, $compile_path);
- if($this->show_info_include) {
+ if ($this->show_info_include) {
echo "\n\n";
}
include($compile_path);
- if($this->show_info_include) {
+ if ($this->show_info_include) {
echo "\n\n";
}
$results = ob_get_contents();
@@ -576,72 +576,7 @@ class Smarty
}
}
-/*======================================================================*\
- Function: _display_debug_info
- Purpose: display debugging information
-\*======================================================================*/
- function _display_debug_info()
- {
- asort($this->_debug_tpl);
- reset($this->_debug_tpl);
- ksort($this->_tpl_vars);
- reset($this->_tpl_vars);
- echo "\n";
- }
-
-/*======================================================================*\
- Function: _print_debug_array
- Purpose: display debugging information
-\*======================================================================*/
- function _print_debug_array($array,$level)
- {
- foreach($array as $key => $val) {
- for($x=0; $x<$level; $x++) {
- echo '_smarty_console.document.write(" "); ';
- echo "\n";
- }
- $search = array('!"!','![\r\t\n]!');
- $replace = array("'",' ');
- echo '_smarty_console.document.write("{\$'.$key.'} = '.preg_replace($search,$replace,htmlspecialchars(substr($val,0,50))).'
"); ';
- echo "\n";
- if(is_array($val)) {
- $this->_print_debug_array($val,$level+1);
- }
- }
- }
-
+
/*======================================================================*\
Function: _process_template()
Purpose:
@@ -836,11 +771,14 @@ class Smarty
array_unshift($this->_config, $this->_config[0]);
$this->_process_template($_smarty_include_tpl_file, $compile_path);
- if($this->show_info_include) {
+
+ if ($this->show_info_include) {
echo "\n\n";
}
+
include($compile_path);
- if($this->show_info_include) {
+
+ if ($this->show_info_include) {
echo "\n\n";
}