[Fusionforge-commits] r7710 - trunk/gforge/common/reporting

Roland Mas lolando at libremir.placard.fr.eu.org
Tue Jun 2 20:48:40 CEST 2009


Author: lolando
Date: 2009-06-02 20:48:40 +0200 (Tue, 02 Jun 2009)
New Revision: 7710

Modified:
   trunk/gforge/common/reporting/report_utils.php
Log:
Case-insensitive filtering on usernames (based on a patch by Julien Heyman)

Modified: trunk/gforge/common/reporting/report_utils.php
===================================================================
--- trunk/gforge/common/reporting/report_utils.php	2009-06-02 18:38:13 UTC (rev 7709)
+++ trunk/gforge/common/reporting/report_utils.php	2009-06-02 18:48:40 UTC (rev 7710)
@@ -101,9 +101,9 @@
 
 	if ($start_with) {
 		if ( $sys_database_type == "mysql" ) {
-			$res = db_query_mysql ("SELECT user_id,realname FROM users WHERE status='A' AND (exists (SELECT user_id FROM rep_user_act_daily WHERE user_id=users.user_id)) AND (lastname LIKE '$start_with%' OR user_name LIKE '$start_with%') ORDER BY lastname") ;
+			$res = db_query_mysql ("SELECT user_id,realname FROM users WHERE status='A' AND (exists (SELECT user_id FROM rep_user_act_daily WHERE user_id=users.user_id)) AND (lower(lastname) LIKE lower('$start_with%') OR lower(user_name) LIKE lower('$start_with%')) ORDER BY lastname") ;
 		} else {
-			$res = db_query_params ('SELECT user_id,realname FROM users WHERE status=$1 AND (exists (SELECT user_id FROM rep_user_act_daily WHERE user_id=users.user_id)) AND (lastname LIKE $2 OR user_name LIKE $3) ORDER BY lastname',
+			$res = db_query_params ('SELECT user_id,realname FROM users WHERE status=$1 AND (exists (SELECT user_id FROM rep_user_act_daily WHERE user_id=users.user_id)) AND (lastname ILIKE $2 OR user_name ILIKE $3) ORDER BY lastname',
 						array ('A',
 						       "$start_with%",
 						       "$start_with%")) ;




More information about the Fusionforge-commits mailing list