Skip to content

Commit 280a452

Browse files
committed
Change updater URL
1 parent a44c1c7 commit 280a452

3 files changed

Lines changed: 14 additions & 14 deletions

File tree

config/config.sample.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -519,7 +519,7 @@
519519
/**
520520
* URL that Nextcloud should use to look for updates
521521
*/
522-
'updater.server.url' => 'https://updates.nextcloud.org/server/',
522+
'updater.server.url' => 'https://updates.nextcloud.com/update-server/',
523523

524524
/**
525525
* Is Nextcloud connected to the Internet or running in a closed network?

lib/private/Updater/VersionCheck.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ public function check() {
5959
return json_decode($this->config->getAppValue('core', 'lastupdateResult'), true);
6060
}
6161

62-
$updaterUrl = $this->config->getSystemValue('updater.server.url', 'https://updates.nextcloud.com/server/');
62+
$updaterUrl = $this->config->getSystemValue('updater.server.url', 'https://updates.nextcloud.com/update-server/');
6363

6464
$this->config->setAppValue('core', 'lastupdatedat', time());
6565

tests/lib/Updater/VersionCheckTest.php

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,8 @@ public function testCheckWithoutUpdateUrl() {
9191
$this->config
9292
->expects($this->at(1))
9393
->method('getSystemValue')
94-
->with('updater.server.url', 'https://updates.nextcloud.com/server/')
95-
->willReturn('https://updates.nextcloud.com/server/');
94+
->with('updater.server.url', 'https://updates.nextcloud.com/update-server/')
95+
->willReturnArgument(1);
9696
$this->config
9797
->expects($this->at(2))
9898
->method('setAppValue')
@@ -122,7 +122,7 @@ public function testCheckWithoutUpdateUrl() {
122122
$this->updater
123123
->expects($this->once())
124124
->method('getUrlContent')
125-
->with($this->buildUpdateUrl('https://updates.nextcloud.com/server/'))
125+
->with($this->buildUpdateUrl('https://updates.nextcloud.com/update-server/'))
126126
->will($this->returnValue($updateXml));
127127

128128
$this->assertSame($expectedResult, $this->updater->check());
@@ -137,8 +137,8 @@ public function testCheckWithInvalidXml() {
137137
$this->config
138138
->expects($this->at(1))
139139
->method('getSystemValue')
140-
->with('updater.server.url', 'https://updates.nextcloud.com/server/')
141-
->willReturn('https://updates.nextcloud.com/server/');
140+
->with('updater.server.url', 'https://updates.nextcloud.com/update-server/')
141+
->willReturnArgument(1);
142142
$this->config
143143
->expects($this->at(2))
144144
->method('setAppValue')
@@ -162,7 +162,7 @@ public function testCheckWithInvalidXml() {
162162
$this->updater
163163
->expects($this->once())
164164
->method('getUrlContent')
165-
->with($this->buildUpdateUrl('https://updates.nextcloud.com/server/'))
165+
->with($this->buildUpdateUrl('https://updates.nextcloud.com/update-server/'))
166166
->will($this->returnValue($updateXml));
167167

168168
$this->assertSame([], $this->updater->check());
@@ -184,8 +184,8 @@ public function testCheckWithEmptyValidXmlResponse() {
184184
$this->config
185185
->expects($this->at(1))
186186
->method('getSystemValue')
187-
->with('updater.server.url', 'https://updates.nextcloud.com/server/')
188-
->willReturn('https://updates.nextcloud.com/server/');
187+
->with('updater.server.url', 'https://updates.nextcloud.com/update-server/')
188+
->willReturnArgument(1);
189189
$this->config
190190
->expects($this->at(2))
191191
->method('setAppValue')
@@ -211,7 +211,7 @@ public function testCheckWithEmptyValidXmlResponse() {
211211
$this->updater
212212
->expects($this->once())
213213
->method('getUrlContent')
214-
->with($this->buildUpdateUrl('https://updates.nextcloud.com/server/'))
214+
->with($this->buildUpdateUrl('https://updates.nextcloud.com/update-server/'))
215215
->will($this->returnValue($updateXml));
216216

217217
$this->assertSame($expectedResult, $this->updater->check());
@@ -228,8 +228,8 @@ public function testCheckWithEmptyInvalidXmlResponse() {
228228
$this->config
229229
->expects($this->at(1))
230230
->method('getSystemValue')
231-
->with('updater.server.url', 'https://updates.nextcloud.com/server/')
232-
->willReturn('https://updates.nextcloud.com/server/');
231+
->with('updater.server.url', 'https://updates.nextcloud.com/update-server/')
232+
->willReturnArgument(1);
233233
$this->config
234234
->expects($this->at(2))
235235
->method('setAppValue')
@@ -253,7 +253,7 @@ public function testCheckWithEmptyInvalidXmlResponse() {
253253
$this->updater
254254
->expects($this->once())
255255
->method('getUrlContent')
256-
->with($this->buildUpdateUrl('https://updates.nextcloud.com/server/'))
256+
->with($this->buildUpdateUrl('https://updates.nextcloud.com/update-server/'))
257257
->will($this->returnValue($updateXml));
258258

259259
$this->assertSame($expectedResult, $this->updater->check());

0 commit comments

Comments
 (0)