Skip to content

Commit

Permalink
add forgotten class substitutions of rfc019 (#4877)
Browse files Browse the repository at this point in the history
  • Loading branch information
tbonfort committed Mar 8, 2014
1 parent 814286d commit f0e0117
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions mapfile.c
Original file line number Diff line number Diff line change
Expand Up @@ -6842,10 +6842,14 @@ void msApplySubstitutions(mapObj *map, char **names, char **values, int npairs)
if(!value) continue; /*parameter was not in url*/
validation = msLookupHashTable(&lp->validation, key);
if(msEvalRegex(validation, value)) {
int c;
/* we've found a substitution and it validates correctly, now let's apply it */
tag = msSmallMalloc(strlen(key)+3);
sprintf(tag,"%%%s%%",key);
layerSubstituteString(lp,tag,value);
for(c=0; c<lp->numclasses;c++) {
classSubstituteString(lp->class[c], tag, value);
}
free(tag);
} else {
msSetError(MS_REGEXERR, "Parameter pattern validation failed." , "msValidateParameter()");
Expand Down

0 comments on commit f0e0117

Please sign in to comment.