Fix the update from NC 10 and 11 to the latest NC 11

Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
Joas Schilling 2017-03-30 15:31:50 +02:00
parent 0b17068c9e
commit cf8a680b97
No known key found for this signature in database
GPG key ID: E166FD8976B3BAC8

View file

@ -71,6 +71,22 @@ class Updater extends BasicEmitter {
4 => 'Fatal',
];
static protected $validNextcloudReleases = [
'11.0.2.7',
'11.0.2.0',
'11.0.1.2',
'11.0.1.1',
'11.0.0.10',
'11.0.0.7',
'9.1.4.2',
'9.1.4.0',
'9.1.3.2',
'9.1.3.1',
'9.1.1.5',
'9.1.1.0',
'9.1.0.15',
];
/**
* @param IConfig $config
* @param Checker $checker
@ -190,6 +206,13 @@ class Updater extends BasicEmitter {
$this->config->getSystemValue('debug', false));
}
if ($currentVendor === '') {
// Installed Nextcloud 10 or 11 where the install didn't set the vendor?
if (in_array($oldVersion, self::$validNextcloudReleases, true)) {
return true;
}
}
// Check if the instance can be migrated
return isset($allowedPreviousVersions[$currentVendor][$majorMinor]);
}