Reduce indirection in AppManager
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
This commit is contained in:
parent
3d0e0f2353
commit
55d8c3db3e
|
@ -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];
|
||||||
|
|
Loading…
Reference in New Issue