From 07ea9d10b289670dca29901ea1280dab08ec01fe Mon Sep 17 00:00:00 2001 From: DamienMetzger Date: Wed, 21 Nov 2012 10:07:38 +0100 Subject: [PATCH] [-] MO : "delete" in the module list now uninstall the module before deleting the files --- controllers/admin/AdminModulesController.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/controllers/admin/AdminModulesController.php b/controllers/admin/AdminModulesController.php index 131042610..5b24f649b 100644 --- a/controllers/admin/AdminModulesController.php +++ b/controllers/admin/AdminModulesController.php @@ -524,6 +524,8 @@ class AdminModulesControllerCore extends AdminController $this->errors[] = Tools::displayError('You do not have the permission to use this module'); else { + // Uninstall the module before deleting the files, but do not block the process if uninstall returns false + $module->uninstall(); $moduleDir = _PS_MODULE_DIR_.str_replace(array('.', '/', '\\'), array('', '', ''), Tools::getValue('module_name')); $this->recursiveDeleteOnDisk($moduleDir); Tools::redirectAdmin(self::$currentIndex.'&conf=22&token='.$this->token.'&tab_module='.Tools::getValue('tab_module').'&module_name='.Tools::getValue('module_name'));