Fix tests
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
This commit is contained in:
parent
028c668293
commit
7a8bf6ea26
|
@ -427,6 +427,12 @@ class OC_Util {
|
||||||
*/
|
*/
|
||||||
public static function getChannel() {
|
public static function getChannel() {
|
||||||
OC_Util::loadVersion();
|
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'];
|
return self::$versionCache['OC_Channel'];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -458,21 +464,9 @@ class OC_Util {
|
||||||
/** @var $OC_Build string */
|
/** @var $OC_Build string */
|
||||||
self::$versionCache['OC_Build'] = $OC_Build;
|
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 */
|
/** @var $OC_Channel string */
|
||||||
self::$versionCache['OC_Channel'] = $OC_Channel;
|
self::$versionCache['OC_Channel'] = $OC_Channel;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* generates a path for JS/CSS files. If no application is provided it will create the path for core.
|
* generates a path for JS/CSS files. If no application is provided it will create the path for core.
|
||||||
|
|
|
@ -83,7 +83,6 @@ class Util {
|
||||||
*/
|
*/
|
||||||
public static function setChannel($channel) {
|
public static function setChannel($channel) {
|
||||||
//Flush timestamp to reload version.php
|
//Flush timestamp to reload version.php
|
||||||
\OC::$server->getSession()->set('OC_Version_Timestamp', 0);
|
|
||||||
\OC::$server->getAppConfig()->setValue('core', 'OC_Channel', $channel);
|
\OC::$server->getAppConfig()->setValue('core', 'OC_Channel', $channel);
|
||||||
\OC::$server->getConfig()->setSystemValue('updater.release.channel', $channel);
|
\OC::$server->getConfig()->setSystemValue('updater.release.channel', $channel);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue