Merge pull request #9320 from tobiasd/20200929-adminHotfixVersions

Hotfix releases were not detected in the admin panel
pull/9327/head
Michael Vogel 2020-09-29 08:31:59 +02:00 committed by GitHub
commit 8fb3aa47dd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -161,8 +161,9 @@ class Federation extends BaseAdmin
$newVC = $vv['total']; $newVC = $vv['total'];
$newVV = $vv['version']; $newVV = $vv['version'];
$lastDot = strrpos($newVV, '.'); $lastDot = strrpos($newVV, '.');
$firstDash = strpos($newVV, '-');
$len = strlen($newVV) - 1; $len = strlen($newVV) - 1;
if (($lastDot == $len - 4) && (!strrpos($newVV, '-rc') == $len - 3)) { if (($lastDot == $len - 4) && (!strrpos($newVV, '-rc') == $len - 3) && (!$firstDash == $len - 1)) {
$newVV = substr($newVV, 0, $lastDot); $newVV = substr($newVV, 0, $lastDot);
} }
if (isset($newV[$newVV])) { if (isset($newV[$newVV])) {