[-] BO : fix postProcess override on AdminImportController
When we override the constucteur of AdminImport to add an import type and PS_ADVANCED_STOCK_MANAGEMENT is off, switch index is undefined for "Supply Orders" and "Supply Order Details". Default case of switch is never used.
This commit is contained in:
1 parent
6796b64e18
commit
6acebca8fa
1 file changed
+16
-13
@@ -2764,19 +2764,22 @@ class AdminImportControllerCore extends AdminController
|
|||||||
$this->supplierImport();
|
$this->supplierImport();
|
||||||
$this->clearSmartyCache();
|
$this->clearSmartyCache();
|
||||||
break;
|
break;
|
||||||
// @since 1.5.0
|
|
||||||
case $this->entities[$import_type = $this->l('Supply Orders')]:
|
|
||||||
if (Configuration::get('PS_ADVANCED_STOCK_MANAGEMENT'))
|
|
||||||
$this->supplyOrdersImport();
|
|
||||||
break;
|
|
||||||
// @since 1.5.0
|
|
||||||
case $this->entities[$import_type = $this->l('Supply Order Details')]:
|
|
||||||
if (Configuration::get('PS_ADVANCED_STOCK_MANAGEMENT'))
|
|
||||||
$this->supplyOrdersDetailsImport();
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
$this->errors[] = $this->l('Please select what you would like to import');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// @since 1.5.0
|
||||||
|
if (Configuration::get('PS_ADVANCED_STOCK_MANAGEMENT'))
|
||||||
|
switch ((int)Tools::getValue('entity'))
|
||||||
|
{
|
||||||
|
case $this->entities[$import_type = $this->l('Supply Orders')]:
|
||||||
|
if (Configuration::get('PS_ADVANCED_STOCK_MANAGEMENT'))
|
||||||
|
$this->supplyOrdersImport();
|
||||||
|
break;
|
||||||
|
case $this->entities[$import_type = $this->l('Supply Order Details')]:
|
||||||
|
if (Configuration::get('PS_ADVANCED_STOCK_MANAGEMENT'))
|
||||||
|
$this->supplyOrdersDetailsImport();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
if ($import_type !== false)
|
if ($import_type !== false)
|
||||||
{
|
{
|
||||||
$log_message = sprintf($this->l('%s import'), $import_type);
|
$log_message = sprintf($this->l('%s import'), $import_type);
|
||||||
@@ -2843,4 +2846,4 @@ class AdminImportControllerCore extends AdminController
|
|||||||
die;
|
die;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user