Fix tests

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
This commit is contained in:
Roeland Jago Douma 2016-11-15 18:10:17 +01:00
parent 028c668293
commit 7a8bf6ea26
No known key found for this signature in database
GPG Key ID: F941078878347C0C
2 changed files with 9 additions and 16 deletions

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;
}
/**

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);
}