From a8999a691777a96ea07f53a479a154b743712a46 Mon Sep 17 00:00:00 2001 From: pjmattal Date: Fri, 29 Jul 2005 12:29:23 +0000 Subject: added swiergot's checking patch as well as modifying it to also list package name in green on the package list page (with legend) --- web/lib/pkgfuncs.inc | 38 +++++++++++++++++++++++++++++++++++--- 1 file changed, 35 insertions(+), 3 deletions(-) (limited to 'web/lib') diff --git a/web/lib/pkgfuncs.inc b/web/lib/pkgfuncs.inc index 2eb47d4..ca25125 100644 --- a/web/lib/pkgfuncs.inc +++ b/web/lib/pkgfuncs.inc @@ -334,6 +334,15 @@ function package_details($id=0, $SID="") { print "CVS"; } print "\n"; + if ($row["LocationID"] == 2) { + print "\n"; + print " "; + if ($row["Safe"]) { + print "".__("The above files have been verified (by %s) and are safe to use.", array(username_from_id($row["VerifiedBy"]))).""; + } else { + print "".__("Be careful! The above files may contain malicious code that can damage your system.").""; + } + } print "\n"; print " "; print "\n"; @@ -429,6 +438,21 @@ function package_details($id=0, $SID="") { print ""; } + # Flag Safe Button + # + if ($row["LocationID"] == 2 && (account_from_sid($SID) == "Trusted User" || account_from_sid($SID) == "Developer")) + { + if ($row["Safe"] == 0) + { + print ""; + } + else + { + print ""; + } + } print "\n"; print "
\n"; } @@ -857,7 +881,7 @@ function pkg_search_page($SID="") { } if ($row["MaintainerUID"]==0 && $row["AURMaintainerUID"]==0) { print ""; - } + } print ""; # if ($i == 0) { # $all_ids = $row["ID"]; @@ -889,7 +913,14 @@ function pkg_search_page($SID="") { } } reset($pkgsearch_vars); - $url.= "'>".$row["Name"]; + $url.= "'>"; + if ($row["Safe"] == 1) { + $url.=""; + } + else { + $url.=""; + } + $url.=$row["Name"]; $url.= " ".$row["Version"]."
"; print $url."\n"; print " "; @@ -961,7 +992,8 @@ function pkg_search_page($SID="") { if ($SID) { print " \n"; print " ".__("O%hrphan", array(''))."    \n"; - print " ".__("O%hut-of-Date", array(''))."\n"; + print " ".__("O%hut-of-Date", array(''))."    "; + print ' '.__("Safe")."\n"; print " \n"; } print " "; -- cgit v1.2.3-54-g00ecf