logo       

cvs: pearweb /public_html package-stats.php: msg#00042

php.pear.core

Subject: cvs: pearweb /public_html package-stats.php

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@xxxxxxx> |
| Richard Heyes <richard@xxxxxxx> |
+----------------------------------------------------------------------+
- $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']) {

--
PEAR CVS Mailing List (http://pear.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise