[-] BO : fix #PSCFV-4607

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@17754 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
lLefevre
2012-10-04 13:33:13 +00:00
parent 50206f1bef
commit 2c2b0fae9d
7 changed files with 25 additions and 9 deletions
+3 -1
View File
@@ -474,6 +474,7 @@ class AdminImportControllerCore extends AdminController
'languages' => Language::getLanguages(false),
'id_language' => $this->context->language->id,
'available_fields' => $this->getAvailableFields(),
'truncateAuthorized' => (Shop::isFeatureActive() && $this->context->employee->isSuperAdmin()) || !Shop::isFeatureActive(),
'PS_ADVANCED_STOCK_MANAGEMENT' => Configuration::get('PS_ADVANCED_STOCK_MANAGEMENT'),
);
@@ -2667,7 +2668,8 @@ class AdminImportControllerCore extends AdminController
// Check if the CSV file exist
if (Tools::getValue('csv'))
{
if (Tools::getValue('truncate'))
// If i am a superadmin, i can truncate table
if (((Shop::isFeatureActive() && $this->context->employee->isSuperAdmin()) || !Shop::isFeatureActive()) && Tools::getValue('truncate'))
$this->truncateTables((int)Tools::getValue('entity'));
switch ((int)Tools::getValue('entity'))