Skip to content

Commit

Permalink
Merge branch 'branch-6-2'
Browse files Browse the repository at this point in the history
  • Loading branch information
szekerest committed Mar 4, 2013
2 parents dc4f7b3 + 1e38acb commit e8eca77
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions mapfile.c
Expand Up @@ -3656,6 +3656,7 @@ static void writeClass(FILE *stream, int indent, classObj *class)
writeString(stream, indent, "TEMPLATE", NULL, class->template);
writeExpression(stream, indent, "TEXT", &(class->text));
writeString(stream, indent, "TITLE", NULL, class->title);
writeHashTable(stream, indent, "VALIDATION", &(class->validation));
writeBlockEnd(stream, indent, "CLASS");
}

Expand Down
8 changes: 7 additions & 1 deletion mapwms.c
Expand Up @@ -2394,6 +2394,8 @@ int msDumpLayer(mapObj *map, layerObj *lp, int nVersion, const char *script_url_
group_layers[0] = lp->index;
if (isUsedInNestedGroup[lp->index]) {
for (j=0; j < map->numlayers; j++) {
if (j == lp->index)
continue;
for(k = 0; k < numNestedGroups[j]; k++) {
if (strcasecmp(lp->name, nestedGroups[j][k]) == 0) {
group_layers[num_layers++] = j;
Expand Down Expand Up @@ -2619,6 +2621,7 @@ void msWMSPrintNestedGroups(mapObj* map, int nVersion, char* pabLayerProcessed,
int index, int level, char*** nestedGroups, int* numNestedGroups, int* isUsedInNestedGroup, const char *script_url_encoded, const char *validated_language)
{
int i, j;
int groupAdded = 0;
char *indent = NULL;
indent = msStrdup("");

Expand All @@ -2644,10 +2647,12 @@ void msWMSPrintNestedGroups(mapObj* map, int nVersion, char* pabLayerProcessed,
if (!pabLayerProcessed[j]) {
msDumpLayer(map, GET_LAYER(map, j), nVersion, script_url_encoded, indent, validated_language, MS_TRUE);
pabLayerProcessed[j] = 1; /* done */
groupAdded = 1;
}
} else {
msIO_printf("%s <Layer>\n", indent);
msIO_printf("%s <Title>%s</Title>\n", indent, nestedGroups[index][level]);
groupAdded = 1;
}

/* Look for one group deeper in the current layer */
Expand All @@ -2674,7 +2679,8 @@ void msWMSPrintNestedGroups(mapObj* map, int nVersion, char* pabLayerProcessed,
}
}
/* Close group layer block */
msIO_printf("%s </Layer>\n", indent);
if (groupAdded)
msIO_printf("%s </Layer>\n", indent);
}

msFree(indent);
Expand Down

0 comments on commit e8eca77

Please sign in to comment.