Update cache when enabling/disabling apps
This commit is contained in:
parent
23ab25e93a
commit
5c68c81d00
|
@ -142,6 +142,7 @@ class AppManager implements IAppManager {
|
||||||
* @param string $appId
|
* @param string $appId
|
||||||
*/
|
*/
|
||||||
public function enableApp($appId) {
|
public function enableApp($appId) {
|
||||||
|
$this->installedAppsCache[$appId] = 'yes';
|
||||||
$this->appConfig->setValue($appId, 'enabled', 'yes');
|
$this->appConfig->setValue($appId, 'enabled', 'yes');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -156,6 +157,7 @@ class AppManager implements IAppManager {
|
||||||
/** @var \OCP\IGroup $group */
|
/** @var \OCP\IGroup $group */
|
||||||
return $group->getGID();
|
return $group->getGID();
|
||||||
}, $groups);
|
}, $groups);
|
||||||
|
$this->installedAppsCache[$appId] = json_encode($groupIds);
|
||||||
$this->appConfig->setValue($appId, 'enabled', json_encode($groupIds));
|
$this->appConfig->setValue($appId, 'enabled', json_encode($groupIds));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -169,6 +171,7 @@ class AppManager implements IAppManager {
|
||||||
if ($appId === 'files') {
|
if ($appId === 'files') {
|
||||||
throw new \Exception("files can't be disabled.");
|
throw new \Exception("files can't be disabled.");
|
||||||
}
|
}
|
||||||
|
unset($this->installedAppsCache[$appId]);
|
||||||
$this->appConfig->setValue($appId, 'enabled', 'no');
|
$this->appConfig->setValue($appId, 'enabled', 'no');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue