Commit 4cd68415 authored by Lukas Fleischer's avatar Lukas Fleischer
Browse files

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: default avatarLukas Fleischer <archlinux@cryptocrack.de>
parent 44268778
......@@ -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;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment