[evolution-patches] patch for #67656 (address book)
- From: Sivaiah Nallagatla <snallagatla novell com>
- To: Evolution Patches <evolution-patches lists ximian com>
- Subject: [evolution-patches] patch for #67656 (address book)
- Date: Sun, 07 Nov 2004 13:25:35 -0700
I have changed the query to compare against complete email id instead of
user name part if name is NULL to avoid matching users foo org with
users bar org . Now we also include name as part of query always,
eariler we are including only when email is NULL.
Siva
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/addressbook/ChangeLog,v
retrieving revision 1.1858
diff -u -r1.1858 ChangeLog
--- ChangeLog 7 Nov 2004 16:10:41 -0000 1.1858
+++ ChangeLog 7 Nov 2004 19:18:53 -0000
@@ -1,3 +1,12 @@
+2004-11-07 Sivaiah Nallagatla <snallagatla novell com>
+
+ * util/eab-book-util.c (eab_name_and_email_query) :
+ When name is NULL query against complete email id instead of
+ user name part to take care of users foo org not matching
+ against users bar org . Also include query based on name always
+
+ Fix for #67656
+
2004-11-07 Rodney Dawes <dobey novell com>
* gui/contact-editor/e-contact-editor.c
Index: util/eab-book-util.c
===================================================================
RCS file: /cvs/gnome/evolution/addressbook/util/eab-book-util.c,v
retrieving revision 1.8
diff -u -r1.8 eab-book-util.c
--- util/eab-book-util.c 29 Sep 2004 19:35:32 -0000 1.8
+++ util/eab-book-util.c 7 Nov 2004 19:18:53 -0000
@@ -100,12 +100,14 @@
* We only query against the username part of the address, to avoid not matching
* fred foo com and fred mail foo com While their may be namespace collisions
* in the usernames of everyone out there, it shouldn't be that bad. (Famous last words.)
+ * But if name is missing we query against complete email id to avoid matching emails like
+ * users foo org with users bar org
*/
if (escaped_email) {
const gchar *t = escaped_email;
while (*t && *t != '@')
++t;
- if (*t == '@') {
+ if (*t == '@' && escaped_name) {
email_query = g_strdup_printf ("(beginswith \"email\" \"% *s \")", t-escaped_email, escaped_email);
} else {
@@ -113,12 +115,9 @@
}
}
- /* Build our name query.
- * We only do name-query stuff if we don't have an e-mail address. Our basic assumption
- * is that the username part of the email is good enough to keep the amount of stuff returned
- * in the query relatively small.
- */
- if (escaped_name && !escaped_email)
+ /* Build our name query.*/
+
+ if (escaped_name)
name_query = g_strdup_printf ("(or (beginswith \"file_as\" \"%s\") (beginswith \"full_name\" \"%s\"))", escaped_name, escaped_name);
/* Assemble our e-mail & name queries */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]