[Mapbender-commits] r7778 - trunk/mapbender/http/php
svn_mapbender at osgeo.org
svn_mapbender at osgeo.org
Mon Apr 18 09:07:23 EDT 2011
Author: armin11
Date: 2011-04-18 06:07:23 -0700 (Mon, 18 Apr 2011)
New Revision: 7778
Modified:
trunk/mapbender/http/php/mod_showMetadata.php
Log:
bugfix by show original capabilities
Modified: trunk/mapbender/http/php/mod_showMetadata.php
===================================================================
--- trunk/mapbender/http/php/mod_showMetadata.php 2011-04-15 09:34:25 UTC (rev 7777)
+++ trunk/mapbender/http/php/mod_showMetadata.php 2011-04-18 13:07:23 UTC (rev 7778)
@@ -20,6 +20,7 @@
require_once dirname(__FILE__) . "/../../core/globalSettings.php";
require_once dirname(__FILE__)."/../classes/class_connector.php";
require_once dirname(__FILE__) . "/../classes/class_user.php";
+require_once dirname(__FILE__) . "/../classes/class_wms.php";
require_once dirname(__FILE__) . "/../../tools/wms_extent/extent_service.conf";
//GET:
@@ -994,7 +995,9 @@
if ($resource == 'wms' or $resource == 'layer'){
$html .= $t_a.$translation['mapbenderCapabilities'].$t_b."<a href = '../php/wms.php?layer_id=".$layerId."&PHPSESSID=".session_id()."&REQUEST=GetCapabilities&VERSION=1.1.1&SERVICE=WMS' target=_blank>".$translation['capabilities']."</a>".$t_c;
- $html .= $t_a.$translation['originalCapabilities'].$t_b."<a href = '".$resourceMetadata['wms_getcapabilities']."&REQUEST=GetCapabilities&VERSION=1.1.1&SERVICE=WMS' target=_blank>".$translation['capabilities']."</a>".$t_c;
+$capUrl = $resourceMetadata['wms_getcapabilities'].getConjunctionCharacter($resourceMetadata['wms_getcapabilities']).'REQUEST=GetCapabilities&VERSION=1.1.1&SERVICE=WMS';
+ $html .= $t_a.$translation['originalCapabilities'].$t_b."<a href = '".$capUrl."' target=_blank>".$translation['capabilities']."</a>".$t_c;
+
$html .= $t_a.$translation['inspireCapabilities'].$t_b."<a href = '../php/wms.php?layer_id=".$layerId."&PHPSESSID=".session_id()."&INSPIRE=1&REQUEST=GetCapabilities&VERSION=1.1.1&SERVICE=WMS' target=_blank>".$translation['capabilities']."</a>".$t_c;
$html .= $t_a.$translation['inspireMetadata'].$t_b."<a href='../php/mod_layerISOMetadata.php?SERVICE=WMS&outputFormat=iso19139&Id=". $layerId."' target=_blank ><img style='border: none;' src='../img/inspire_tr_36.png' title='".$translation['inspireMetadata']."' style='width:34px;height:34px' alt='' /></a>".$t_c;
$html .= $t_a.$translation['inspireMetadataValidation'].$t_b."<a href='../php/mod_layerISOMetadata.php?SERVICE=WMS&outputFormat=iso19139&Id=".$layerId."&validate=true' target=_blank title='".$translation['inspireMetadataValidation']."'>".$translation['showInspireMetadataValidation']."</a>".$t_c;
@@ -1083,6 +1086,23 @@
return array("x" => $minx, "y" => $miny);
}
+function getConjunctionCharacter ($url) {
+ if (mb_strpos($url, "?") !== false) {
+ if (mb_substr($url, mb_strlen($url)-1, 1) == "?") {
+ return "";
+ }
+ else if (mb_substr($url, mb_strlen($url)-1, 1) == "&"){
+ return "";
+ }
+ else {
+ return "&";
+ }
+ }
+ else {
+ return "?";
+ }
+ return "";
+}
?>
More information about the Mapbender_commits
mailing list