diff options
author | Dan McGee <dan@archlinux.org> | 2011-01-31 18:18:15 +0100 |
---|---|---|
committer | Lukas Fleischer <archlinux@cryptocrack.de> | 2011-02-01 12:41:08 +0100 |
commit | 7f5af61c884b53a75a2b7f8b5146465f14a71f6b (patch) | |
tree | 52a959e9a9a7e940339906532a1f68a99595b4af /web/lib/stats.inc | |
parent | 492c8c668f1edb708e49bcafbacb22c58e2877a5 (diff) | |
download | aur-7f5af61c884b53a75a2b7f8b5146465f14a71f6b.tar.gz aur-7f5af61c884b53a75a2b7f8b5146465f14a71f6b.tar.xz |
Drop PackageLocations table and references
We don't need this anymore since all packages managed here are
well...managed here. Rip out all of the places we were using this field,
many of which depended on the magic value '2' anyway.
On the display side of things, we had a column that was always showing
'unsupported' that is now gone, and you can no longer sort by this column.
Signed-off-by: Dan McGee <dan@archlinux.org>
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
Diffstat (limited to 'web/lib/stats.inc')
-rw-r--r-- | web/lib/stats.inc | 6 |
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"; |