]> source.dussan.org Git - nextcloud-server.git/commitdiff
Fix tests 2144/head
authorRoeland Jago Douma <roeland@famdouma.nl>
Tue, 15 Nov 2016 17:10:17 +0000 (18:10 +0100)
committerRoeland Jago Douma <roeland@famdouma.nl>
Tue, 15 Nov 2016 17:10:17 +0000 (18:10 +0100)
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
lib/private/legacy/util.php
lib/public/Util.php

index 3ffd3bd3ccdebe55f97f69ac5df1b5e632de37c3..3bd5b5586abad6c70e3ba66f6df7bbff912b0e24 100644 (file)
@@ -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;
        }
 
        /**
index 08661fd88ca45b8075f0627a42fd9b25afe67380..8a7c89976131dee1e0e5cd9c170dba9f31181e93 100644 (file)
@@ -83,7 +83,6 @@ class Util {
         */
        public static function setChannel($channel) {
                //Flush timestamp to reload version.php
-               \OC::$server->getSession()->set('OC_Version_Timestamp', 0);
                \OC::$server->getAppConfig()->setValue('core', 'OC_Channel', $channel);
                \OC::$server->getConfig()->setSystemValue('updater.release.channel', $channel);
        }