]> source.dussan.org Git - nextcloud-server.git/commitdiff
Update cache when enabling/disabling apps
authorRobin Appelman <icewind@owncloud.com>
Mon, 16 Feb 2015 15:44:35 +0000 (16:44 +0100)
committerRobin Appelman <icewind@owncloud.com>
Tue, 17 Feb 2015 14:05:25 +0000 (15:05 +0100)
lib/private/app/appmanager.php

index f35fc3e5e6b63d94c37f1682b2bafa9f9dfbbadd..c5006593e5db7f9053280f939550b3f21b0eddaa 100644 (file)
@@ -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');
        }
 }