aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/private/App/AppManager.php10
-rw-r--r--lib/private/legacy/app.php10
2 files changed, 10 insertions, 10 deletions
diff --git a/lib/private/App/AppManager.php b/lib/private/App/AppManager.php
index 4bf15c23fab..f46ec2a584e 100644
--- a/lib/private/App/AppManager.php
+++ b/lib/private/App/AppManager.php
@@ -287,6 +287,16 @@ class AppManager implements IAppManager {
}
unset($this->installedAppsCache[$appId]);
$this->appConfig->setValue($appId, 'enabled', 'no');
+
+ // run uninstall steps
+ $appData = $this->getAppInfo($appId);
+ if (!is_null($appData)) {
+ \OC_App::executeRepairSteps($appId, $appData['repair-steps']['uninstall']);
+ }
+
+ // emit disable hook - needed anymore ?
+ \OC_Hook::emit('OC_App', 'pre_disable', array('app' => $appId));
+
$this->dispatcher->dispatch(ManagerEvent::EVENT_APP_DISABLE, new ManagerEvent(
ManagerEvent::EVENT_APP_DISABLE, $appId
));
diff --git a/lib/private/legacy/app.php b/lib/private/legacy/app.php
index 16e57d43ebc..eba29d27cf8 100644
--- a/lib/private/legacy/app.php
+++ b/lib/private/legacy/app.php
@@ -431,16 +431,6 @@ class OC_App {
// flush
self::$enabledAppsCache = [];
- // 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);
}