Merge branch 'development' of https://github.com/PrestaShop/PrestaShop into bootstrap

Conflicts:
	admin-dev/themes/default/template/controllers/customer_threads/message.tpl
	admin-dev/themes/default/template/controllers/customers/helpers/view/view.tpl
	admin-dev/themes/default/template/controllers/import/helpers/form/form.tpl
	admin-dev/themes/default/template/controllers/modules/favorites.tpl
	admin-dev/themes/default/template/controllers/modules/list.tpl
	admin-dev/themes/default/template/controllers/modules/tab_module_line.tpl
	admin-dev/themes/default/template/controllers/modules_positions/list_modules.tpl
	admin-dev/themes/default/template/controllers/orders/_print_pdf_icon.tpl
	admin-dev/themes/default/template/controllers/orders/form.tpl
	admin-dev/themes/default/template/controllers/orders/helpers/view/view.tpl
	admin-dev/themes/default/template/controllers/products/associations.tpl
	admin-dev/themes/default/template/controllers/products/combinations.tpl
	admin-dev/themes/default/template/controllers/products/images.tpl
	admin-dev/themes/default/template/controllers/products/informations.tpl
	admin-dev/themes/default/template/controllers/products/prices.tpl
	admin-dev/themes/default/template/controllers/referrers/helpers/view/view.tpl
	admin-dev/themes/default/template/header.tpl
	admin-dev/themes/default/template/helpers/form/form.tpl
	admin-dev/themes/default/template/helpers/list/list_header.tpl
	classes/ProductSale.php
	classes/helper/HelperList.php
	controllers/admin/AdminCmsController.php
	controllers/admin/AdminCustomersController.php
	controllers/admin/AdminMetaController.php
	controllers/admin/AdminModulesController.php
	controllers/admin/AdminPerformanceController.php
	controllers/admin/AdminProductsController.php
	controllers/front/ParentOrderController.php
	install-dev/theme/views/welcome.phtml
	modules/blocknewproducts/blocknewproducts.php
	modules/blocktopmenu/blocktopmenu.php
	modules/importerosc/importerosc.php
	modules/mailalerts/mailalerts.php
	modules/shopimporter/shopimporter.php
	modules/statsstock/statsstock.php
	themes/default/css/product_list.css
This commit is contained in:
Kevin Granger
2013-11-04 14:43:01 +01:00
169 changed files with 2783 additions and 1759 deletions

View File

@@ -129,9 +129,68 @@ class AdminPerformanceControllerCore extends AdminController
$this->fields_value['smarty_console_key'] = Configuration::get('PS_SMARTY_CONSOLE_KEY');
}
public function initFieldsetFeaturesDetachables()
public function initFieldsetDebugMode()
{
$this->fields_form[1]['form'] = array(
'legend' => array(
'title' => $this->l('Debug mode'),
'image' => '../img/admin/prefs.gif'
),
'input' => array(
array(
'type' => 'radio',
'label' => $this->l('Disable non PrestaShop modules'),
'name' => 'native_module',
'class' => 't',
'is_bool' => true,
'values' => array(
array(
'id' => 'native_module_on',
'value' => 1,
'label' => $this->l('Enabled')
),
array(
'id' => 'native_module_off',
'value' => 0,
'label' => $this->l('Disabled')
)
),
'desc' => $this->l('Enable or disable non PrestaShop Modules.')
),
array(
'type' => 'radio',
'label' => $this->l('Disable all overrides'),
'name' => 'overrides',
'class' => 't',
'is_bool' => true,
'values' => array(
array(
'id' => 'overrides_module_on',
'value' => 1,
'label' => $this->l('Enabled')
),
array(
'id' => 'overrides_module_off',
'value' => 0,
'label' => $this->l('Disabled')
)
),
'desc' => $this->l('Enable or disable all classes and controllers overrides')
),
),
'submit' => array(
'title' => $this->l(' Save '),
'class' => 'button'
),
);
$this->fields_value['native_module'] = Configuration::get('PS_DISABLE_NON_NATIVE_MODULE');
$this->fields_value['overrides'] = Configuration::get('PS_DISABLE_OVERRIDES');
}
public function initFieldsetFeaturesDetachables()
{
$this->fields_form[2]['form'] = array(
'legend' => array(
'title' => $this->l('Optional features'),
'icon' => 'icon-puzzle-piece'
@@ -190,7 +249,7 @@ class AdminPerformanceControllerCore extends AdminController
public function initFieldsetCCC()
{
$this->fields_form[2]['form'] = array(
$this->fields_form[3]['form'] = array(
'legend' => array(
'title' => $this->l('CCC (Combine, Compress and Cache)'),
'icon' => 'icon-fullscreen'
@@ -300,7 +359,7 @@ class AdminPerformanceControllerCore extends AdminController
public function initFieldsetMediaServer()
{
$this->fields_form[3]['form'] = array(
$this->fields_form[4]['form'] = array(
'legend' => array(
'title' => $this->l('Media servers (use only with CCC)'),
'icon' => 'icon-link'
@@ -346,7 +405,8 @@ class AdminPerformanceControllerCore extends AdminController
$warning_mcrypt = str_replace('[a]', '<a href="http://www.php.net/manual/'.substr($php_lang, 0, 2).'/book.mcrypt.php" target="_blank">', $warning_mcrypt);
$warning_mcrypt = str_replace('[/a]', '</a>', $warning_mcrypt);
$this->fields_form[4]['form'] = array(
$this->fields_form[5]['form'] = array(
'legend' => array(
'title' => $this->l('Ciphering'),
'icon' => 'icon-desktop'
@@ -399,7 +459,7 @@ class AdminPerformanceControllerCore extends AdminController
$warning_fs = ' '.sprintf($this->l('(the directory %s must be writable)'), realpath(_PS_CACHEFS_DIRECTORY_));
$this->fields_form[5]['form'] = array(
$this->fields_form[6]['form'] = array(
'legend' => array(
'title' => $this->l('Caching'),
'icon' => 'icon-desktop'
@@ -481,12 +541,19 @@ class AdminPerformanceControllerCore extends AdminController
{
// Initialize fieldset for a form
$this->initFieldsetSmarty();
if (_PS_MODE_DEV_)
$this->initFieldsetDebugMode();
$this->initFieldsetFeaturesDetachables();
$this->initFieldsetCCC();
$this->initFieldsetMediaServer();
$this->initFieldsetCiphering();
$this->initFieldsetCaching();
// Reindex fields
$this->fields_form = array_values($this->fields_form);
// Activate multiple fieldset
$this->multiple_fieldsets = true;
@@ -781,6 +848,17 @@ class AdminPerformanceControllerCore extends AdminController
Autoload::getInstance()->generateIndex();
}
if (Tools::isSubmit('submitAddconfiguration') && _PS_MODE_DEV_)
{
Configuration::updateGlobalValue('PS_DISABLE_NON_NATIVE_MODULE', (int)Tools::getValue('native_module'));
Configuration::updateGlobalValue('PS_DISABLE_OVERRIDES', (int)Tools::getValue('overrides'));
if (Tools::getValue('overrides'))
Autoload::getInstance()->_include_override_path = false;
Autoload::getInstance()->generateIndex();
}
if ($redirectAdmin && (!isset($this->errors) || !count($this->errors)))
{
Hook::exec('action'.get_class($this).ucfirst($this->action).'After', array('controller' => $this, 'return' => ''));