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

Julien HEYMAN jheyman at libremir.placard.fr.eu.org
Wed Jun 3 11:32:14 CEST 2009


Author: jheyman
Date: 2009-06-03 11:32:14 +0200 (Wed, 03 Jun 2009)
New Revision: 7714

Modified:
   trunk/gforge/common/reporting/report_utils.php
Log:
Case-insensitive filtering on usernames

Modified: trunk/gforge/common/reporting/report_utils.php
===================================================================
--- trunk/gforge/common/reporting/report_utils.php	2009-06-03 09:13:42 UTC (rev 7713)
+++ trunk/gforge/common/reporting/report_utils.php	2009-06-03 09:32:14 UTC (rev 7714)
@@ -120,9 +120,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_time_tracking 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_time_tracking 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_time_tracking 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_time_tracking 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