Merge branch 'smarty_debug' of https://github.com/PrestaEdit/PrestaShop into PrestaEdit-smarty_debug
Conflicts: controllers/admin/AdminPerformanceController.php install-dev/data/xml/configuration.xml
This commit is contained in:
1 parent
77ba55b090
commit
a69d1c6d05
5 files changed
+20
-3
No files matched your search
@@ -186,7 +186,7 @@
|
|||||||
return false;
|
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);
|
$('#smarty_up').val(1);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -44,7 +44,10 @@ $smarty->debugging = false;
|
|||||||
$smarty->debugging_ctrl = 'NONE';
|
$smarty->debugging_ctrl = 'NONE';
|
||||||
|
|
||||||
if (Configuration::get('PS_SMARTY_CONSOLE') == _PS_SMARTY_CONSOLE_OPEN_BY_URL_)
|
if (Configuration::get('PS_SMARTY_CONSOLE') == _PS_SMARTY_CONSOLE_OPEN_BY_URL_)
|
||||||
|
{
|
||||||
$smarty->debugging_ctrl = '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_)
|
else if (Configuration::get('PS_SMARTY_CONSOLE') == _PS_SMARTY_CONSOLE_OPEN_)
|
||||||
$smarty->debugging = true;
|
$smarty->debugging = true;
|
||||||
|
|
||||||
|
|||||||
@@ -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_force_compile'] = Configuration::get('PS_SMARTY_FORCE_COMPILE');
|
||||||
$this->fields_value['smarty_cache'] = Configuration::get('PS_SMARTY_CACHE');
|
$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'] = Configuration::get('PS_SMARTY_CONSOLE');
|
||||||
|
$this->fields_value['smarty_console_key'] = Configuration::get('PS_SMARTY_CONSOLE_KEY');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function initFieldsetFeaturesDetachables()
|
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_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_CACHE', Tools::getValue('smarty_cache', 0));
|
||||||
Configuration::updateValue('PS_SMARTY_CONSOLE', Tools::getValue('smarty_console', 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
|
else
|
||||||
$this->errors[] = Tools::displayError('You do not have permission to edit this.');
|
$this->errors[] = Tools::displayError('You do not have permission to edit this.');
|
||||||
@@ -817,4 +826,4 @@ class AdminPerformanceControllerCore extends AdminController
|
|||||||
die;
|
die;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -771,6 +771,9 @@ Country</value>
|
|||||||
</configuration>
|
</configuration>
|
||||||
<configuration id="PS_CUSTOMER_CREATION_EMAIL" name="PS_CUSTOMER_CREATION_EMAIL">
|
<configuration id="PS_CUSTOMER_CREATION_EMAIL" name="PS_CUSTOMER_CREATION_EMAIL">
|
||||||
<value>1</value>
|
<value>1</value>
|
||||||
|
</configuration>
|
||||||
|
<configuration id="PS_SMARTY_CONSOLE_KEY" name="PS_SMARTY_CONSOLE_KEY">
|
||||||
|
<value>SMARTY_DEBUG</value>
|
||||||
</configuration>
|
</configuration>
|
||||||
</entities>
|
</entities>
|
||||||
</entity_configuration>
|
</entity_configuration>
|
||||||
@@ -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_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';
|
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());
|
||||||
Reference in new issue
Block a user