[mapserver-commits] r10488 - trunk/mapserver

svn at osgeo.org svn at osgeo.org
Mon Aug 30 21:12:34 EDT 2010


Author: assefa
Date: 2010-08-31 01:12:33 +0000 (Tue, 31 Aug 2010)
New Revision: 10488

Modified:
   trunk/mapserver/mapogcfilter.c
   trunk/mapserver/mapogcsld.c
Log:
activate islike operator #3521

Modified: trunk/mapserver/mapogcfilter.c
===================================================================
--- trunk/mapserver/mapogcfilter.c	2010-08-30 16:25:08 UTC (rev 10487)
+++ trunk/mapserver/mapogcfilter.c	2010-08-31 01:12:33 UTC (rev 10488)
@@ -3551,7 +3551,11 @@
     strcat(szBuffer, psFilterNode->psLeftNode->pszValue);
     szBuffer[strlen(szBuffer)] = '\0';
 
-    sprintf(szTmp, "%s", "]\" =~ /");
+    /*#3521 */
+    if(bCaseInsensitive == 1)
+      sprintf(szTmp, "%s", "]\" ~* /");
+    else
+      sprintf(szTmp, "%s", "]\" =~ /");
     szTmp[7] = '\0';
     strcat(szBuffer, szTmp);
     szBuffer[strlen(szBuffer)] = '\0';
@@ -3601,11 +3605,6 @@
         }
     }   
     szTmp[iTmp] = '/';
-    /*disable it fot now since things like [NAME]" =~ /^Sydney/i do not work #3521 */
-    if (0)/*bCaseInsensitive == 1)*/
-    {
-      szTmp[++iTmp] = 'i';
-    } 
     szTmp[++iTmp] = '\0';
     
     strcat(szBuffer, szTmp);

Modified: trunk/mapserver/mapogcsld.c
===================================================================
--- trunk/mapserver/mapogcsld.c	2010-08-30 16:25:08 UTC (rev 10487)
+++ trunk/mapserver/mapogcsld.c	2010-08-31 01:12:33 UTC (rev 10488)
@@ -438,6 +438,9 @@
                                             sprintf(szTmp, "%s", "))");
                                             pszBuffer =msStringConcatenate(pszBuffer, szTmp);
                                             msLoadExpressionString(&lp->filter, pszBuffer);
+                                            for (k=0;k<lp->numclasses;k++)
+                                              freeExpression(&lp->class[k]->expression);
+                                              
                                         }
                                         msFree(pszBuffer);
                                     }
@@ -4715,8 +4718,10 @@
 
     if (strstr(pszExpression, "<=") || strstr(pszExpression, " le "))
       pszValue = strdup("PropertyIsLessThanOrEqualTo");
-     else if (strstr(pszExpression, "=~"))
+    else if (strstr(pszExpression, "=~"))
       pszValue = strdup("PropertyIsLike");
+    else if (strstr(pszExpression, "~*"))
+      pszValue = strdup("PropertyIsLike");
     else if (strstr(pszExpression, ">=") || strstr(pszExpression, " ge "))
       pszValue = strdup("PropertyIsGreaterThanOrEqualTo");
     else if (strstr(pszExpression, "!=") || strstr(pszExpression, " ne "))
@@ -4995,8 +5000,8 @@
         szCompare[1] = '~';
         szCompare[2] = '\0';
 
-        szCompare2[0] = '=';
-        szCompare2[1] = '~';
+        szCompare2[0] = '~';
+        szCompare2[1] = '*';
         szCompare2[2] = '\0';
 
         bOneCharCompare =0;



More information about the mapserver-commits mailing list