mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-07 03:44:26 +02:00
- bugfix on {debug}
This commit is contained in:
@@ -1,3 +1,8 @@
|
|||||||
|
13/11/2010
|
||||||
|
- bugfix on {debug}
|
||||||
|
|
||||||
|
===== Smarty 3.0.2 =====
|
||||||
|
|
||||||
12/11/2010
|
12/11/2010
|
||||||
- reactivated $error_reporting property handling
|
- reactivated $error_reporting property handling
|
||||||
- fixed typo in compile_continue
|
- fixed typo in compile_continue
|
||||||
|
@@ -30,7 +30,7 @@ class Smarty_Internal_Compile_Debug extends Smarty_Internal_CompileBase {
|
|||||||
$this->compiler->tag_nocache = true;
|
$this->compiler->tag_nocache = true;
|
||||||
|
|
||||||
// display debug template
|
// display debug template
|
||||||
$_output = "<?php Smarty_Internal_Plugin_Loader::loadPlugin('Smarty_Internal_Debug', \$_smarty_tpl->smarty->plugins_dir); Smarty_Internal_Debug::display_debug(\$_smarty_tpl->smarty); ?>";
|
$_output = "<?php Smarty_Internal_Plugin_Loader::loadPlugin('Smarty_Internal_Debug', \$_smarty_tpl->smarty->plugins_dir); Smarty_Internal_Debug::display_debug(\$_smarty_tpl); ?>";
|
||||||
return $_output;
|
return $_output;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -73,12 +73,21 @@ class Smarty_Internal_Debug extends Smarty_Internal_Data {
|
|||||||
/**
|
/**
|
||||||
* Opens a window for the Smarty Debugging Consol and display the data
|
* Opens a window for the Smarty Debugging Consol and display the data
|
||||||
*/
|
*/
|
||||||
public static function display_debug($smarty)
|
public static function display_debug($obj)
|
||||||
{
|
{
|
||||||
// prepare information of assigned variables
|
// prepare information of assigned variables
|
||||||
$_assigned_vars = $smarty->tpl_vars;
|
$ptr = $obj;
|
||||||
|
while (isset($ptr->parent)) {
|
||||||
|
$ptr = $ptr->parent;
|
||||||
|
}
|
||||||
|
if ($obj instanceof Smarty) {
|
||||||
|
$smarty = $obj;
|
||||||
|
} else {
|
||||||
|
$smarty = $obj->smarty;
|
||||||
|
}
|
||||||
|
$_assigned_vars = $ptr->tpl_vars;
|
||||||
ksort($_assigned_vars);
|
ksort($_assigned_vars);
|
||||||
$_config_vars = $smarty->config_vars;
|
$_config_vars = $ptr->config_vars;
|
||||||
ksort($_config_vars);
|
ksort($_config_vars);
|
||||||
$ldelim = $smarty->left_delimiter;
|
$ldelim = $smarty->left_delimiter;
|
||||||
$rdelim = $smarty->right_delimiter;
|
$rdelim = $smarty->right_delimiter;
|
||||||
|
Reference in New Issue
Block a user