// Import categories improvement
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@13976 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
@@ -800,9 +800,12 @@ class AdminImportControllerCore extends AdminController
|
||||
$line = $this->utf8EncodeArray($line);
|
||||
$info = AdminImportController::getMaskedRow($line);
|
||||
|
||||
if (!isset($info['id']) || (int)$info['id'] < 2)
|
||||
$tab_categ = array(Configuration::get('PS_HOME_CATEGORY'), Configuration::get('PS_ROOT_CATEGORY'));
|
||||
if (isset($info['id']) && in_array((int)$info['id'], $tab_categ))
|
||||
{
|
||||
$this->errors[] = Tools::displayError('The ID category cannot be the same as the ID Root category, nor the ID Home category');
|
||||
continue;
|
||||
|
||||
}
|
||||
AdminImportController::setDefaultValues($info);
|
||||
$category = new Category();
|
||||
AdminImportController::arrayWalk($info, array('AdminImportController', 'fillInfo'), $category);
|
||||
|
||||
Reference in New Issue
Block a user