[mapserver-commits] r9672 - trunk/mapserver
svn at osgeo.org
svn at osgeo.org
Wed Jan 6 14:46:49 EST 2010
Author: pramsey
Date: 2010-01-06 14:46:48 -0500 (Wed, 06 Jan 2010)
New Revision: 9672
Modified:
trunk/mapserver/HISTORY.TXT
trunk/mapserver/mapfile.c
Log:
Make %substitutions% case insensitive (#3250)
Modified: trunk/mapserver/HISTORY.TXT
===================================================================
--- trunk/mapserver/HISTORY.TXT 2010-01-05 20:58:34 UTC (rev 9671)
+++ trunk/mapserver/HISTORY.TXT 2010-01-06 19:46:48 UTC (rev 9672)
@@ -14,6 +14,8 @@
Current Version (SVN trunk):
----------------------------
+- Made %substitution% strings case insensitive (#3250)
+
- Added support to get the extent of a raster layer that use a tileindex (#3252)
- Fixed configure to support FTGL 2.1.2 (#3247)
Modified: trunk/mapserver/mapfile.c
===================================================================
--- trunk/mapserver/mapfile.c 2010-01-05 20:58:34 UTC (rev 9671)
+++ trunk/mapserver/mapfile.c 2010-01-06 19:46:48 UTC (rev 9672)
@@ -5449,17 +5449,17 @@
/* look in places authorized for url substitution and replace "from" by "to" */
void msLayerSubstituteString(layerObj *layer, const char *from, const char *to) {
int k;
- if(layer->data && (strstr(layer->data, from) != NULL))
- layer->data = msReplaceSubstring(layer->data, from, to);
- if(layer->tileindex && (strstr(layer->tileindex, from) != NULL))
- layer->tileindex = msReplaceSubstring(layer->tileindex, from, to);
- if(layer->connection && (strstr(layer->connection, from) != NULL))
- layer->connection = msReplaceSubstring(layer->connection, from, to);
- if(layer->filter.string && (strstr(layer->filter.string, from) != NULL))
- layer->filter.string = msReplaceSubstring(layer->filter.string, from, to);
+ if(layer->data && (strcasestr(layer->data, from) != NULL))
+ layer->data = msCaseReplaceSubstring(layer->data, from, to);
+ if(layer->tileindex && (strcasestr(layer->tileindex, from) != NULL))
+ layer->tileindex = msCaseReplaceSubstring(layer->tileindex, from, to);
+ if(layer->connection && (strcasestr(layer->connection, from) != NULL))
+ layer->connection = msCaseReplaceSubstring(layer->connection, from, to);
+ if(layer->filter.string && (strcasestr(layer->filter.string, from) != NULL))
+ layer->filter.string = msCaseReplaceSubstring(layer->filter.string, from, to);
for(k=0; k<layer->numclasses; k++) {
- if(layer->class[k]->expression.string && (strstr(layer->class[k]->expression.string, from) != NULL))
- layer->class[k]->expression.string = msReplaceSubstring(layer->class[k]->expression.string, from, to);
+ if(layer->class[k]->expression.string && (strcasestr(layer->class[k]->expression.string, from) != NULL))
+ layer->class[k]->expression.string = msCaseReplaceSubstring(layer->class[k]->expression.string, from, to);
}
}
More information about the mapserver-commits
mailing list