Allow migrating from ownCloud 10.0.0

Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
Joas Schilling 2017-05-17 11:18:43 +02:00
parent 2259140e3b
commit dd6c9cb03d
No known key found for this signature in database
GPG Key ID: E166FD8976B3BAC8
2 changed files with 13 additions and 1 deletions

View File

@ -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]);
}
/**

View File

@ -37,6 +37,7 @@ $OC_VersionCanBeUpgradedFrom = [
'12.0' => true,
],
'owncloud' => [
'10.0.0.12' => true,
],
];