// reported fix from 1.4.x
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@11556 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
@@ -801,9 +801,10 @@ class AdminImportControllerCore extends AdminController
|
||||
$category->doNotRegenerateNTree = true;
|
||||
|
||||
// If id category AND id category already in base, trying to update
|
||||
if ($category->id && $category->categoryExists($category->id))
|
||||
if ($category->id && $category->categoryExists($category->id) && $category->id != 1)
|
||||
$res = $category->update();
|
||||
|
||||
if ($category->id == 1)
|
||||
$this->_errors[] = Tools::displayError('Root category cannot be modify');
|
||||
// If no id_category or update failed
|
||||
if (!$res)
|
||||
$res = $category->add();
|
||||
@@ -1840,4 +1841,4 @@ class AdminImportControllerCore extends AdminController
|
||||
{
|
||||
$this->warnings[] = $product_name.(isset($product_id) ? ' (ID '.$product_id.')' : '').' '.Tools::displayError($message);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user