From 7c91c592458b7532806ef75fe09146f82f085f3b Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Wed, 30 Mar 2011 20:48:09 -0500 Subject: Remove Dummy Package concept Instead, we just store dependencies directly in the PackageDepends table. Since we don't use this info anywhere besides the package details page, there is little value in precalculating what is in the AUR vs. what is not. An upgrade path is provided via several SQL statements in the UPGRADING document. There should be no user-visible change from this, but the DB schema gets a bit more sane and we no longer have loads of junk packages in our tables that are never shown to the end user. This should also help the MySQL query planner in several cases as we no longer have to be careful to exclude dummy packages on every query. Signed-off-by: Dan McGee Signed-off-by: Lukas Fleischer --- web/lib/stats.inc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'web/lib/stats.inc') diff --git a/web/lib/stats.inc b/web/lib/stats.inc index f924fb5..a345c40 100644 --- a/web/lib/stats.inc +++ b/web/lib/stats.inc @@ -36,7 +36,7 @@ function updates_table($dbh) global $apc_prefix, $apc_ttl; $key = $apc_prefix . 'recent_updates'; if(!(EXTENSION_LOADED_APC && ($newest_packages = apc_fetch($key)))) { - $q = 'SELECT * FROM Packages WHERE DummyPkg != 1 ORDER BY ModifiedTS DESC LIMIT 0 , 10'; + $q = 'SELECT * FROM Packages ORDER BY ModifiedTS DESC LIMIT 0 , 10'; $result = db_query($q, $dbh); $newest_packages = new ArrayObject(); @@ -74,7 +74,7 @@ function general_stats_table($dbh) { global $apc_prefix; # AUR statistics - $q = "SELECT count(*) FROM Packages WHERE DummyPkg = 0"; + $q = "SELECT count(*) FROM Packages"; $unsupported_count = db_cache_value($q, $dbh, $apc_prefix . 'unsupported_count'); $q = "SELECT count(*) from Users"; -- cgit v1.2.3-70-g09d2