mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
My Statistics instead of User Statistics. For TUs show number of packages they flagged safe, not number of their packages that were flagged safe.
This commit is contained in:
parent
500f44abd9
commit
e793e25823
1 changed files with 18 additions and 7 deletions
|
@ -233,16 +233,11 @@ if (!empty($user)) {
|
|||
$row = mysql_fetch_row($result);
|
||||
$flagged_outdated = $row[0];
|
||||
|
||||
$q = "SELECT count(*) FROM Packages,Users WHERE Packages.Safe = 1 AND Packages.MaintainerUID = Users.ID AND Users.Username='$user'";
|
||||
$result = db_query($q, $dbh);
|
||||
$row = mysql_fetch_row($result);
|
||||
$flagged_safe = $row[0];
|
||||
|
||||
print "<table class='boxSoft'>";
|
||||
|
||||
print "<tr>";
|
||||
print "<th colspan='2' class='boxSoftTitle' style='text-align: right'>";
|
||||
print "<span class='f3'>".__("User Statistics")."</span>";
|
||||
print "<span class='f3'>".__("My Statistics")."</span>";
|
||||
print "</th>";
|
||||
print "</tr>";
|
||||
|
||||
|
@ -282,7 +277,23 @@ if (!empty($user)) {
|
|||
# Number of safe packages
|
||||
print "<tr>";
|
||||
print "<td class='boxSoft'>";
|
||||
print "<span class='f4'>".__("Safe")."</span>";
|
||||
if ($atype == 'Trusted User') {
|
||||
$q = "SELECT count(*) FROM Packages,Users WHERE Packages.Safe = 1 AND Packages.VerifiedBy = Users.ID AND Users.Username='$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='$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>";
|
||||
|
|
Loading…
Add table
Reference in a new issue