[Dehs-devel] r51 - trunk/www
atomo64-guest at alioth.debian.org
atomo64-guest at alioth.debian.org
Tue Nov 27 03:59:28 UTC 2007
Author: atomo64-guest
Date: 2007-11-27 03:59:28 +0000 (Tue, 27 Nov 2007)
New Revision: 51
Modified:
trunk/www/no_watch.php
Log:
Updated vers_conv from qa's developer.php code
Modified: trunk/www/no_watch.php
===================================================================
--- trunk/www/no_watch.php 2007-11-27 01:08:42 UTC (rev 50)
+++ trunk/www/no_watch.php 2007-11-27 03:59:28 UTC (rev 51)
@@ -124,7 +124,12 @@
else return 0;
}
function vers_conv($debvers) {
-preg_match("/(.+)(ds-|-)/",$debvers,$matches);
-return $matches[1];
+ preg_match("/(.+:)?([^-]+)(ds|dfsg|debian)/",$debvers,$matches);
+ if (!$matches[3]) {
+ unset($matches);
+ preg_match("/(.+:)?([^-]+)/",$debvers,$matches);
+ }
+ if (substr($matches[2],-1)=='.') $matches[2]=substr($matches[2],0,-1);
+ return $matches[2];
}
?>
More information about the Dehs-devel
mailing list