From cf8a680b97a86bfa6510f4e43cdd9df874980c88 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Thu, 30 Mar 2017 15:31:50 +0200 Subject: [PATCH] Fix the update from NC 10 and 11 to the latest NC 11 Signed-off-by: Joas Schilling --- lib/private/Updater.php | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/lib/private/Updater.php b/lib/private/Updater.php index acd8a078370..8cb987b30fe 100644 --- a/lib/private/Updater.php +++ b/lib/private/Updater.php @@ -71,6 +71,22 @@ class Updater extends BasicEmitter { 4 => 'Fatal', ]; + static protected $validNextcloudReleases = [ + '11.0.2.7', + '11.0.2.0', + '11.0.1.2', + '11.0.1.1', + '11.0.0.10', + '11.0.0.7', + '9.1.4.2', + '9.1.4.0', + '9.1.3.2', + '9.1.3.1', + '9.1.1.5', + '9.1.1.0', + '9.1.0.15', + ]; + /** * @param IConfig $config * @param Checker $checker @@ -190,6 +206,13 @@ class Updater extends BasicEmitter { $this->config->getSystemValue('debug', false)); } + if ($currentVendor === '') { + // Installed Nextcloud 10 or 11 where the install didn't set the vendor? + if (in_array($oldVersion, self::$validNextcloudReleases, true)) { + return true; + } + } + // Check if the instance can be migrated return isset($allowedPreviousVersions[$currentVendor][$majorMinor]); } -- 2.39.5