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

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Thu Jun 14 03:04:24 PDT 2018


Author: armin11
Date: 2018-06-14 03:04:23 -0700 (Thu, 14 Jun 2018)
New Revision: 9919

Modified:
   trunk/mapbender/http/php/mod_showMetadata.php
Log:
Fix for showing wfs 2.X+ wfs urls in metadata module

Modified: trunk/mapbender/http/php/mod_showMetadata.php
===================================================================
--- trunk/mapbender/http/php/mod_showMetadata.php	2018-06-14 09:47:32 UTC (rev 9918)
+++ trunk/mapbender/http/php/mod_showMetadata.php	2018-06-14 10:04:23 UTC (rev 9919)
@@ -1135,11 +1135,21 @@
 		$describeFeaturetypeUrl = $mapbenderServerUrl."/registry/wfs/".$resourceMetadata['serviceid']."?";
 		$wfsGetCapabilitiesUrl = $describeFeaturetypeUrl;
 	}
+	switch ($resourceMetadata['serviceversion']) {
+		case "2.0.0":
+			$featureTypeName = "typeNames";
+			break;
+		case "2.0.2":
+			$featureTypeName = "typeNames";
+			break;
+		default:
+			$featureTypeName = "typeName";
+			break;
+	}
 }
- 
+
 if (isset($resourceMetadata['wfs_describefeaturetype']) && ($resourceMetadata['wfs_describefeaturetype'] != '')) {
-	$html .= $t_a.$translation['describeFeaturetype'].$t_b."<a href='".$describeFeaturetypeUrl."SERVICE=WFS&VERSION=".$resourceMetadata['serviceversion']."&REQUEST=DescribeFeatureType&typename=".$resourceMetadata['contentname']."' >Link</a>".$t_c;
-	#$html .= $t_a.$translation['describeFeaturetype'].$t_b."<a href='".$resourceMetadata['wfs_describefeaturetype']."&REQUEST=DescribeFeaturetype&typename=".$resourceMetadata['contentname']."' >Link</a>".$t_c;
+	$html .= $t_a.$translation['describeFeaturetype'].$t_b."<a href='".$describeFeaturetypeUrl."SERVICE=WFS&VERSION=".$resourceMetadata['serviceversion']."&REQUEST=DescribeFeatureType&".$featureTypeName."=".$resourceMetadata['contentname']."' >Link</a>".$t_c;
 }
 
 
@@ -1506,7 +1516,8 @@
 	$html .= $t_a.$translation['inspireMetadataValidation'].$t_b."<a href='../php/mod_featuretypeISOMetadata.php?SERVICE=WFS&outputFormat=iso19139&Id=".$featuretypeId."&validate=true' target=_blank title='".$translation['inspireMetadataValidation']."'>".$translation['showInspireMetadataValidation']."</a>".$t_c;
 	//if service is secured and http_auth is adjusted show secured url
 	if ($resourceSecured) {
-		$securedLink = HTTP_AUTH_PROXY."/".$featuretypeId."?".$gcWfsParams;
+		$securedLink = $mapbenderServerUrl."/registry/wfs/".$resourceMetadata['serviceid']."?".$gcWfsParams;
+
 		$html .= $t_a.$translation['securedCapabilities'].$t_b."<img class='normalizeicon' src='../img/gnome/edit-select-all.png'><a class='linkjs' href = '".$securedLink."' target=_blank>".$translation['showDocument']."</a><br /> <img class='normalizeicon' src='../img/osgeo_graphics/geosilk/link.png'><a class='linkjs' onclick='showCapabilitiesUrl(\"".$securedLink."\",\"".$translation['securedCapabilities']."\");'>".$translation['showLink']."</a>".$t_c;
 	}
 }



More information about the Mapbender_commits mailing list