From e7695576b78f8f7460783a874c0c5b1797195b1c Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Tue, 4 Apr 2017 15:49:14 +0200 Subject: improv. multi-version case --- checkpkgist.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'checkpkgist.php') diff --git a/checkpkgist.php b/checkpkgist.php index a91e1ab..e853081 100755 --- a/checkpkgist.php +++ b/checkpkgist.php @@ -81,13 +81,14 @@ function getMax($name, $rpm) { $crt = 0; $max = 9999; - if (preg_match('/[0-9]+$/', $rpm, $reg)) { - // This already a versionned name - $crt = intval($reg[0]); - } if (isset($vers[$rpm])) { $crt = $vers[$rpm]; $max = $crt+1; + + } else if (preg_match('/[0-9]+$/', $rpm, $reg)) { + // This already a versionned name + $crt = intval($reg[0]); + $max = $crt+1; } foreach($rpms as $alt) { if ($alt != $rpm && preg_match('/[0-9]+$/', $alt, $reg)) { -- cgit