diff options
author | Joas Schilling <coding@schilljs.com> | 2017-05-17 11:18:43 +0200 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2017-05-18 10:49:04 +0200 |
commit | dd6c9cb03d8a81c242c34f3d3c2f79090b383779 (patch) | |
tree | 10bd55943d6209369a21c3f6b9f749c7b5cd88ca /lib/private/Updater.php | |
parent | 2259140e3b0157bd6acc80418c80a5ec05796993 (diff) | |
download | nextcloud-server-dd6c9cb03d8a81c242c34f3d3c2f79090b383779.tar.gz nextcloud-server-dd6c9cb03d8a81c242c34f3d3c2f79090b383779.zip |
Allow migrating from ownCloud 10.0.0
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib/private/Updater.php')
-rw-r--r-- | lib/private/Updater.php | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/lib/private/Updater.php b/lib/private/Updater.php index 6f81e6175f3..5ca493e0edc 100644 --- a/lib/private/Updater.php +++ b/lib/private/Updater.php @@ -190,6 +190,16 @@ class Updater extends BasicEmitter { $majorMinor = $version[0] . '.' . $version[1]; $currentVendor = $this->config->getAppValue('core', 'vendor', ''); + + // Vendor was not set correctly on install, so we have to white-list known versions + if ($currentVendor === '') { + if (in_array($oldVersion, [ + '10.0.0.12', + ], true)) { + $currentVendor = 'owncloud'; + } + } + if ($currentVendor === 'nextcloud') { return isset($allowedPreviousVersions[$currentVendor][$majorMinor]) && (version_compare($oldVersion, $newVersion, '<=') || @@ -197,7 +207,8 @@ class Updater extends BasicEmitter { } // Check if the instance can be migrated - return isset($allowedPreviousVersions[$currentVendor][$majorMinor]); + return isset($allowedPreviousVersions[$currentVendor][$majorMinor]) || + isset($allowedPreviousVersions[$currentVendor][$oldVersion]); } /** |