From a9837329d697a9e18401309a1496cc3b5015bc6a Mon Sep 17 00:00:00 2001 From: eliott Date: Sat, 17 Nov 2007 00:01:58 -0800 Subject: Hand diff of simo's patch to remove flag safe functionality. Simo's original commit text: The idea of safe flagging is unclear, poorly named, misunderstood, and not even used. At the time this patch was created, less than a third of the packages in unsupported were flagged safe, and less than a tenth of users knew how to interpret it. The safe flag has been replaced by a disclaimer on the main page. --- web/lib/pkgfuncs.inc | 83 +--------------------------------------------------- 1 file changed, 1 insertion(+), 82 deletions(-) (limited to 'web/lib/pkgfuncs.inc') diff --git a/web/lib/pkgfuncs.inc b/web/lib/pkgfuncs.inc index 1d006936..a89cfa8b 100644 --- a/web/lib/pkgfuncs.inc +++ b/web/lib/pkgfuncs.inc @@ -355,15 +355,6 @@ function package_details($id=0, $SID="") { echo "CVS"; } echo "\n"; - if ($row["LocationID"] == 2) { - echo " "; - if ($row["Safe"]) { - echo "".__("The above files have been verified (by %h%s%h) and are safe to use.", array("", username_from_id($row["VerifiedBy"]), "")).""; - } else { - echo "".__("Be careful! The above files may contain malicious code that can damage your system.").""; - } - echo " \n"; - } if ($row["OutOfDate"] == 1) { echo "\n"; echo "".__("This package has been flagged out of date.").""; @@ -487,17 +478,6 @@ function package_details($id=0, $SID="") { echo ""; } - # Flag Safe Button - # - if ($row["LocationID"] == 2 && (account_from_sid($SID) == "Trusted User" || account_from_sid($SID) == "Developer")) { - if ($row["Safe"] == 0) { - echo ""; - } else { - echo ""; - } - } if ($row["OutOfDate"] == 0) { echo "\n"; print "\n"; - /* Status Safe-Unsafe */ - - # Added the code below to handle the safe package flag. - # So we can search for then for 'all' packages, 'safe' - # packages and 'unsafe' packages. - - print "\n"; - print " ".__("Status"); - print "
\n"; - - print " \n"; - print "\n"; - - /* End of Package Status */ - /* Sort by */ print "\n"; @@ -956,29 +905,6 @@ function pkg_search_page($SID="") { $q.= "MaintainerUID = 0) "; } } - - # Added the code below to handle the safe package flag. - # So we can search for then for 'all' packages, 'safe' - # packages and 'unsafe' packages. - if ($_REQUEST["PaS"] <> "all") { - # Flagged Safe - if ($_REQUEST["PaS"] == "fs") - if (!$has_where) { - $q.= "WHERE Safe = 1 "; - $has_where = 1; - } else { - $q.= "AND Safe = 1 "; - } - - # Unflagged Safe - if ($_REQUEST["PaS"] == "us") - if (!$has_where) { - $q.= "WHERE Safe = 0 AND LocationID != 3 "; - $has_where = 1; - } else { - $q.= "AND Safe = 0 AND LocationID != 3 "; - } - } $order = $_REQUEST["SO"] == 'd' ? 'DESC' : 'ASC'; @@ -1158,13 +1084,7 @@ function pkg_search_page($SID="") { } reset($pkgsearch_vars); $url.= "'>"; - - if ($row["Safe"] == 1 || $locs[$row["LocationID"]] == "community") { - $url.=""; - } - else { - $url.=""; - } + $url.=""; $url.=$row["Name"]; $url.= " ".$row["Version"].""; print $url."\n"; @@ -1243,7 +1163,6 @@ function pkg_search_page($SID="") { if ($SID) { print ' '.__("Out of Date").' '."    "; } - print ' '.__("Safe")."\n"; print " \n"; print " "; -- cgit v1.2.3-24-g4f1b