/[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 57 by atomo64-guest, Thu Nov 29 02:07:23 2007 UTC revision 58 by atomo64-guest, Thu Nov 29 03:48:02 2007 UTC
# Line 246  function db_query($pkg,$dist) { Line 246  function db_query($pkg,$dist) {
246              $uscan_res=uscan_foo($res_array['name'] ,$res_array['version'],$res_array['watch']);              $uscan_res=uscan_foo($res_array['name'] ,$res_array['version'],$res_array['watch']);
247              print "Version Upstream => " . $uscan_res[0] . "\n";              print "Version Upstream => " . $uscan_res[0] . "\n";
248              print "Watch => " . $res_array['watch'];              print "Watch => " . $res_array['watch'];
249              print "Watch Warings => " . $uscan_res[1];              print "Watch Warnings => " . $uscan_res[1];
250          }          }
251          else print "Watch => Not present" . "\n";          else print "Watch => Not present" . "\n";
252            if ($res_array['wwiz_type']) {
253                $uscan_res=uscan_foo($res_array['name'] ,$res_array['version'],$res_array['wwiz']);
254                print "WWiz Upstream => " . $uscan_res[0] . "\n";
255                print "WWiz => " . $res_array['wwiz'];
256                print "WWiz Warings => " . $uscan_res[1];
257            }
258            print "\n";
259      }      }
260      else echo "Package=> " . $pkg . "\nNot found\n!!";      else echo "Package=> " . $pkg . "\nNot found\n!!";
261      pg_close($db);      pg_close($db);
# Line 672  function watch_fill($src_name='%'){ Line 679  function watch_fill($src_name='%'){
679    
680              }              }
681    
682              if (preg_match ('#((ftp://|http://)\S+(html|htm|/(?(?=.+(tar|tgz|zip))|[^>\s\)\a]+)))#i',$contents,$matches)) {              if (preg_match ('#((ftp://|http://|https://)\S+(html|htm|/(?(?=.+(tar|tgz|zip))|[^>\s\)\a]+)))#i',$contents,$matches)) {
683                  $final=substr($matches[1],-1);                  $final=substr($matches[1],-1);
684                  if ($final=='.') {                  if ($final=='.') {
685                      $matches[1]=substr($matches[1],0,-1);                      $matches[1]=substr($matches[1],0,-1);
686                      $final=substr($matches[1],-1);                      $final=substr($matches[1],-1);
687                  }                  }
688                  if ($matches[2]=="http://") {                  if ($matches[2]=="http://" || $matches[2]=="https://") {
689                      $space=' ' . "(?:.*/)?";                      $space=' ' . "(?:.*/)?";
690                  } elseif ($final!='/') {                  } elseif ($final!='/') {
691                      $matches[1].='/';                      $matches[1].='/';
692                  }                  }
693                  $generatedWatches[]=preg_replace("#((http|ftp)://.+):(.*)#i",'$1' . '$3', $matches[1],1);                  $generatedWatches[]=preg_replace("#((http|https|ftp)://.+):(.*)#i",'$1' . '$3', $matches[1],1);
694              }              }
695    
696              if (preg_match ('#((ftp|http)\.\S+(html|htm|/(?(?=.+(tar|tgz|zip))|[^>\s\)\a]+)))#i',$contents,$matches)) {              if (preg_match ('#((ftp|http)\.\S+(html|htm|/(?(?=.+(tar|tgz|zip))|[^>\s\)\a]+)))#i',$contents,$matches)) {
# Line 698  function watch_fill($src_name='%'){ Line 705  function watch_fill($src_name='%'){
705                  } elseif ($final!='/') {                  } elseif ($final!='/') {
706                      $matches[1].='/';                      $matches[1].='/';
707                  }                  }
708                  $generatedWatches[]=array('url'=>preg_replace("#((http|ftp)\.(.+)):(.*)#i",'$2.$3' . '$4', $matches[1],1), 'space'=>$space);                  $generatedWatches[]=array('url'=>preg_replace("#((http|ftp)\.(.+)):(.*)#i",'$2://$2.$3' . '$4', $matches[1],1), 'space'=>$space);
709              }              }
710    
711              if (empty($generatedWatches)) {              if (empty($generatedWatches)) {
# Line 720  function watch_fill($src_name='%'){ Line 727  function watch_fill($src_name='%'){
727    
728                          $uscan_res=uscan_foo($res_array['name'] ,$res_array['version'],$watch);                          $uscan_res=uscan_foo($res_array['name'] ,$res_array['version'],$watch);
729    
730                          if ($uscan_res[3]) {                          if ($uscan_res[0]) {
731                              break 2;                              break 2;
732                          }                          }
733                      }                      }

Legend:
Removed from v.57  
changed lines
  Added in v.58

  ViewVC Help
Powered by ViewVC 1.1.5