From 4cd6841541ef6464342ef865366fb88d02a5b51c Mon Sep 17 00:00:00 2001 From: Lukas Fleischer Date: Thu, 29 May 2014 21:18:01 +0200 Subject: 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 --- web/lib/pkgfuncs.inc.php | 6 ++++-- 1 file 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; -- cgit v1.2.3-70-g09d2