[Svn] r2479 - in trunk/roundcubemail: . program/js program/steps/mail

trac at roundcube.net trac at roundcube.net
Thu May 14 15:18:36 CEST 2009


Author: alec
Date: 2009-05-14 08:18:36 -0500 (Thu, 14 May 2009)
New Revision: 2479

Modified:
   trunk/roundcubemail/CHANGELOG
   trunk/roundcubemail/program/js/app.js
   trunk/roundcubemail/program/steps/mail/autocomplete.inc
Log:
- Fix autocomplete problem with capital letters (#1485792)


Modified: trunk/roundcubemail/CHANGELOG
===================================================================
--- trunk/roundcubemail/CHANGELOG	2009-05-14 10:51:03 UTC (rev 2478)
+++ trunk/roundcubemail/CHANGELOG	2009-05-14 13:18:36 UTC (rev 2479)
@@ -1,6 +1,7 @@
 CHANGELOG RoundCube Webmail
 ===========================
 
+- Fix autocomplete problem with capital letters (#1485792)
 - Support UUencode content encoding (#1485839)
 - Minimize chance of race condition in session handling (#1485659, #1484678)
 - Fix session handling on non-session SQL query error (#1485734)

Modified: trunk/roundcubemail/program/js/app.js
===================================================================
--- trunk/roundcubemail/program/js/app.js	2009-05-14 10:51:03 UTC (rev 2478)
+++ trunk/roundcubemail/program/js/app.js	2009-05-14 13:18:36 UTC (rev 2479)
@@ -2564,11 +2564,14 @@
     q = q.replace(/(^\s+|\s+$)/g, '').toLowerCase();
 
     // Don't (re-)search if string is empty or if the last results are still active
-    if (!q.length || q == this.ksearch_value)
+    if (q == this.ksearch_value)
       return;
-
+    
     this.ksearch_value = q;
     
+    if (!q.length)
+      return;
+    
     this.display_message(this.get_label('searching'), 'loading', true);
     this.http_post('autocomplete', '_search='+urlencode(q));
   };

Modified: trunk/roundcubemail/program/steps/mail/autocomplete.inc
===================================================================
--- trunk/roundcubemail/program/steps/mail/autocomplete.inc	2009-05-14 10:51:03 UTC (rev 2478)
+++ trunk/roundcubemail/program/steps/mail/autocomplete.inc	2009-05-14 13:18:36 UTC (rev 2479)
@@ -31,11 +31,9 @@
 
     if ($result = $abook->search(array('email','name'), $search)) {
       while ($sql_arr = $result->iterate()) {
-        if (stripos((string)$sql_arr['email'], $search) !== false || stripos((string)$sql_arr['name'], $search) !== false) {
           $contacts[] = format_email_recipient($sql_arr['email'], $sql_arr['name']);
 	  if (count($contacts) >= $MAXNUM)
             break 2;
-        }
       }
     }
   }

_______________________________________________
http://lists.roundcube.net/mailman/listinfo/svn



More information about the Svn mailing list