Skip to content

Commit

Permalink
disable upgrades to 26 on 32-bit
Browse files Browse the repository at this point in the history
Signed-off-by: Simon L <szaimen@e.mail.de>
  • Loading branch information
szaimen committed Nov 17, 2022
1 parent 804e139 commit 5649b58
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
6 changes: 5 additions & 1 deletion index.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
*
*/


class UpdateException extends \Exception {
protected $data;

Expand Down Expand Up @@ -167,6 +166,11 @@ public function checkForUpdate() {
$versionString = isset($response['versionstring']) ? $response['versionstring'] : '';

if ($version !== '' && $version !== $this->currentVersion) {
if (PHP_INT_SIZE < 8 && version_compare($version, '26.0.0.0', '>=')) {
$this->updateAvailable = false;
$updateText = '<br />You are running a 32-bit system. Nextcloud 26 supports 64-bit only, therefore an update cannot be offered. Please switch to a 64-bit system first.';
return $updateText;
}
$this->updateAvailable = true;
$releaseChannel = $this->getCurrentReleaseChannel();
$updateText = 'Update to ' . htmlentities($versionString) . ' available. (channel: "' . htmlentities($releaseChannel) . '")<br /><span class="light">Following file will be downloaded automatically:</span> <code class="light">' . $response['url'] . '</code>';
Expand Down
5 changes: 5 additions & 0 deletions lib/Updater.php
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,11 @@ public function checkForUpdate() {
$versionString = isset($response['versionstring']) ? $response['versionstring'] : '';

if ($version !== '' && $version !== $this->currentVersion) {
if (PHP_INT_SIZE < 8 && version_compare($version, '26.0.0.0', '>=')) {
$this->updateAvailable = false;
$updateText = '<br />You are running a 32-bit system. Nextcloud 26 supports 64-bit only, therefore an update cannot be offered. Please switch to a 64-bit system first.';
return $updateText;
}
$this->updateAvailable = true;
$releaseChannel = $this->getCurrentReleaseChannel();
$updateText = 'Update to ' . htmlentities($versionString) . ' available. (channel: "' . htmlentities($releaseChannel) . '")<br /><span class="light">Following file will be downloaded automatically:</span> <code class="light">' . $response['url'] . '</code>';
Expand Down

0 comments on commit 5649b58

Please sign in to comment.