From bf9d9aae17cfd5c3c314356d489cacca7ab86e68 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Mon, 11 Feb 2019 15:23:01 +0100 Subject: index.php: show recently updated packages --- index.php | 55 ++++++++++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 46 insertions(+), 9 deletions(-) diff --git a/index.php b/index.php index 607dd9e..d550258 100644 --- a/index.php +++ b/index.php @@ -5,6 +5,29 @@ require_once BASE . "/lib/mysql.php"; require_once BASE . "/lib/style.php"; require_once BASE . "/lib/format.php"; +$result = mysql_run_query( + 'SELECT `binary_packages`.`pkgname`,' . + '`binary_packages`.`epoch`,' . + '`binary_packages`.`pkgver`,' . + '`binary_packages`.`pkgrel`,' . + '`binary_packages`.`sub_pkgrel`,' . + '`binary_packages`.`sub_pkgrel_omitted`,' . + '`repositories`.`name` AS `repo`,' . + '`architectures`.`name` AS `arch`' . + ' FROM `binary_packages`' . + mysql_join_binary_packages_binary_packages_in_repositories() . + mysql_join_binary_packages_in_repositories_repositories() . + mysql_join_repositories_architectures() . + mysql_join_repositories_repository_stabilities() . + ' WHERE `repositories`.`is_on_master_mirror`' . + ' AND `repository_stabilities`.`name` IN ("stable","testing")' . + ' ORDER BY `last_moved` DESC' . + ' LIMIT 15' +); +$package_updates = array(); +while ($row = $result -> fetch_assoc()) + $package_updates[] = $row; + print_header("", "home"); ?> @@ -126,15 +149,29 @@ if ($news === false) { RSS Feed - * - * - * - */ + +foreach($package_updates as $pkg) { + + print " \n"; + print " \n"; + print " \n"; + print " \n"; + +} + ?>
lib32-libxkbcommon 0.8.3-1 - * x86_64 - *
"; + print $pkg['pkgname']; + print " "; + if ($pkg['epoch'] != 0) + print $pkg['epoch'] . ":"; + print $pkg['pkgver'] . "-" . $pkg['pkgrel']; + if (!$pkg['sub_pkgrel_omitted']) + print "." . $pkg['sub_pkgrel']; + print "\n"; + print " " . $pkg['arch'] . "\n"; + print "
-- cgit v1.2.3-70-g09d2