summaryrefslogtreecommitdiffstats
path: root/web/lib/aurjson.class.php
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2011-03-31 03:48:09 +0200
committerLukas Fleischer <archlinux@cryptocrack.de>2011-04-03 22:59:32 +0200
commit7c91c592458b7532806ef75fe09146f82f085f3b (patch)
treeb2fa71032464ec0f2c3fe286c3bd629d18b6fa4f /web/lib/aurjson.class.php
parent1f252eba64acf18719bd514a7a4464ca18f4c1cb (diff)
downloadaur-7c91c592458b7532806ef75fe09146f82f085f3b.tar.gz
aur-7c91c592458b7532806ef75fe09146f82f085f3b.tar.xz
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 <dan@archlinux.org> Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
Diffstat (limited to 'web/lib/aurjson.class.php')
-rw-r--r--web/lib/aurjson.class.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/web/lib/aurjson.class.php b/web/lib/aurjson.class.php
index 0c692811..3570909d 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