| 278 |
} |
} |
| 279 |
|
|
| 280 |
function vers_conv($debvers) { |
function vers_conv($debvers) { |
| 281 |
preg_match("/(.+:)?(.+)(ds-|-)/",$debvers,$matches); |
preg_match("/(.+:)?([^-]+)(ds|dsfg|debian)/",$debvers,$matches); |
| 282 |
return $matches[2]; |
if (!$matches[3]) { |
| 283 |
|
unset($matches); |
| 284 |
|
preg_match("/(.+:)?([^-]+)/",$debvers,$matches); |
| 285 |
|
} |
| 286 |
|
if (substr($matches[2],-1)=='.') $matches[2]=substr($matches[2],0,-1); |
| 287 |
|
return $matches[2]; |
| 288 |
} |
} |
| 289 |
function check_db() { |
function check_db() { |
| 290 |
global $dirs,$dbconn; |
global $dirs,$dbconn; |
| 628 |
} |
} |
| 629 |
else $depured_debian_name=$res_array[name]; |
else $depured_debian_name=$res_array[name]; |
| 630 |
$watch="version=2\n" . |
$watch="version=2\n" . |
| 631 |
$matches[1] . $space . $depured_debian_name . "-?_?([\d+\.]+|\d+)(\.tar|\.tgz)(\.gz|\.bz2|) debian uupdate"; |
$matches[1] . $space . $depured_debian_name . "-?_?([\w+\d+\.]+|\d+)(\.tar|\.tgz)(\.gz|\.bz2|) debian uupdate"; |
| 632 |
$uscan_res=uscan_foo($res_array['name'] ,$res_array['version'],$watch); |
$uscan_res=uscan_foo($res_array['name'] ,$res_array['version'],$watch); |
| 633 |
if ($uscan_res[1] AND !$uscan_res[0]) { |
if ($uscan_res[1] AND !$uscan_res[0]) { |
| 634 |
pg_exec($db, "UPDATE pkgs SET wwiz_version=NULL, wwiz='" . addslashes($uscan_res[1]) . "', wwiz_type='error', up_url='', up_changes='', keep_changes='f' where name='" . $res_array[name] . "' AND dist='" . $res_array[dist] ."'"); |
pg_exec($db, "UPDATE pkgs SET wwiz_version=NULL, wwiz='" . addslashes($uscan_res[1]) . "', wwiz_type='error', up_url='', up_changes='', keep_changes='f' where name='" . $res_array[name] . "' AND dist='" . $res_array[dist] ."'"); |