[Dehs-devel] r58 - trunk

atomo64-guest at alioth.debian.org atomo64-guest at alioth.debian.org
Thu Nov 29 03:48:03 UTC 2007


Author: atomo64-guest
Date: 2007-11-29 03:48:02 +0000 (Thu, 29 Nov 2007)
New Revision: 58

Modified:
   trunk/dehs_pg.php
Log:
Display wwiz info on db_query
Fixed some wwiz-related mistakes of my previous commit


Modified: trunk/dehs_pg.php
===================================================================
--- trunk/dehs_pg.php	2007-11-29 02:07:23 UTC (rev 57)
+++ trunk/dehs_pg.php	2007-11-29 03:48:02 UTC (rev 58)
@@ -246,9 +246,16 @@
             $uscan_res=uscan_foo($res_array['name'] ,$res_array['version'],$res_array['watch']);
             print "Version Upstream => " . $uscan_res[0] . "\n";
             print "Watch => " . $res_array['watch'];
-            print "Watch Warings => " . $uscan_res[1];
+            print "Watch Warnings => " . $uscan_res[1];
         }
         else print "Watch => Not present" . "\n";
+        if ($res_array['wwiz_type']) {
+            $uscan_res=uscan_foo($res_array['name'] ,$res_array['version'],$res_array['wwiz']);
+            print "WWiz Upstream => " . $uscan_res[0] . "\n";
+            print "WWiz => " . $res_array['wwiz'];
+            print "WWiz Warings => " . $uscan_res[1];
+        }
+	print "\n";
     }
     else echo "Package=> " . $pkg . "\nNot found\n!!";
     pg_close($db);
@@ -672,18 +679,18 @@
 
             }
 
-            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)) {
                 $final=substr($matches[1],-1);
                 if ($final=='.') {
                     $matches[1]=substr($matches[1],0,-1);
                     $final=substr($matches[1],-1);
                 }
-                if ($matches[2]=="http://") {
+                if ($matches[2]=="http://" || $matches[2]=="https://") {
                     $space=' ' . "(?:.*/)?";
                 } elseif ($final!='/') {
                     $matches[1].='/';
                 }
-                $generatedWatches[]=preg_replace("#((http|ftp)://.+):(.*)#i",'$1' . '$3', $matches[1],1);
+                $generatedWatches[]=preg_replace("#((http|https|ftp)://.+):(.*)#i",'$1' . '$3', $matches[1],1);
             }
 
             if (preg_match ('#((ftp|http)\.\S+(html|htm|/(?(?=.+(tar|tgz|zip))|[^>\s\)\a]+)))#i',$contents,$matches)) {
@@ -698,7 +705,7 @@
                 } elseif ($final!='/') {
                     $matches[1].='/';
                 }
-                $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);
             }
 
             if (empty($generatedWatches)) {
@@ -720,7 +727,7 @@
 
                         $uscan_res=uscan_foo($res_array['name'] ,$res_array['version'],$watch);
 
-                        if ($uscan_res[3]) {
+                        if ($uscan_res[0]) {
                             break 2;
                         }
                     }




More information about the Dehs-devel mailing list