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/aurjson.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'web/lib/aurjson.class.php') diff --git a/web/lib/aurjson.class.php b/web/lib/aurjson.class.php index 0c69281..3570909 100644 --- a/web/lib/aurjson.class.php +++ b/web/lib/aurjson.class.php @@ -110,7 +110,7 @@ class AurJSON { $keyword_string = addcslashes($keyword_string, '%_'); $query = "SELECT " . implode(',', $this->fields) . - " FROM Packages WHERE DummyPkg=0 AND " . + " FROM Packages WHERE " . " ( Name LIKE '%{$keyword_string}%' OR " . " Description LIKE '%{$keyword_string}%' )"; $result = db_query($query, $this->dbh); @@ -136,7 +136,7 @@ class AurJSON { **/ private function info($pqdata) { $base_query = "SELECT " . implode(',', $this->fields) . - " FROM Packages WHERE DummyPkg=0 AND "; + " FROM Packages WHERE "; if ( is_numeric($pqdata) ) { // just using sprintf to coerce the pqd to an int -- cgit v1.2.3-70-g09d2