Merge pull request #16451 from nextcloud/tech-debt/noid/reduce-indirection

Reduce indirection in AppManager
This commit is contained in:
Morris Jobke 2019-07-18 13:03:12 +02:00 committed by GitHub
commit a65c00472a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -462,7 +462,7 @@ class AppManager implements IAppManager {
public function getAppVersion(string $appId, bool $useCache = true): string {
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';
}
return $this->appVersions[$appId];