aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2015-02-16 16:44:35 +0100
committerRobin Appelman <icewind@owncloud.com>2015-02-17 15:05:25 +0100
commit5c68c81d004542e6bf4b88d323b0e9814b52fb37 (patch)
tree8a61d03ae0407304d0c6077fb54c4528fcd82c4f /lib/private
parent23ab25e93a62fcc4a41ec74db2b32741f98ab34a (diff)
downloadnextcloud-server-5c68c81d004542e6bf4b88d323b0e9814b52fb37.tar.gz
nextcloud-server-5c68c81d004542e6bf4b88d323b0e9814b52fb37.zip
Update cache when enabling/disabling apps
Diffstat (limited to 'lib/private')
-rw-r--r--lib/private/app/appmanager.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/private/app/appmanager.php b/lib/private/app/appmanager.php
index f35fc3e5e6b..c5006593e5d 100644
--- a/lib/private/app/appmanager.php
+++ b/lib/private/app/appmanager.php
@@ -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');
}
}