Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/index.php
diff options
context:
space:
mode:
Diffstat (limited to 'index.php')
-rw-r--r--index.php55
1 files 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) {
<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>