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.
This commit is contained in:
eliott 2007-11-17 00:01:58 -08:00 committed by Dan McGee
parent 6dbe12264a
commit a9837329d6
5 changed files with 2 additions and 177 deletions

View file

@ -210,11 +210,6 @@ $result = db_query($q, $dbh);
$row = mysql_fetch_row($result);
$update_count = $row[0];
$q = "SELECT count(*) FROM Packages,PackageLocations WHERE Packages.LocationID = PackageLocations.ID AND PackageLocations.Location = 'unsupported' AND Packages.Safe = 1";
$result = db_query($q, $dbh);
$row = mysql_fetch_row($result);
$safe_count = $row[0];
# Added the user statistcs.
# Added by: dsa <dsandrade@gmail.com>
$user = username_from_sid($_COOKIE["AURSID"]);
@ -270,30 +265,6 @@ if (!empty($user)) {
print "</td>";
print "<td class='boxSoft'><span class='f4'>$flagged_outdated</span></td>";
print "</tr>";
# Number of safe packages
print "<tr>";
print "<td class='boxSoft'>";
if ($atype == 'Trusted User' || $atype == 'Developer') {
$q = "SELECT count(*) FROM Packages,Users WHERE Packages.Safe = 1 AND Packages.VerifiedBy = Users.ID AND Users.Username='".mysql_real_escape_string($user)."'";
$result = db_query($q, $dbh);
$row = mysql_fetch_row($result);
$flagged_safe = $row[0];
print "<span class='f4'>".__("Flagged as safe by me")."</span>";
}
else
{
$q = "SELECT count(*) FROM Packages,Users WHERE Packages.Safe = 1 AND Packages.MaintainerUID = Users.ID AND Users.Username='".mysql_real_escape_string($user)."'";
$result = db_query($q, $dbh);
$row = mysql_fetch_row($result);
$flagged_safe = $row[0];
print "<span class='f4'>".__("Flagged as safe")."</span>";
}
print "</td>";
print "<td class='boxSoft'><span class='f4'>$flagged_safe</span></td>";
print "</tr>";
print "</table><br />";
}
@ -313,13 +284,6 @@ print "</td>";
print "<td class='boxSoft'><span class='f4'>$unsupported_count</span></td>";
print "</tr>";
print "<tr>";
print "<td class='boxSoft'>";
print "<span class='f4'>".__("Packages in unsupported and flagged as safe")."</span>";
print "</td>";
print "<td class='boxSoft'><span class='f4'>$safe_count</span></td>";
print "</tr>";
print "<tr>";
print "<td class='boxSoft'>";
print "<span class='f4'>".__("Packages in [community]")."</span>";
@ -356,6 +320,7 @@ print "</tr>\n";
print "</table>\n";
echo "</div>\n";
# End Table 1
echo "<span class='f4'>".__("DISCLAIMER: Unsupported PKGBUILDs are user produced content, by downloading them you agree to do so at your own risk.")."</span>";
echo " </div>";
echo "</div>";
html_footer(AUR_VERSION);