File tree Expand file tree Collapse file tree 3 files changed +11
-11
lines changed
Expand file tree Collapse file tree 3 files changed +11
-11
lines changed Original file line number Diff line number Diff line change @@ -280,6 +280,16 @@ public function disableApp($appId) {
280280 }
281281 unset($ this ->installedAppsCache [$ appId ]);
282282 $ this ->appConfig ->setValue ($ appId , 'enabled ' , 'no ' );
283+
284+ // run uninstall steps
285+ $ appData = $ this ->getAppInfo ($ appId );
286+ if (!is_null ($ appData )) {
287+ \OC_App::executeRepairSteps ($ appId , $ appData ['repair-steps ' ]['uninstall ' ]);
288+ }
289+
290+ // emit disable hook - needed anymore ?
291+ \OC_Hook::emit ('OC_App ' , 'pre_disable ' , array ('app ' => $ appId ));
292+
283293 $ this ->dispatcher ->dispatch (ManagerEvent::EVENT_APP_DISABLE , new ManagerEvent (
284294 ManagerEvent::EVENT_APP_DISABLE , $ appId
285295 ));
Original file line number Diff line number Diff line change @@ -420,16 +420,6 @@ public static function disable($app) {
420420 // flush
421421 self ::$ enabledAppsCache = array ();
422422
423- // run uninstall steps
424- $ appData = OC_App::getAppInfo ($ app );
425- if (!is_null ($ appData )) {
426- OC_App::executeRepairSteps ($ app , $ appData ['repair-steps ' ]['uninstall ' ]);
427- }
428-
429- // emit disable hook - needed anymore ?
430- \OC_Hook::emit ('OC_App ' , 'pre_disable ' , array ('app ' => $ app ));
431-
432- // finally disable it
433423 $ appManager = \OC ::$ server ->getAppManager ();
434424 $ appManager ->disableApp ($ app );
435425 }
Original file line number Diff line number Diff line change 3939$ appIds = (array )$ _POST ['appid ' ];
4040foreach ($ appIds as $ appId ) {
4141 $ appId = OC_App::cleanAppId ($ appId );
42- OC_App:: disable ($ appId );
42+ \ OC :: $ server -> getAppManager ()-> disableApp ($ appId );
4343}
4444OC_JSON ::success ();
You can’t perform that action at this time.
0 commit comments