// 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:
mMarinetti
2011-12-21 20:36:17 +00:00
parent 5b9778bd5f
commit 0f827d6994
4 changed files with 11 additions and 6 deletions
+4 -3
View File
@@ -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);
}
}
}