diff --git a/admin-dev/themes/default/template/controllers/performance/helpers/form/form.tpl b/admin-dev/themes/default/template/controllers/performance/helpers/form/form.tpl
index 6a80019fd..b62fc272c 100644
--- a/admin-dev/themes/default/template/controllers/performance/helpers/form/form.tpl
+++ b/admin-dev/themes/default/template/controllers/performance/helpers/form/form.tpl
@@ -186,7 +186,7 @@
return false;
});
- $('input[name="smarty_force_compile"], input[name="smarty_cache"], input[name="smarty_console"]').change(function(){
+ $('input[name="smarty_force_compile"], input[name="smarty_cache"], input[name="smarty_console"], input[name="smarty_console_key"]').change(function(){
$('#smarty_up').val(1);
});
diff --git a/config/smarty.config.inc.php b/config/smarty.config.inc.php
index ad9a72df4..392b42a58 100644
--- a/config/smarty.config.inc.php
+++ b/config/smarty.config.inc.php
@@ -44,7 +44,10 @@ $smarty->debugging = false;
$smarty->debugging_ctrl = 'NONE';
if (Configuration::get('PS_SMARTY_CONSOLE') == _PS_SMARTY_CONSOLE_OPEN_BY_URL_)
+{
$smarty->debugging_ctrl = 'URL';
+ $smarty->smarty_debug_id = Configuration::get('PS_SMARTY_CONSOLE_KEY');
+}
else if (Configuration::get('PS_SMARTY_CONSOLE') == _PS_SMARTY_CONSOLE_OPEN_)
$smarty->debugging = true;
diff --git a/controllers/admin/AdminPerformanceController.php b/controllers/admin/AdminPerformanceController.php
index 662f4426c..ef4bd674e 100644
--- a/controllers/admin/AdminPerformanceController.php
+++ b/controllers/admin/AdminPerformanceController.php
@@ -118,12 +118,20 @@ class AdminPerformanceControllerCore extends AdminController
)
)
),
+ array(
+ 'type' => 'text',
+ 'label' => $this->l('Debug console Key'),
+ 'name' => 'smarty_console_key',
+ 'size' => 30,
+ 'desc' => $this->l('SMARTY_DEBUG parameter in the URL.')
+ ),
)
);
$this->fields_value['smarty_force_compile'] = Configuration::get('PS_SMARTY_FORCE_COMPILE');
$this->fields_value['smarty_cache'] = Configuration::get('PS_SMARTY_CACHE');
$this->fields_value['smarty_console'] = Configuration::get('PS_SMARTY_CONSOLE');
+ $this->fields_value['smarty_console_key'] = Configuration::get('PS_SMARTY_CONSOLE_KEY');
}
public function initFieldsetFeaturesDetachables()
@@ -586,7 +594,8 @@ class AdminPerformanceControllerCore extends AdminController
Configuration::updateValue('PS_SMARTY_FORCE_COMPILE', Tools::getValue('smarty_force_compile', _PS_SMARTY_NO_COMPILE_));
Configuration::updateValue('PS_SMARTY_CACHE', Tools::getValue('smarty_cache', 0));
Configuration::updateValue('PS_SMARTY_CONSOLE', Tools::getValue('smarty_console', 0));
- $redirectAdmin = true;
+ Configuration::updateValue('PS_SMARTY_CONSOLE_KEY', Tools::getValue('smarty_console_key', 'SMARTY_DEBUG'));
+ $redirecAdmin = true;
}
else
$this->errors[] = Tools::displayError('You do not have permission to edit this.');
@@ -817,4 +826,4 @@ class AdminPerformanceControllerCore extends AdminController
die;
}
-}
\ No newline at end of file
+}
diff --git a/install-dev/data/xml/configuration.xml b/install-dev/data/xml/configuration.xml
index 2494938f3..62ec8b354 100644
--- a/install-dev/data/xml/configuration.xml
+++ b/install-dev/data/xml/configuration.xml
@@ -771,6 +771,9 @@ Country
1
+
+
+ SMARTY_DEBUG
diff --git a/install-dev/upgrade/sql/1.5.5.0.sql b/install-dev/upgrade/sql/1.5.5.0.sql
index 0c0452d73..27118c735 100644
--- a/install-dev/upgrade/sql/1.5.5.0.sql
+++ b/install-dev/upgrade/sql/1.5.5.0.sql
@@ -34,3 +34,5 @@ ALTER TABLE `PREFIX_product_shop` DROP INDEX `date_add`, ADD INDEX `date_add` (`
UPDATE `PREFIX_hook` SET `live_edit` = '1' WHERE `name` LIKE 'leftcolumn';
UPDATE `PREFIX_configuration` SET `name` = '0' WHERE `name` LIKE 'PS_LEGACY_IMAGES' AND `value` LIKE '1';
+
+INSERT INTO `PREFIX_configuration` (`name`, `value`, `date_add`, `date_upd`) VALUES('PS_SMARTY_CONSOLE_KEY', 'SMARTY_DEBUG', NOW(), NOW());