/[dehs]/trunk/dehs_pg.php
ViewVC logotype

Diff of /trunk/dehs_pg.php

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 28 by evaso-guest, Wed Aug 4 19:31:38 2004 UTC revision 29 by evaso-guest, Thu Aug 5 01:46:54 2004 UTC
# Line 278  return array("md5"=>$matches[1],"bytes"= Line 278  return array("md5"=>$matches[1],"bytes"=
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;
# Line 623  function watch_fill($src_name='%'){ Line 628  function watch_fill($src_name='%'){
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] ."'");

Legend:
Removed from v.28  
changed lines
  Added in v.29

  ViewVC Help
Powered by ViewVC 1.1.5