summaryrefslogtreecommitdiffstats
path: root/web/lib
diff options
context:
space:
mode:
authorLukas Fleischer <archlinux@cryptocrack.de>2014-05-29 21:18:01 +0200
committerLukas Fleischer <archlinux@cryptocrack.de>2014-05-29 21:19:06 +0200
commit4cd6841541ef6464342ef865366fb88d02a5b51c (patch)
tree51de8d5c9d3e3d3649733a8615eac4eb940db5c0 /web/lib
parent44268778c824c2d5f49f00f9276a864aeb2e9681 (diff)
downloadaur-4cd6841541ef6464342ef865366fb88d02a5b51c.tar.gz
aur-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>
Diffstat (limited to 'web/lib')
-rw-r--r--web/lib/pkgfuncs.inc.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/web/lib/pkgfuncs.inc.php b/web/lib/pkgfuncs.inc.php
index a43512c3..3bbf1a1e 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;