From 95deaf8ceaf8353eb876d92c7b88460dea9b075c Mon Sep 17 00:00:00 2001 From: rMalie Date: Tue, 14 Feb 2012 10:07:56 +0000 Subject: [PATCH] [-] MO : theme installator module does not erase anymore already existing modules #PSFV-476 --- modules/themeinstallator/themeinstallator.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/modules/themeinstallator/themeinstallator.php b/modules/themeinstallator/themeinstallator.php index bbf897483..b015373db 100644 --- a/modules/themeinstallator/themeinstallator.php +++ b/modules/themeinstallator/themeinstallator.php @@ -461,7 +461,11 @@ class ThemeInstallator extends Module continue; if ($flag++ == 0) $msg .= ''.$this->l('The following modules have been installed').' :
'; - self::recurseCopy(_IMPORT_FOLDER_.'modules/'.$row, _PS_ROOT_DIR_.'/modules/'.$row); + + // We copy module only if it does not already exists + if (!file_exists(_PS_ROOT_DIR_.'/modules/'.$row)) + self::recurseCopy(_IMPORT_FOLDER_.'modules/'.$row, _PS_ROOT_DIR_.'/modules/'.$row); + $obj = Module::getInstanceByName($row); if (Validate::isLoadedObject($obj)) Db::getInstance()->execute('