[Mapbender-commits] r8297 - trunk/mapbender/http/php
svn_mapbender at osgeo.org
svn_mapbender at osgeo.org
Fri Mar 30 02:35:52 EDT 2012
Author: armin11
Date: 2012-03-29 23:35:52 -0700 (Thu, 29 Mar 2012)
New Revision: 8297
Modified:
trunk/mapbender/http/php/wms.php
Log:
Bugfix for output of mapbender capabilities if layer is at arbitray hierachylevel
Modified: trunk/mapbender/http/php/wms.php
===================================================================
--- trunk/mapbender/http/php/wms.php 2012-03-28 13:39:53 UTC (rev 8296)
+++ trunk/mapbender/http/php/wms.php 2012-03-30 06:35:52 UTC (rev 8297)
@@ -941,16 +941,20 @@
#</armin>
-$e = new mb_exception("wms.php: read sublayer:");
+$e = new mb_notice("wms.php: read sublayer:");
while ($sub_layer_row = db_fetch_array($res_sub_layer_sql)) {
#Creating layer node
$sub_layer = $doc->createElement("Layer");
- //$e = new mb_exception("wms.php: layer_parent:".$sub_layer_row['layer_parent']);
+ $e = new mb_notice("wms.php: layer_parent:".$sub_layer_row['layer_parent']);
$parent = $parentLayerArray[$sub_layer_row['layer_parent']];
-
+ $e = new mb_notice("wms.php: type of parent:".gettype($parent));
+ if (gettype($parent) == "NULL") {
+ $e = new mb_exception("wms.php: layer_parent not found in parent array - root layer info will be used!");
+ $parent = $parentLayerArray[0];
+ }
$sub_layer = $parent->appendChild($sub_layer);
if($sub_layer_row['layer_queryable'] <> "" AND $sub_layer_row['layer_queryable'] <> NULL) {
More information about the Mapbender_commits
mailing list