diff options
author | Lukas Fleischer <archlinux@cryptocrack.de> | 2014-05-29 21:18:01 +0200 |
---|---|---|
committer | Lukas Fleischer <archlinux@cryptocrack.de> | 2014-05-29 21:19:06 +0200 |
commit | 4cd6841541ef6464342ef865366fb88d02a5b51c (patch) | |
tree | 51de8d5c9d3e3d3649733a8615eac4eb940db5c0 | |
parent | 44268778c824c2d5f49f00f9276a864aeb2e9681 (diff) | |
download | aurweb-4cd6841541ef6464342ef865366fb88d02a5b51c.tar.xz |
pkgfuncs.inc.php: Fix latest_pkgs()
This fixes a regression introduced when adding split package support and
makes the RSS feed work again.
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
-rw-r--r-- | web/lib/pkgfuncs.inc.php | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/web/lib/pkgfuncs.inc.php b/web/lib/pkgfuncs.inc.php index a43512c..3bbf1a1 100644 --- a/web/lib/pkgfuncs.inc.php +++ b/web/lib/pkgfuncs.inc.php @@ -953,11 +953,13 @@ function pkg_add_lic($pkgid, $licid) { function latest_pkgs($numpkgs) { $dbh = DB::connect(); - $q = "SELECT * FROM Packages "; + $q = "SELECT * FROM Packages LEFT JOIN PackageBases ON "; + $q.= "PackageBases.ID = Packages.PackageBaseID "; $q.= "ORDER BY SubmittedTS DESC "; - $q.= "LIMIT " .intval($numpkgs); + $q.= "LIMIT " . intval($numpkgs); $result = $dbh->query($q); + $packages = array(); if ($result) { while ($row = $result->fetch(PDO::FETCH_ASSOC)) { $packages[] = $row; |