[+] Project : Add Smarty console options

This commit is contained in:
jBreux
2011-12-21 15:35:34 +00:00
parent 58c9a28343
commit dbc30689df
8 changed files with 131 additions and 80 deletions
+4
View File
@@ -138,4 +138,8 @@ define('_PS_SMARTY_NO_COMPILE_', 0);
define('_PS_SMARTY_CHECK_COMPILE_', 1);
define('_PS_SMARTY_FORCE_COMPILE_', 2);
define('_PS_SMARTY_CONSOLE_CLOSE_', 0);
define('_PS_SMARTY_CONSOLE_OPEN_BY_URL_', 1);
define('_PS_SMARTY_CONSOLE_OPEN_', 2);
define('_PS_JQUERY_VERSION_', '1.4.4');
+8 -1
View File
@@ -37,8 +37,15 @@ $smarty->setConfigDir(_PS_SMARTY_DIR_.'configs');
$smarty->caching = false;
$smarty->force_compile = (Configuration::get('PS_SMARTY_FORCE_COMPILE') == _PS_SMARTY_FORCE_COMPILE_) ? true : false;
$smarty->compile_check = (Configuration::get('PS_SMARTY_FORCE_COMPILE') == _PS_SMARTY_CHECK_COMPILE_) ? true : false;
// Production mode
$smarty->debugging = false;
$smarty->debugging_ctrl = 'URL'; // 'NONE' on production
$smarty->debugging_ctrl = 'NONE';
if (Configuration::get('PS_SMARTY_CONSOLE') == _PS_SMARTY_CONSOLE_OPEN_BY_URL_)
$smarty->debugging_ctrl = 'URL';
else if (Configuration::get('PS_SMARTY_CONSOLE') == _PS_SMARTY_CONSOLE_OPEN_)
$smarty->debugging = true;
if (defined('_PS_ADMIN_DIR_'))
require_once (dirname(__FILE__).'/smartyadmin.config.inc.php');
+3 -1
View File
@@ -25,7 +25,9 @@
* International Registered Trademark & Property of PrestaShop SA
*/
global $smarty;
$smarty->template_dir = _PS_ADMIN_DIR_.'/themes/template';
$smarty->setTemplateDir(_PS_ADMIN_DIR_.'/themes/template');
$smarty->debugging = false;
$smarty->debugging_ctrl = 'NONE';
function smartyTranslate($params, &$smarty)
{