[Fusionforge-commits] r7275 - trunk/gforge/www/stats

Julien HEYMAN jheyman at libremir.placard.fr.eu.org
Thu Apr 2 11:09:20 CEST 2009


Author: jheyman
Date: 2009-04-02 11:09:20 +0200 (Thu, 02 Apr 2009)
New Revision: 7275

Modified:
   trunk/gforge/www/stats/site_stats_utils.php
Log:
Change limit and order by in projects stats

Modified: trunk/gforge/www/stats/site_stats_utils.php
===================================================================
--- trunk/gforge/www/stats/site_stats_utils.php	2009-04-02 09:09:15 UTC (rev 7274)
+++ trunk/gforge/www/stats/site_stats_utils.php	2009-04-02 09:09:20 UTC (rev 7275)
@@ -184,7 +184,9 @@
 */
 
 	if (!$orderby) {
-		$orderby = "group_name";
+		$orderby = "group_name ASC";
+	}else {
+		$orderby .= " DESC, group_name ASC";
 	}
 
 	if ($report == 'last_30') {
@@ -212,7 +214,7 @@
 			s.group_id = g.group_id
 			$grp_str
 		GROUP BY g.group_id, g.group_name
-		ORDER BY $orderby DESC ";
+		ORDER BY $orderby";
 
 	} else {
 
@@ -238,10 +240,10 @@
 		WHERE 
 			s.group_id = g.group_id
 			$grp_str
-		ORDER BY $orderby DESC ";
+		ORDER BY $orderby";
 	}
 
-	return db_query( $sql, 30, 0, SYS_DB_STATS);
+	return db_query( $sql, 0, 0, SYS_DB_STATS);
 
 }
 




More information about the Fusionforge-commits mailing list