[-] BO : BugFix : #PSCFV-2441 : Shop creation : unable to save parameters

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@15448 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
vChabot
2012-05-19 13:52:52 +00:00
parent 46e6e47971
commit 6e4b178fa4

View File

@@ -255,7 +255,8 @@ class AdminShopControllerCore extends AdminController
protected function afterUpdate($new_shop)
{
Category::updateFromShop(Tools::getValue('categoryBox'), $new_shop->id);
if (!Category::updateFromShop(Tools::getValue('categoryBox'), $new_shop->id))
$this->errors[] = $this->l('You need to select at least the root category.');
if (Tools::getValue('useImportData') && ($import_data = Tools::getValue('importData')) && is_array($import_data))
$new_shop->copyShopData((int)Tools::getValue('importFromShop'), $import_data);
return parent::afterUpdate($new_shop);