Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2016-12-06 01:46:20 +0300
committerMorris Jobke <hey@morrisjobke.de>2016-12-06 02:19:13 +0300
commit7aa510b2f04bbe5e71021f41bf9f8be6c3da9ed5 (patch)
tree91cd24b2804665e61a8990c1236c10ac94982040
parent572b078de7e139de748ea829876b4b1b04b306bb (diff)
Document updater channel & check for correct PHP version in updater
* see https://github.com/nextcloud/updater/issues/53 Signed-off-by: Morris Jobke <hey@morrisjobke.de>
-rw-r--r--config/config.sample.php11
-rw-r--r--lib/private/Updater/VersionCheck.php3
-rw-r--r--tests/lib/Updater/VersionCheckTest.php2
3 files changed, 15 insertions, 1 deletions
diff --git a/config/config.sample.php b/config/config.sample.php
index 50b163d254a..2722865c8e5 100644
--- a/config/config.sample.php
+++ b/config/config.sample.php
@@ -534,6 +534,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?
*/
'has_internet_connection' => true,
diff --git a/lib/private/Updater/VersionCheck.php b/lib/private/Updater/VersionCheck.php
index f66e109fd26..ae3840a7fa5 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 c85516c320e..79c0a88dbf6 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() {