| 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); |
| 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)) { |
| 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)) { |
| 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 |
} |
} |