summaryrefslogtreecommitdiffstats
path: root/web/html
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/html
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/html')
-rw-r--r--web/html/pkgsubmit.php17
-rw-r--r--web/html/rss.php1
2 files changed, 4 insertions, 14 deletions
diff --git a/web/html/pkgsubmit.php b/web/html/pkgsubmit.php
index 3eb60c5e..1540c8a5 100644
--- a/web/html/pkgsubmit.php
+++ b/web/html/pkgsubmit.php
@@ -311,16 +311,6 @@ if ($_COOKIE["AURSID"]):
$q = "DELETE FROM PackageSources WHERE PackageID = " . $packageID;
db_query($q, $dbh);
- # If the package was a dummy, undummy it
- if ($pdata['DummyPkg']) {
- $q = sprintf( "UPDATE Packages SET DummyPkg = 0, SubmitterUID = %d, MaintainerUID = %d, SubmittedTS = UNIX_TIMESTAMP() WHERE ID = %d",
- $uid,
- $uid,
- $packageID);
-
- db_query($q, $dbh);
- }
-
# If a new category was chosen, change it to that
if ($_POST['category'] > 1) {
$q = sprintf( "UPDATE Packages SET CategoryID = %d WHERE ID = %d",
@@ -366,7 +356,6 @@ if ($_COOKIE["AURSID"]):
# Update package depends
$depends = explode(" ", $new_pkgbuild['depends']);
foreach ($depends as $dep) {
- $q = "INSERT INTO PackageDepends (PackageID, DepPkgID, DepCondition) VALUES (";
$deppkgname = preg_replace("/(<|<=|=|>=|>).*/", "", $dep);
$depcondition = str_replace($deppkgname, "", $dep);
@@ -374,8 +363,10 @@ if ($_COOKIE["AURSID"]):
break;
}
- $deppkgid = create_dummy($deppkgname, $_COOKIE['AURSID']);
- $q .= $packageID . ", " . $deppkgid . ", '" . mysql_real_escape_string($depcondition) . "')";
+ $q = sprintf("INSERT INTO PackageDepends (PackageID, DepName, DepCondition) VALUES (%d, '%s', '%s')",
+ $packageID,
+ mysql_real_escape_string($deppkgname),
+ mysql_real_escape_string($depcondition));
db_query($q, $dbh);
}
diff --git a/web/html/rss.php b/web/html/rss.php
index c9b87eca..cb0bf40f 100644
--- a/web/html/rss.php
+++ b/web/html/rss.php
@@ -31,7 +31,6 @@ $rss->image = $image;
#Get the latest packages and add items for them
$dbh = db_connect();
$q = "SELECT * FROM Packages ";
-$q.= "WHERE DummyPkg != 1 ";
$q.= "ORDER BY SubmittedTS DESC ";
$q.= "LIMIT 0 , 20";
$result = db_query($q, $dbh);