mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
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>
This commit is contained in:
parent
44268778c8
commit
4cd6841541
1 changed files with 4 additions and 2 deletions
|
@ -953,11 +953,13 @@ function pkg_add_lic($pkgid, $licid) {
|
||||||
function latest_pkgs($numpkgs) {
|
function latest_pkgs($numpkgs) {
|
||||||
$dbh = DB::connect();
|
$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.= "ORDER BY SubmittedTS DESC ";
|
||||||
$q.= "LIMIT " .intval($numpkgs);
|
$q.= "LIMIT " . intval($numpkgs);
|
||||||
$result = $dbh->query($q);
|
$result = $dbh->query($q);
|
||||||
|
|
||||||
|
$packages = array();
|
||||||
if ($result) {
|
if ($result) {
|
||||||
while ($row = $result->fetch(PDO::FETCH_ASSOC)) {
|
while ($row = $result->fetch(PDO::FETCH_ASSOC)) {
|
||||||
$packages[] = $row;
|
$packages[] = $row;
|
||||||
|
|
Loading…
Add table
Reference in a new issue