diff --git a/config/config.sample.php b/config/config.sample.php index 50b163d254a91d39b61137944d20e4a3d0c170b0..2722865c8e5f8b246919923d0905202473546d21 100644 --- a/config/config.sample.php +++ b/config/config.sample.php @@ -533,6 +533,17 @@ $CONFIG = array( */ 'updater.server.url' => 'https://updates.nextcloud.com/updater_server/', +/** + * The channel that Nextcloud should use to look for updates + * + * Supported values: + * - ``daily`` + * - ``beta` + * - ``stable`` + * - ``production`` + */ +'updater.release.channel' => 'stable', + /** * Is Nextcloud connected to the Internet or running in a closed network? */ diff --git a/lib/private/Updater/VersionCheck.php b/lib/private/Updater/VersionCheck.php index f66e109fd267746635614e4d2ce1e16ef93bdfe7..ae3840a7fa5743b256aa8a335693e709843aab6a 100644 --- a/lib/private/Updater/VersionCheck.php +++ b/lib/private/Updater/VersionCheck.php @@ -73,6 +73,9 @@ class VersionCheck { $version['updatechannel'] = \OC_Util::getChannel(); $version['edition'] = ''; $version['build'] = \OC_Util::getBuild(); + $version['php_major'] = PHP_MAJOR_VERSION; + $version['php_minor'] = PHP_MINOR_VERSION; + $version['php_release'] = PHP_RELEASE_VERSION; $versionString = implode('x', $version); //fetch xml data from updater diff --git a/tests/lib/Updater/VersionCheckTest.php b/tests/lib/Updater/VersionCheckTest.php index c85516c320ebde20373b46202048308fc5321c95..79c0a88dbf6548d902c67348a58f87b161cebb13 100644 --- a/tests/lib/Updater/VersionCheckTest.php +++ b/tests/lib/Updater/VersionCheckTest.php @@ -52,7 +52,7 @@ class VersionCheckTest extends \Test\TestCase { * @return string */ private function buildUpdateUrl($baseUrl) { - return $baseUrl . '?version='.implode('x', Util::getVersion()).'xinstalledatxlastupdatedatx'.\OC_Util::getChannel().'xx'; + return $baseUrl . '?version='.implode('x', Util::getVersion()).'xinstalledatxlastupdatedatx'.\OC_Util::getChannel().'xxx'.PHP_MAJOR_VERSION.'x'.PHP_MINOR_VERSION.'x'.PHP_RELEASE_VERSION; } public function testCheckInCache() {