Skip to content
Snippets Groups Projects
Commit 5c68c81d authored by Robin Appelman's avatar Robin Appelman
Browse files

Update cache when enabling/disabling apps

parent 23ab25e9
Branches
No related tags found
No related merge requests found
......@@ -142,6 +142,7 @@ class AppManager implements IAppManager {
* @param string $appId
*/
public function enableApp($appId) {
$this->installedAppsCache[$appId] = 'yes';
$this->appConfig->setValue($appId, 'enabled', 'yes');
}
......@@ -156,6 +157,7 @@ class AppManager implements IAppManager {
/** @var \OCP\IGroup $group */
return $group->getGID();
}, $groups);
$this->installedAppsCache[$appId] = json_encode($groupIds);
$this->appConfig->setValue($appId, 'enabled', json_encode($groupIds));
}
......@@ -166,9 +168,10 @@ class AppManager implements IAppManager {
* @throws \Exception if app can't be disabled
*/
public function disableApp($appId) {
if($appId === 'files') {
if ($appId === 'files') {
throw new \Exception("files can't be disabled.");
}
unset($this->installedAppsCache[$appId]);
$this->appConfig->setValue($appId, 'enabled', 'no');
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment