[Mapbender-commits] r8759 - trunk/mapbender/http/php

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Wed Jan 22 08:52:18 PST 2014


Author: armin11
Date: 2014-01-22 08:52:18 -0800 (Wed, 22 Jan 2014)
New Revision: 8759

Modified:
   trunk/mapbender/http/php/wms.php
Log:
Bugfix for AuthorityURL see INSPIRE Validator 2: http://inspire-geoportal.ec.europa.eu/validator2/changes.xml

Modified: trunk/mapbender/http/php/wms.php
===================================================================
--- trunk/mapbender/http/php/wms.php	2014-01-10 12:03:31 UTC (rev 8758)
+++ trunk/mapbender/http/php/wms.php	2014-01-22 16:52:18 UTC (rev 8759)
@@ -960,7 +960,7 @@
 //call function for sublayer element
 
 //*************************************************
-function createLayerElement ($doc, $wmsId, $layerRow, $wmsRow) {
+function createLayerElement ($doc, $wmsId, $layerRow, $wmsRow, $AuthorityName) {
 	#Creating single layer node
 	$layer = $doc->createElement("Layer");
     	if($layerRow['layer_queryable'] <> "" AND $layerRow['layer_queryable'] <> NULL) {
@@ -1098,8 +1098,9 @@
 		}
 		//create Identifier tags
 		$Identifier = $doc->createElement("Identifier");
+		$Identifier->setAttribute('authority', $AuthorityName);
+		//$Identifier->setAttribute('mist', $AuthorityName);
 		$Identifier = $layer->appendChild($Identifier);
-		$Identifier->setAttribute('authority', $AuthorityName);
 		$IdentifierText = $doc->createTextNode($datasetId);
     		$IdentifierText = $Identifier->appendChild($IdentifierText);
 		//$e = new mb_exception("i: ".$i);
@@ -1286,7 +1287,7 @@
 	//$e = new mb_exception($sub_layer_sql);
 	$res_sub_layer_sql = db_prep_query($sub_layer_sql, $v, $t);
 	while ($sub_layer_row = db_fetch_array($res_sub_layer_sql)) {
-		$subLayer = createLayerElement($doc, $wmsId, $sub_layer_row, $wms_row);
+		$subLayer = createLayerElement($doc, $wmsId, $sub_layer_row, $wms_row, $AuthorityName);
 		//recursive creation
 		createLayerTree($sub_layer_row['layer_pos'], $withChilds, $layerId, $subLayer, $wmsId, $doc, $wms_row);
 		$layer->appendChild($subLayer);
@@ -1303,12 +1304,12 @@
 //TODO: root layer is always there but the following pulls only the sublayer and not the requested layer by its own!! - todo: don't use the root layer every time!!! pull the requested layer instead but pull all srs and things which are inherited from the root layer or the parents from this layer - it is not always easy if the hirarchy is nested much - pull all parents - maybe a thing for class_administration!
 if ($withChilds) {
 	//create layer itself first!
-	$subLayer = createLayerElement($doc, $wmsId, $row, $wms_row);
+	$subLayer = createLayerElement($doc, $wmsId, $row, $wms_row, $AuthorityName);
 	
 	createLayerTree($layerPos, $withChilds, $layerId, $subLayer, $wms_row['wms_id'], $doc, $wms_row);
 } else {
 	//only create one layer
-	$subLayer = createLayerElement($doc, $wmsId, $row, $wms_row);
+	$subLayer = createLayerElement($doc, $wmsId, $row, $wms_row, $AuthorityName);
 }
 $layer->appendChild($subLayer);
 header("Content-type: application/xhtml+xml; charset=UTF-8");



More information about the Mapbender_commits mailing list