Browse Source

Fix tests

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
tags/v11.0RC2
Roeland Jago Douma 7 years ago
parent
commit
7a8bf6ea26
No account linked to committer's email address
2 changed files with 9 additions and 16 deletions
  1. 9
    15
      lib/private/legacy/util.php
  2. 0
    1
      lib/public/Util.php

+ 9
- 15
lib/private/legacy/util.php View 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;
}

/**

+ 0
- 1
lib/public/Util.php View 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);
}

Loading…
Cancel
Save