summaryrefslogtreecommitdiffstats
path: root/lib/private/legacy
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2016-11-15 18:10:17 +0100
committerRoeland Jago Douma <roeland@famdouma.nl>2016-11-15 18:10:17 +0100
commit7a8bf6ea263d339a47239a2e0b934f6b79b9bbec (patch)
treea3d2fa081eea4f90382455cad17467f25c78989b /lib/private/legacy
parent028c6682935232c50ec729f38f97b2342f8363ad (diff)
downloadnextcloud-server-7a8bf6ea263d339a47239a2e0b934f6b79b9bbec.tar.gz
nextcloud-server-7a8bf6ea263d339a47239a2e0b934f6b79b9bbec.zip
Fix tests
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'lib/private/legacy')
-rw-r--r--lib/private/legacy/util.php24
1 files changed, 9 insertions, 15 deletions
diff --git a/lib/private/legacy/util.php b/lib/private/legacy/util.php
index 3ffd3bd3ccd..3bd5b5586ab 100644
--- a/lib/private/legacy/util.php
+++ b/lib/private/legacy/util.php
@@ -427,6 +427,12 @@ class OC_Util {
*/
public static function getChannel() {
OC_Util::loadVersion();
+
+ // Allow overriding update channel
+ if (\OC::$server->getSystemConfig()->getValue('installed', false)) {
+ self::$versionCache['OC_Channel'] = \OC::$server->getAppConfig()->getValue('core', 'OC_Channel');
+ }
+
return self::$versionCache['OC_Channel'];
}
@@ -457,21 +463,9 @@ class OC_Util {
self::$versionCache['OC_VersionString'] = $OC_VersionString;
/** @var $OC_Build string */
self::$versionCache['OC_Build'] = $OC_Build;
-
- // Allow overriding update channel
- if (\OC::$server->getSystemConfig()->getValue('installed', false)) {
- $channel = \OC::$server->getAppConfig()->getValue('core', 'OC_Channel');
- } else {
- /** @var $OC_Channel string */
- $channel = $OC_Channel;
- }
-
- if (!is_null($channel)) {
- self::$versionCache['OC_Channel'] = $channel;
- } else {
- /** @var $OC_Channel string */
- self::$versionCache['OC_Channel'] = $OC_Channel;
- }
+
+ /** @var $OC_Channel string */
+ self::$versionCache['OC_Channel'] = $OC_Channel;
}
/**