Merge branch 'development' of https://github.com/PrestaShop/PrestaShop into bootstrap
Conflicts: admin-dev/themes/default/css/admin.css admin-dev/themes/default/template/controllers/carrier_wizard/helpers/form/form.tpl admin-dev/themes/default/template/controllers/carrier_wizard/helpers/form/form_ranges.tpl admin-dev/themes/default/template/controllers/categories/helpers/form/form.tpl admin-dev/themes/default/template/controllers/home/content.tpl admin-dev/themes/default/template/controllers/localization/content.tpl admin-dev/themes/default/template/controllers/orders/_customized_data.tpl admin-dev/themes/default/template/controllers/orders/_new_product.tpl admin-dev/themes/default/template/controllers/orders/_product_line.tpl admin-dev/themes/default/template/controllers/orders/helpers/view/view.tpl admin-dev/themes/default/template/controllers/tax_rules/helpers/list/list_header.tpl admin-dev/themes/default/template/footer.tpl controllers/admin/AdminCarrierWizardController.php controllers/admin/AdminCarriersController.php controllers/admin/AdminCmsController.php controllers/admin/AdminLocalizationController.php controllers/admin/AdminManufacturersController.php controllers/admin/AdminSuppliersController.php css/admin.css js/admin-products.js js/admin_carrier_wizard.js translations/fr.gzip
This commit is contained in:
@@ -99,6 +99,8 @@ class AdminModulesControllerCore extends AdminController
|
||||
$this->list_modules_categories['others']['name'] = $this->l('Other Modules');
|
||||
$this->list_modules_categories['mobile']['name'] = $this->l('Mobile');
|
||||
|
||||
uasort($this->list_modules_categories, array($this, 'checkCategoriesNames'));
|
||||
|
||||
// Set Id Employee, Iso Default Country and Filter Configuration
|
||||
$this->id_employee = (int)$this->context->employee->id;
|
||||
$this->iso_default_country = $this->context->country->iso_code;
|
||||
@@ -130,6 +132,14 @@ class AdminModulesControllerCore extends AdminController
|
||||
$this->logged_on_addons = true;
|
||||
}
|
||||
|
||||
public function checkCategoriesNames($a, $b)
|
||||
{
|
||||
if ($a['name'] === $this->l('Other Modules'))
|
||||
return true;
|
||||
|
||||
return (bool)($a['name'] > $b['name']);
|
||||
}
|
||||
|
||||
public function setMedia()
|
||||
{
|
||||
parent::setMedia();
|
||||
@@ -631,9 +641,8 @@ class AdminModulesControllerCore extends AdminController
|
||||
|
||||
if (!$download_ok)
|
||||
$this->errors[] = $this->l('Error on downloading the lastest version');
|
||||
else
|
||||
if(!$this->extractArchive(_PS_MODULE_DIR_.$modaddons->name.'.zip', false))
|
||||
$this->errors[] = $this->l(sprintf("Module %s can't be upgraded: ", $modaddons->name));
|
||||
elseif (!$this->extractArchive(_PS_MODULE_DIR_.$modaddons->name.'.zip', false))
|
||||
$this->errors[] = $this->l(sprintf("Module %s can't be upgraded: ", $modaddons->name));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -675,18 +684,18 @@ class AdminModulesControllerCore extends AdminController
|
||||
|
||||
// Get the return value of current method
|
||||
$echo = $module->{$method}();
|
||||
|
||||
|
||||
// After a successful install of a single module that has a configuration method, to the configuration page
|
||||
if ($key == 'install' && $echo === true && strpos(Tools::getValue('install'), '|') === false && method_exists($module, 'getContent'))
|
||||
Tools::redirectAdmin(self::$currentIndex.'&token='.$this->token.'&configure='.$module->name.'&conf=12');
|
||||
}
|
||||
|
||||
|
||||
// If the method called is "configure" (getContent method), we show the html code of configure page
|
||||
if ($key == 'configure' && Module::isInstalled($module->name))
|
||||
{
|
||||
if (isset($module->multishop_context))
|
||||
$this->multishop_context = $module->multishop_context;
|
||||
|
||||
|
||||
$backlink = self::$currentIndex.'&token='.$this->token.'&tab_module='.$module->tab.'&module_name='.$module->name;
|
||||
$hooklink = 'index.php?tab=AdminModulesPositions&token='.Tools::getAdminTokenLite('AdminModulesPositions').'&show_modules='.(int)$module->id;
|
||||
$tradlink = 'index.php?tab=AdminTranslations&token='.Tools::getAdminTokenLite('AdminTranslations').'&type=modules&lang=';
|
||||
@@ -768,10 +777,8 @@ class AdminModulesControllerCore extends AdminController
|
||||
Tools::redirectAdmin(self::$currentIndex.'&conf='.$return.'&token='.$this->token.'&tab_module='.$module->tab.'&module_name='.$module->name.'&anchor=anchor'.ucfirst($module->name).(isset($modules_list_save) ? '&modules_list='.$modules_list_save : '').$params);
|
||||
}
|
||||
|
||||
if(isset($_GET['update']))
|
||||
{
|
||||
Tools::redirectAdmin(self::$currentIndex.'&token='.$this->token.'&updated=1tab_module='.$module->tab.'&module_name='.$module->name.'&anchor=anchor'.ucfirst($module->name).(isset($modules_list_save) ? '&modules_list='.$modules_list_save : '').$params);
|
||||
}
|
||||
if (isset($_GET['update']))
|
||||
Tools::redirectAdmin(self::$currentIndex.'&token='.$this->token.'&updated=1tab_module='.$module->tab.'&module_name='.$module->name.'&anchor=anchor'.ucfirst($module->name).(isset($modules_list_save) ? '&modules_list='.$modules_list_save : ''));
|
||||
}
|
||||
|
||||
public function postProcess()
|
||||
@@ -779,7 +786,6 @@ class AdminModulesControllerCore extends AdminController
|
||||
// Parent Post Process
|
||||
parent::postProcess();
|
||||
|
||||
|
||||
// Get the list of installed module ans prepare it for ajax call.
|
||||
if (($list = Tools::getValue('installed_modules')))
|
||||
Context::getContext()->smarty->assign('installed_modules', Tools::jsonEncode(explode('|', $list)));
|
||||
|
||||
Reference in New Issue
Block a user