Permalink
Browse files

Fix getCapabilities on maps with no layers

  • Loading branch information...
1 parent 3883aba commit 96dcc8f1c7aada6622e43b028d35a888ca7fd4a9 @jlarouche jlarouche committed Dec 18, 2012
Showing with 4 additions and 1 deletion.
  1. +4 −1 mapows.c
View
@@ -326,7 +326,7 @@ int msOWSRequestIsEnabled(mapObj *map, layerObj *layer,
if (disabled) return MS_FALSE;
}
- if (map && (map->numlayers > 0) && check_all_layers == MS_TRUE) {
+ if (map && check_all_layers == MS_TRUE) {
int i, globally_enabled = MS_FALSE;
enable_request = msOWSLookupMetadata(&map->web.metadata, namespaces, "enable_request");
globally_enabled = msOWSParseRequestMetadata(enable_request, request, &disabled);
@@ -357,6 +357,9 @@ int msOWSRequestIsEnabled(mapObj *map, layerObj *layer,
if (result || (!disabled && globally_enabled))
return MS_TRUE;
}
+
+ if (!disabled && globally_enabled)
+ return MS_TRUE;
}
return MS_FALSE;

0 comments on commit 96dcc8f

Please sign in to comment.