diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2016-05-02 09:22:26 +0200 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2016-05-02 09:22:26 +0200 |
commit | 5e055ca6c1837a762aed7fe1e09b3a834fd50f20 (patch) | |
tree | 1daa3456cc68ad314b05ee2bb0e3519caa213acf /lib | |
parent | b0211a54c43187602dde314a3ec990af11595190 (diff) | |
download | nextcloud-server-5e055ca6c1837a762aed7fe1e09b3a834fd50f20.tar.gz nextcloud-server-5e055ca6c1837a762aed7fe1e09b3a834fd50f20.zip |
Move uninstall repair step execution to the correct place
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/Installer.php | 5 | ||||
-rw-r--r-- | lib/private/legacy/app.php | 14 |
2 files changed, 12 insertions, 7 deletions
diff --git a/lib/private/Installer.php b/lib/private/Installer.php index cc80423b7dc..643590ae22e 100644 --- a/lib/private/Installer.php +++ b/lib/private/Installer.php @@ -493,11 +493,6 @@ class Installer { */ public static function removeApp($appId) { - $appData = OC_App::getAppInfo($appId); - if (!is_null($appData)) { - OC_App::executeRepairSteps($appId, $appData['repair-steps']['uninstall']); - } - if(Installer::isDownloaded( $appId )) { $appDir=OC_App::getInstallPath() . '/' . $appId; OC_Helper::rmdirr($appDir); diff --git a/lib/private/legacy/app.php b/lib/private/legacy/app.php index 42bb441228f..41b1b79e4f6 100644 --- a/lib/private/legacy/app.php +++ b/lib/private/legacy/app.php @@ -370,9 +370,19 @@ class OC_App { $app = self::getInternalAppIdByOcs($app); } - self::$enabledAppsCache = array(); // flush - // check if app is a shipped app or not. if not delete + // flush + self::$enabledAppsCache = array(); + + // run uninstall steps + $appData = OC_App::getAppInfo($app); + if (!is_null($appData)) { + OC_App::executeRepairSteps($app, $appData['repair-steps']['uninstall']); + } + + // emit disable hook - needed anymore ? \OC_Hook::emit('OC_App', 'pre_disable', array('app' => $app)); + + // finally disable it $appManager = \OC::$server->getAppManager(); $appManager->disableApp($app); } |