Skip to content

Show an download button instead of the updater - #1323

Merged
MorrisJobke merged 3 commits into
masterfrom
show-download-button-for-updates-atm
Sep 8, 2016
Merged

Show an download button instead of the updater#1323
MorrisJobke merged 3 commits into
masterfrom
show-download-button-for-updates-atm

Conversation

@nickvergessen

Copy link
Copy Markdown
Member

@karlitschek@schiessle as discussed

cc @LukasReschke@MorrisJobke

for testing:

diff --git a/lib/private/Updater/VersionCheck.php b/lib/private/Updater/VersionCheck.php
index 88ba9b6..eed1728 100644
--- a/lib/private/Updater/VersionCheck.php+++ b/lib/private/Updater/VersionCheck.php@@ -56,7 +56,7 @@ class VersionCheck {
public function check() {
// Look up the cache - it is invalidated all 30 minutes
if (((int)$this->config->getAppValue('core', 'lastupdatedat') + 1800) > time()) {
- return json_decode($this->config->getAppValue('core', 'lastupdateResult'), true);+ # return json_decode($this->config->getAppValue('core', 'lastupdateResult'), true);
}
$updaterUrl = $this->config->getSystemValue('updater.server.url', 'https://updates.nextcloud.com/server/');
@@ -79,7 +79,12 @@ class VersionCheck {
$url = $updaterUrl . '?version=' . $versionString;
$tmp = [];
- $xml = $this->getUrlContent($url);+ $xml = '<nextcloud>+ <version>12.0.51</version>+ <versionstring>Nextcloud 12.0.51</versionstring>+ <url>https://download.nextcloud.com/server/releases/nextcloud-12.0.51.zip</url>+ <web>https://docs.nextcloud.org/server/10/admin_manual/maintenance/upgrade.html</web>+</nextcloud>';//$this->getUrlContent($url);
if ($xml) {
$loadEntities = libxml_disable_entity_loader(true);
$data = @simplexml_load_string($xml);

@mention-bot

Copy link
Copy Markdown

@nickvergessen, thanks for your PR! By analyzing the annotation information on this pull request, we identified @LukasReschke, @blizzz and @MorrisJobke to be potential reviewers

@nickvergessennickvergessen changed the title Show an update button instead of the updaterShow an download button instead of the updaterSep 8, 2016
@schiessle

schiessle commented Sep 8, 2016

Copy link
Copy Markdown
Member

tested, works great (beside the failing unit tests 😉 ) 👍

@karlitschek

Copy link
Copy Markdown
Member

nice 👍

@nickvergessen

Copy link
Copy Markdown
MemberAuthor

forgot to change the url

@nickvergessennickvergessen added 2. developing Work in progress 3. to review Waiting for reviews and removed 3. to review Waiting for reviews 2. developing Work in progress labels Sep 8, 2016
@nickvergessen
nickvergessenforce-pushed the show-download-button-for-updates-atm branch from 511e268 to 0cec06dCompareSeptember 8, 2016 10:30
@MorrisJobke

Copy link
Copy Markdown
Member

Tested and works 👍

@MorrisJobke
MorrisJobke merged commit 7cd1369 into masterSep 8, 2016
@MorrisJobke
MorrisJobke deleted the show-download-button-for-updates-atm branch September 8, 2016 13:40
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

@nickvergessen@mention-bot@schiessle@karlitschek@MorrisJobke