2011-12-18 [mir] 3.8.0cvs4
authorMichael Rasmussen <mir@datanom.net>
Sun, 18 Dec 2011 19:07:49 +0000 (19:07 +0000)
committerMichael Rasmussen <mir@datanom.net>
Sun, 18 Dec 2011 19:07:49 +0000 (19:07 +0000)
* src/ldapctrl.c
    Fix bug in search criteria when doing a
    complete directory search using '*'

ChangeLog
PATCHSETS
configure.ac
src/ldapctrl.c

index 17449fb..52ac091 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2011-12-18 [mir]       3.8.0cvs4
+
+       * src/ldapctrl.c
+           Fix bug in search criteria when doing a
+           complete directory search using '*'
+
 2011-12-16 [mir]       3.8.0cvs3
 
        * src/Makefile.am
index baa0d6d..13bba97 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.1.2.25 -r 1.1.2.26 tools/claws.i18n.status.pl;  ) > 3.8.0cvs1.patchset
 ( cvs diff -u -r 1.150.2.119 -r 1.150.2.120 src/procmsg.c;  cvs diff -u -r 1.25.2.72 -r 1.25.2.73 src/stock_pixmap.c;  cvs diff -u -r 1.18.2.42 -r 1.18.2.43 src/stock_pixmap.h;  cvs diff -u -r 1.395.2.441 -r 1.395.2.442 src/summaryview.c;  cvs diff -u -r 1.1.2.20 -r 1.1.2.21 src/gtk/icon_legend.c;  diff -u /dev/null src/pixmaps/replied_and_forwarded.xpm;  ) > 3.8.0cvs2.patchset
 ( cvs diff -u -r 1.155.2.97 -r 1.155.2.98 src/Makefile.am;  ) > 3.8.0cvs3.patchset
+( cvs diff -u -r 1.2.2.23 -r 1.2.2.24 src/ldapctrl.c;  ) > 3.8.0cvs4.patchset
index 6a6f372..d06015a 100644 (file)
@@ -12,7 +12,7 @@ MINOR_VERSION=8
 MICRO_VERSION=0
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=3
+EXTRA_VERSION=4
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
index de94338..03f3b66 100644 (file)
@@ -632,8 +632,15 @@ gchar *ldapctl_format_criteria( LdapControl *ctl, const gchar *searchVal ) {
                        /* Subsequent time through */
                        gchar *crit;
 
-                       /* Format query criteria */
-                       crit = g_strdup_printf( criteriaFmt, attr, searchVal );
+                       debug_print("crit: %s\n", searchVal);
+                       /* fix bug when doing a search any */
+                       if (strcmp("*@", searchVal) == 0) {
+                           crit = g_strdup_printf( "(%s=*)", attr );
+                       }
+                       else {
+                           /* Format query criteria */
+                           crit = g_strdup_printf( criteriaFmt, attr, searchVal );
+                       }
 
                        /* Append to existing criteria */                       
                        g_free( p2 );
@@ -643,7 +650,13 @@ gchar *ldapctl_format_criteria( LdapControl *ctl, const gchar *searchVal ) {
                }
                else {
                        /* First time through - Format query criteria */
-                       p2 = g_strdup_printf( criteriaFmt, attr, searchVal );
+                        /* fix bug when doing a search any */
+                       if (strcmp("*@", searchVal) == 0) {
+                           p2 = g_strdup_printf( "(%s=*)", attr );
+                       }
+                       else {
+                           p2 = g_strdup_printf( criteriaFmt, attr, searchVal );
+                       }
                }
        }