[evolution-patches] Addressbook - ldap backend



Hi,

Attached is the patch is to prevent downloading contacts and displaying
then in the name selector dialog for LDAP address books.

Please review.
-Sushma.  
Index: addressbook/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.46
diff -u -p -r1.46 e-book-backend-ldap.c
--- addressbook/backends/ldap/e-book-backend-ldap.c	5 Aug 2005 11:23:47 -0000	1.46
+++ addressbook/backends/ldap/e-book-backend-ldap.c	9 Aug 2005 09:35:06 -0000
@@ -2932,6 +2932,12 @@ func_beginswith(struct _ESExp *f, int ar
 		char *str = rfc2254_escape(argv[1]->value.string);
 		char *ldap_attr = query_prop_to_ldap(propname);
 
+		if (strlen (str) == 0) {
+			r = e_sexp_result_new (f, ESEXP_RES_BOOL);
+			r->value.bool = FALSE;
+			return r;
+		}
+
 		/* insert hack for fileAs queries, since we need to do
 		   the right thing if the server supports them or not,
 		   and for entries that have no fileAs attribute. */
Index: addressbook/ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution-data-server/addressbook/ChangeLog,v
retrieving revision 1.302
diff -u -p -r1.302 ChangeLog
--- addressbook/ChangeLog	5 Aug 2005 11:23:47 -0000	1.302
+++ addressbook/ChangeLog	9 Aug 2005 09:38:32 -0000
@@ -1,3 +1,9 @@
+2005-08-09  Sushma Rai  <rsushma novell com>
+
+	* backends/ldap/e-book-backend-ldap.c (func_beginswith): Ignoring the 
+	null query for LDAP addressbook, so that we don't download the book and
+	try to show all the entries in name selector dialog. 
+
 2005-08-05  Sushma Rai  <rsushma novell com>
 	
 	* backends/ldap/e-book-backend-ldap.c (ldap_error_to_response):


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