cvs: pearweb /public_html package-stats.php
| From: | Greg Beaver | Date: | Wed, 18 Oct 2006 01:33:21 +0000 |
| Subject: | cvs: pearweb /public_html package-stats.php | ||
| Groups: | php.pear.cvs php.pear.core | ||
| Request: | Send a blank email to pear-cvs+get-42617@lists.php.net to get a copy of this message | ||
cellog Wed Oct 18 01:33:21 2006 UTC
Modified files:
/pearweb/public_html package-stats.php
Log:
sort versions by version order using version_compare
with highest version near the top of the dropdown
http://cvs.php.net/viewvc.cgi/pearweb/public_html/package-stats.php?r1=1.71&r2=1.72&diff_format=u
Index: pearweb/public_html/package-stats.php
diff -u pearweb/public_html/package-stats.php:1.71 pearweb/public_html/package-stats.php:1.72
--- pearweb/public_html/package-stats.php:1.71 Tue Oct 17 17:57:56 2006
+++ pearweb/public_html/package-stats.php Wed Oct 18 01:33:21 2006
@@ -16,7 +16,7 @@
| Authors: Martin Jansen <mj@php.net> |
| Richard Heyes <richard@php.net> |
+----------------------------------------------------------------------+
- $Id: package-stats.php,v 1.71 2006/10/17 17:57:56 cellog Exp $
+ $Id: package-stats.php,v 1.72 2006/10/18 01:33:21 cellog Exp $
*/
require_once 'HTML/Form.php';
@@ -109,6 +109,7 @@
$query = "SELECT id, version FROM releases WHERE package = '" .
$_GET['pid'] . "'";
$rows = $dbh->getAll($query, DB_FETCHMODE_ASSOC);
+ usort($rows, create_function('$a,$b', 'return
version_compare($b[\'version\'],$a[\'version\']);'));
foreach ($rows as $row) {
$selected = '';
if (isset($_GET['rid']) && $_GET['rid'] ==
$row['id']) {