Permalink
Browse files

Fix getCapabilities on maps with no layers

  • Loading branch information...
1 parent 0194412 commit 371e4e7c529d354e137b90010da4d5300847ba2e Alan Boudreault committed Jan 10, 2013
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 371e4e7

Please sign in to comment.