Allow migration from upcoming 10.0.4 ownCloud release

Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
Joas Schilling 2017-11-22 14:02:22 +01:00
parent 44d6fe99ef
commit 2c11d62adf
No known key found for this signature in database
GPG Key ID: 7076EA9751AACDDA
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
],
];