From: Michael Wallner Date: Wed, 20 May 2015 08:38:45 +0000 (+0200) Subject: better package listing X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=344c869c38c22c9a0e1590c1dc5640b308c0fe5e;p=pharext%2Freplicator.pharext.org better package listing --- diff --git a/public/index.php b/public/index.php index f132afb..9f35721 100644 --- a/public/index.php +++ b/public/index.php @@ -76,20 +76,57 @@ - + - + + getMetadata(); + if ($meta) { + $release = $meta["release"]; + } else { + $release = substr($name, strlen($package)+1); + } + $versions[$release][$enc] = [$phar, $meta]; + uksort($versions[$release], function($a, $b) { + $al = strlen($a); + $bl = strlen($b); + if ($al < $bl) return -1; + if ($al > $bl) return 1; + return 0; + }); + } + uksort($versions, "version_compare"); + + ?> + $phars) : ?> + + + list($phar, $meta)) : ?> + + + + + +
PackagePackage Date Size Pharext
+ + + + >ext.phar getMetadata(); if ($meta) { printf("v%s\n", $meta["version"]); } else { @@ -163,14 +198,14 @@ - +