summaryrefslogtreecommitdiffstats
path: root/web/lib/stats.inc
diff options
context:
space:
mode:
Diffstat (limited to 'web/lib/stats.inc')
-rw-r--r--web/lib/stats.inc6
1 files changed, 3 insertions, 3 deletions
diff --git a/web/lib/stats.inc b/web/lib/stats.inc
index 6a765581..f42e4177 100644
--- a/web/lib/stats.inc
+++ b/web/lib/stats.inc
@@ -54,9 +54,9 @@ function user_table($user, $dbh)
{
global $apc_prefix;
$escuser = mysql_real_escape_string($user);
- $base_q = "SELECT count(*) FROM Packages,PackageLocations,Users WHERE Packages.MaintainerUID = Users.ID AND Packages.LocationID = PackageLocations.ID AND PackageLocations.Location = '%s' AND Users.Username='" . $escuser . "'";
+ $base_q = "SELECT count(*) FROM Packages,Users WHERE Packages.MaintainerUID = Users.ID AND Users.Username='" . $escuser . "'";
- $maintainer_unsupported_count = db_cache_value(sprintf($base_q, 'unsupported'), $dbh,
+ $maintainer_unsupported_count = db_cache_value($base_q, $dbh,
$apc_prefix . 'user_unsupported_count:' . $escuser);
$q = "SELECT count(*) FROM Packages,Users WHERE Packages.OutOfDateTS IS NOT NULL AND Packages.MaintainerUID = Users.ID AND Users.Username='" . $escuser . "'";
@@ -74,7 +74,7 @@ function general_stats_table($dbh)
{
global $apc_prefix;
# AUR statistics
- $q = "SELECT count(*) FROM Packages,PackageLocations WHERE Packages.LocationID = PackageLocations.ID AND PackageLocations.Location = 'unsupported'";
+ $q = "SELECT count(*) FROM Packages WHERE DummyPkg = 0";
$unsupported_count = db_cache_value($q, $dbh, $apc_prefix . 'unsupported_count');
$q = "SELECT count(*) from Users";