diff options
author | Morris Jobke <hey@morrisjobke.de> | 2015-12-18 15:26:54 +0100 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2015-12-18 15:26:54 +0100 |
commit | ed98cdf532ae475f4d5f5ec88afa55972cba3ba2 (patch) | |
tree | 10b3d7ce4862c6336938aee98efb7a9d34729048 /settings/controller | |
parent | a743047e8228fb4973d99e0101dec5e6c39f81b9 (diff) | |
download | nextcloud-server-ed98cdf532ae475f4d5f5ec88afa55972cba3ba2.tar.gz nextcloud-server-ed98cdf532ae475f4d5f5ec88afa55972cba3ba2.zip |
Use OCP\Util::getVersion instead of the internal private implementation
Diffstat (limited to 'settings/controller')
-rw-r--r-- | settings/controller/appsettingscontroller.php | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/settings/controller/appsettingscontroller.php b/settings/controller/appsettingscontroller.php index d0e465bfa9c..d2430f9b559 100644 --- a/settings/controller/appsettingscontroller.php +++ b/settings/controller/appsettingscontroller.php @@ -159,7 +159,7 @@ class AppSettingsController extends Controller { if($this->ocsClient->isAppStoreEnabled()) { // apps from external repo via OCS - $ocs = $this->ocsClient->getCategories(\OC_Util::getVersion()); + $ocs = $this->ocsClient->getCategories(\OCP\Util::getVersion()); if ($ocs) { foreach($ocs as $k => $v) { $name = str_replace('ownCloud ', '', $v); @@ -205,9 +205,10 @@ class AppSettingsController extends Controller { } return ($a < $b) ? -1 : 1; }); + $version = \OCP\Util::getVersion(); foreach($apps as $key => $app) { if(!array_key_exists('level', $app) && array_key_exists('ocsid', $app)) { - $remoteAppEntry = $this->ocsClient->getApplication($app['ocsid'], \OC_Util::getVersion()); + $remoteAppEntry = $this->ocsClient->getApplication($app['ocsid'], $version); if(is_array($remoteAppEntry) && array_key_exists('level', $remoteAppEntry)) { $apps[$key]['level'] = $remoteAppEntry['level']; @@ -221,9 +222,10 @@ class AppSettingsController extends Controller { $apps = array_filter($apps, function ($app) { return !$app['active']; }); + $version = \OCP\Util::getVersion(); foreach($apps as $key => $app) { if(!array_key_exists('level', $app) && array_key_exists('ocsid', $app)) { - $remoteAppEntry = $this->ocsClient->getApplication($app['ocsid'], \OC_Util::getVersion()); + $remoteAppEntry = $this->ocsClient->getApplication($app['ocsid'], $version); if(is_array($remoteAppEntry) && array_key_exists('level', $remoteAppEntry)) { $apps[$key]['level'] = $remoteAppEntry['level']; |