[-] BO : Upload zip module is repaired

This commit is contained in:
fSerny committed 2011-12-06 16:00:17 +00:00
1 parent acb0b210d7
commit 022ce1a72c
1 file changed
+3 -5
+3 -5
View File
@@ -263,7 +263,9 @@ class AdminModulesControllerCore extends AdminController
$success = false; $success = false;
if (substr($file, -4) == '.zip') if (substr($file, -4) == '.zip')
{ {
if (!Tools::ZipExtract($file, _PS_MODULE_DIR_)) if (Tools::ZipExtract($file, _PS_MODULE_DIR_))
$success = true;
else
$this->_errors[] = Tools::displayError('Error while extracting module (file may be corrupted).'); $this->_errors[] = Tools::displayError('Error while extracting module (file may be corrupted).');
} }
else else
@@ -400,10 +402,6 @@ class AdminModulesControllerCore extends AdminController
public function postProcessDownload() public function postProcessDownload()
{ {
// Check the flag
if (Tools::getValue('enable') === false)
return false;
// PrestaShop demo mode // PrestaShop demo mode
if (_PS_MODE_DEMO_) if (_PS_MODE_DEMO_)
{ {