[evolution-patches] patch for #68454 (address book)



Attached path adds objectclass=person to ldap filter so that we get only
objects belonging to person and classes derived from it (like,
InetOrgPerson, evolutionPerson). We do not want to display Org,
Orginzation Unit and other objects as contacts in evo.

Siva
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution-data-server/addressbook/ChangeLog,v
retrieving revision 1.221
diff -u -r1.221 ChangeLog
--- ChangeLog	11 Dec 2004 17:36:18 -0000	1.221
+++ ChangeLog	19 Dec 2004 08:33:01 -0000
@@ -1,3 +1,12 @@
+2004-12-19 Sivaiah Nallagatla    <snallagatla novell com>
+
+	* backends/ldap/e-book-backend-ldap.c 
+	(e_book_backend_ldap_build_query) : add  filter 
+        objectclass=person so that we don't get objects O, OU and other unwanted
+	objects in search results.
+
+	Fixes #68454 	
+
 2004-12-11  Hans Petter Jansson  <hpj novell com>
 
 	* libebook/e-destination.h: Add "changed" signal.
Index: backends/ldap/e-book-backend-ldap.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/addressbook/backends/ldap/e-book-backend-ldap.c,v
retrieving revision 1.33
diff -u -r1.33 e-book-backend-ldap.c
--- backends/ldap/e-book-backend-ldap.c	28 Nov 2004 19:36:19 -0000	1.33
+++ backends/ldap/e-book-backend-ldap.c	19 Dec 2004 08:33:01 -0000
@@ -2854,6 +2854,7 @@
 	gchar *retval;
 	EBookBackendLDAPSExpData data;
 	int i;
+	char **strings;
 
 	data.list = NULL;
 	data.bl = bl;
@@ -2885,7 +2886,17 @@
 			g_list_foreach (data.list, (GFunc)g_free, NULL);
 		}
 		else {
-			retval = data.list->data;
+			strings = g_new0(char*, 5);
+			strings[0] = g_strdup ("(&");
+			strings[1] = g_strdup ("(objectclass=person)");
+			strings[2] = data.list->data;
+			strings[3] = g_strdup (")");
+			retval =  g_strjoinv(" ", strings);
+			for (i = 0 ; i < 4; i ++)
+				g_free (strings[i]);
+
+			g_free (strings);
+			
 		}
 	}
 	else {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]