index : archweb32 | |
Archlinux32 website | gitolite user |
summaryrefslogtreecommitdiff |
author | Erich Eckner <git@eckner.net> | 2019-02-11 15:23:01 +0100 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2019-02-11 15:23:01 +0100 |
commit | bf9d9aae17cfd5c3c314356d489cacca7ab86e68 (patch) | |
tree | 8284d2376dd01f245bb53cb3b285541e9245005f /index.php | |
parent | a01b355a79ff6bcfd41fde432559547021cf407f (diff) |
-rw-r--r-- | index.php | 55 |
@@ -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) { <a href="/feeds/packages/" title="Arch 32 Package Updates RSS Feed" class="rss-icon"><img width="16" height="16" src="/static/rss.c5ebdc5318d6.png" alt="RSS Feed" /></a> <table> <?php -/* TODO: loop through recent package updates, putting out (only stable & testing): - * <tr> - * <td class="pkg-name"><span class="multilib">lib32-libxkbcommon 0.8.3-1</span></td> - * <td class="pkg-arch"> - * <a href="/packages/multilib/x86_64/lib32-libxkbcommon/" - * title="Details for lib32-libxkbcommon [multilib]">x86_64</a> - * </td> - * </tr> - */ + +foreach($package_updates as $pkg) { + + print " <tr>\n"; + print " <td class=\"pkg-name\"><span class=\""; + print $pkg['repo']; + print "\">"; + 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 "</span></td>\n"; + print " <td class=\"pkg-arch\">\n"; + print " <a href=\"/packages/" . $pkg['repo'] . "/" . $pkg['arch'] . "/" . $pkg['pkgname'] . "/\""; + print " title=\"Details for " . $pkg['pkgname'] . " [" . $pkg['repo'] . "]\">" . $pkg['arch'] . "</a>\n"; + print " </td>\n"; + print " </tr>\n"; + +} + ?> </table> </div> |