Use appmanager in OC_App::enable/disable
This commit is contained in:
parent
5394a81c05
commit
e672f8cc8f
1 changed files with 5 additions and 3 deletions
|
@ -261,10 +261,11 @@ class OC_App {
|
|||
$app = self::installApp($app);
|
||||
}
|
||||
|
||||
$appManager = \OC::$server->getAppManager();
|
||||
if (!is_null($groups)) {
|
||||
OC_Appconfig::setValue($app, 'enabled', json_encode($groups));
|
||||
$appManager->enableAppForGroups($app, $groups);
|
||||
} else {
|
||||
OC_Appconfig::setValue($app, 'enabled', 'yes');
|
||||
$appManager->enableApp($app);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -308,7 +309,8 @@ class OC_App {
|
|||
self::$enabledAppsCache = array(); // flush
|
||||
// check if app is a shipped app or not. if not delete
|
||||
\OC_Hook::emit('OC_App', 'pre_disable', array('app' => $app));
|
||||
OC_Appconfig::setValue($app, 'enabled', 'no');
|
||||
$appManager = \OC::$server->getAppManager();
|
||||
$appManager->disableApp($app);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue