Reduce indirection in AppManager

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
This commit is contained in:
Morris Jobke 2019-07-18 11:33:58 +02:00
parent 3d0e0f2353
commit 55d8c3db3e
No known key found for this signature in database
GPG Key ID: FE03C3A163FEDE68
1 changed files with 1 additions and 1 deletions

View File

@ -462,7 +462,7 @@ class AppManager implements IAppManager {
public function getAppVersion(string $appId, bool $useCache = true): string { public function getAppVersion(string $appId, bool $useCache = true): string {
if(!$useCache || !isset($this->appVersions[$appId])) { if(!$useCache || !isset($this->appVersions[$appId])) {
$appInfo = \OC::$server->getAppManager()->getAppInfo($appId); $appInfo = $this->getAppInfo($appId);
$this->appVersions[$appId] = ($appInfo !== null && isset($appInfo['version'])) ? $appInfo['version'] : '0'; $this->appVersions[$appId] = ($appInfo !== null && isset($appInfo['version'])) ? $appInfo['version'] : '0';
} }
return $this->appVersions[$appId]; return $this->appVersions[$appId];