aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2017-05-17 11:18:43 +0200
committerJoas Schilling <coding@schilljs.com>2017-05-18 10:49:04 +0200
commitdd6c9cb03d8a81c242c34f3d3c2f79090b383779 (patch)
tree10bd55943d6209369a21c3f6b9f749c7b5cd88ca /lib
parent2259140e3b0157bd6acc80418c80a5ec05796993 (diff)
downloadnextcloud-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')
-rw-r--r--lib/private/Updater.php13
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]);
}
/**