[mapserver-commits] r11283 - trunk/mapserver
svn at osgeo.org
svn at osgeo.org
Sat Mar 19 15:57:22 EDT 2011
Author: sdlime
Date: 2011-03-19 12:57:22 -0700 (Sat, 19 Mar 2011)
New Revision: 11283
Modified:
trunk/mapserver/HISTORY.TXT
trunk/mapserver/mapfile.c
Log:
Allow run-time subs for class->text.
Modified: trunk/mapserver/HISTORY.TXT
===================================================================
--- trunk/mapserver/HISTORY.TXT 2011-03-19 17:31:54 UTC (rev 11282)
+++ trunk/mapserver/HISTORY.TXT 2011-03-19 19:57:22 UTC (rev 11283)
@@ -15,9 +15,8 @@
Current Version (SVN trunk):
----------------------------
-- ...
+- Allow run-time subs in class->text (makes sense if you allow it in class->expression).
-
Version 6.0.0-beta2 (2011-03-18)
--------------------------------
Modified: trunk/mapserver/mapfile.c
===================================================================
--- trunk/mapserver/mapfile.c 2011-03-19 17:31:54 UTC (rev 11282)
+++ trunk/mapserver/mapfile.c 2011-03-19 19:57:22 UTC (rev 11283)
@@ -5875,8 +5875,8 @@
if(layer->filter.string && (strcasestr(layer->filter.string, from) != NULL)) return MS_TRUE;
for(i=0; i<layer->numclasses; i++) {
- if(layer->class[i]->expression.string && (strcasestr(layer->class[i]->expression.string, from) != NULL))
- return MS_TRUE;
+ if(layer->class[i]->expression.string && (strcasestr(layer->class[i]->expression.string, from) != NULL)) return MS_TRUE;
+ if(layer->class[i]->text.string && (strcasestr(layer->class[i]->text.string, from) != NULL)) return MS_TRUE;
}
if(!msHashIsEmpty(&layer->bindvals)) return MS_TRUE;
@@ -5896,6 +5896,8 @@
for(i=0; i<layer->numclasses; i++) {
if(layer->class[i]->expression.string)
layer->class[i]->expression.string = msCaseReplaceSubstring(layer->class[i]->expression.string, from, to);
+ if(layer->class[i]->text.string)
+ layer->class[i]->text.string = msCaseReplaceSubstring(layer->class[i]->text.string, from, to);
}
/* The bindvalues are most useful when able to substitute values from the URL */
More information about the mapserver-commits
mailing list