// small fix on import

This commit is contained in:
Rémi Gaillard
2013-10-03 10:33:43 +02:00
parent 3b75dd6785
commit e190c8df9f
+3 -1
View File
@@ -2775,7 +2775,9 @@ class AdminImportControllerCore extends AdminController
break;
}
}
else if (!file_exists($_FILES['file']['tmp_name']) ||
elseif (!preg_match('/.*\.csv$/i', $_FILES['file']['name']))
$this->errors[] = Tools::displayError('The extension of your file should be .csv.');
elseif (!file_exists($_FILES['file']['tmp_name']) ||
!@move_uploaded_file($_FILES['file']['tmp_name'], $path.$_FILES['file']['name']))
$this->errors[] = $this->l('An error occurred while uploading / copying the file.');
else