Merge pull request #7245 from nextcloud/feature/noid/allow-migration-from-comingup-oc-release

Allow migration from upcoming 10.0.4 ownCloud release
This commit is contained in:
Morris Jobke 2017-11-23 13:46:08 +01:00 committed by GitHub
commit 59657542ca
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 2 deletions

View File

@ -188,6 +188,7 @@ class Updater extends BasicEmitter {
public function isUpgradePossible($oldVersion, $newVersion, array $allowedPreviousVersions) {
$version = explode('.', $oldVersion);
$majorMinor = $version[0] . '.' . $version[1];
$patch = $version[0] . '.' . $version[1] . '.' . $version[2];
$currentVendor = $this->config->getAppValue('core', 'vendor', '');
@ -199,7 +200,8 @@ class Updater extends BasicEmitter {
'11.0.0.10',
], true)) {
$currentVendor = 'nextcloud';
} else if (isset($allowedPreviousVersions['owncloud'][$oldVersion])) {
} else if (isset($allowedPreviousVersions['owncloud'][$oldVersion])
|| isset($allowedPreviousVersions['owncloud'][$patch])) {
$currentVendor = 'owncloud';
}
}
@ -212,7 +214,8 @@ class Updater extends BasicEmitter {
// Check if the instance can be migrated
return isset($allowedPreviousVersions[$currentVendor][$majorMinor]) ||
isset($allowedPreviousVersions[$currentVendor][$oldVersion]);
isset($allowedPreviousVersions[$currentVendor][$oldVersion]) ||
isset($allowedPreviousVersions[$currentVendor][$patch]);
}
/**

View File

@ -41,6 +41,7 @@ $OC_VersionCanBeUpgradedFrom = [
'10.0.1.5' => true,
'10.0.2.1' => true,
'10.0.3.3' => true,
'10.0.4' => true, // TODO adjust to 4 digits once it is final
],
];