// Fix debug in smarty
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9381 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
@@ -16,7 +16,7 @@
|
|||||||
class Smarty_Internal_Data {
|
class Smarty_Internal_Data {
|
||||||
// class used for templates
|
// class used for templates
|
||||||
public $template_class = 'Smarty_Internal_Template';
|
public $template_class = 'Smarty_Internal_Template';
|
||||||
static public $duplicateLogs = array();
|
/* static public $duplicateLogs = array();
|
||||||
static public $listLogs = null;
|
static public $listLogs = null;
|
||||||
public function __destruct()
|
public function __destruct()
|
||||||
{
|
{
|
||||||
@@ -38,7 +38,7 @@ class Smarty_Internal_Data {
|
|||||||
}
|
}
|
||||||
|
|
||||||
file_put_contents(_PS_TOOL_DIR_.'smarty.duplicate.php', '<?php return '.var_export(self::$listLogs, true).';');
|
file_put_contents(_PS_TOOL_DIR_.'smarty.duplicate.php', '<?php return '.var_export(self::$listLogs, true).';');
|
||||||
}
|
}*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* assigns a Smarty variable
|
* assigns a Smarty variable
|
||||||
@@ -54,13 +54,13 @@ class Smarty_Internal_Data {
|
|||||||
if (is_array($tpl_var)) {
|
if (is_array($tpl_var)) {
|
||||||
foreach ($tpl_var as $_key => $_val) {
|
foreach ($tpl_var as $_key => $_val) {
|
||||||
if ($_key != '') {
|
if ($_key != '') {
|
||||||
@$this->duplicateLog[$_key][$backtrace[0]['line'].$backtrace[0]['file']] = array('line' => $backtrace[0]['line'], 'file' => $backtrace[0]['file']);
|
//@$this->duplicateLog[$_key][$backtrace[0]['line'].$backtrace[0]['file']] = array('line' => $backtrace[0]['line'], 'file' => $backtrace[0]['file']);
|
||||||
$this->tpl_vars[$_key] = new Smarty_variable($_val, $nocache);
|
$this->tpl_vars[$_key] = new Smarty_variable($_val, $nocache);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if ($tpl_var != '') {
|
if ($tpl_var != '') {
|
||||||
@$this->duplicateLog[$tpl_var][$backtrace[0]['line'].$backtrace[0]['file']] = array('line' => $backtrace[0]['line'], 'file' => $backtrace[0]['file']);
|
//@$this->duplicateLog[$tpl_var][$backtrace[0]['line'].$backtrace[0]['file']] = array('line' => $backtrace[0]['line'], 'file' => $backtrace[0]['file']);
|
||||||
$this->tpl_vars[$tpl_var] = new Smarty_variable($value, $nocache);
|
$this->tpl_vars[$tpl_var] = new Smarty_variable($value, $nocache);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user