Skip to content
Snippets Groups Projects
Unverified Commit 5e055ca6 authored by Thomas Müller's avatar Thomas Müller
Browse files

Move uninstall repair step execution to the correct place

parent b0211a54
No related branches found
No related tags found
No related merge requests found
......@@ -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);
......
......@@ -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);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment