[-] BO : fixed bug #PSCFV-4660 , #PSCFV-4124
This commit is contained in:
@@ -85,14 +85,16 @@ class AdminModulesPositionsControllerCore extends AdminController
|
|||||||
$exceptions = (isset($exceptions[0])) ? $exceptions[0] : array();
|
$exceptions = (isset($exceptions[0])) ? $exceptions[0] : array();
|
||||||
$exceptions = explode(',', str_replace(' ', '', $exceptions));
|
$exceptions = explode(',', str_replace(' ', '', $exceptions));
|
||||||
|
|
||||||
foreach ($exceptions as $except)
|
foreach ($exceptions as $key => $except)
|
||||||
if (!Validate::isFileName($except))
|
{
|
||||||
|
if (empty($except))
|
||||||
|
unset($exceptions[$key]);
|
||||||
|
else if (!Validate::isFileName($except))
|
||||||
$this->errors[] = Tools::displayError('No valid value for field exceptions');
|
$this->errors[] = Tools::displayError('No valid value for field exceptions');
|
||||||
|
}
|
||||||
if (!$this->errors && !$module->registerExceptions($id_hook, $exceptions, Shop::getContextListShopID()))
|
if (!$this->errors && !$module->registerExceptions($id_hook, $exceptions, Shop::getContextListShopID()))
|
||||||
$this->errors[] = Tools::displayError('An error occurred while transplanting module to hook.');
|
$this->errors[] = Tools::displayError('An error occurred while transplanting module to hook.');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$this->errors)
|
if (!$this->errors)
|
||||||
Tools::redirectAdmin(self::$currentIndex.'&conf=16'.($this->display_key ? '&show_modules='.$this->display_key : '').'&token='.$this->token);
|
Tools::redirectAdmin(self::$currentIndex.'&conf=16'.($this->display_key ? '&show_modules='.$this->display_key : '').'&token='.$this->token);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user