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

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Thu Feb 21 02:40:25 PST 2013


Author: armin11
Date: 2013-02-21 02:40:24 -0800 (Thu, 21 Feb 2013)
New Revision: 8567

Modified:
   trunk/mapbender/http/php/wms.php
Log:
little bugfix for capabilities proxy

Modified: trunk/mapbender/http/php/wms.php
===================================================================
--- trunk/mapbender/http/php/wms.php	2013-02-21 09:15:41 UTC (rev 8566)
+++ trunk/mapbender/http/php/wms.php	2013-02-21 10:40:24 UTC (rev 8567)
@@ -210,9 +210,6 @@
 //
 $monitor = new Layer_load_count();
 $monitor->increment($layerId);
-
-
-
 // ---------------------------------------------------------------------------
 //
 // START TO CREATE CAPABILITIES DOC
@@ -320,23 +317,14 @@
 	}
 } 
 
-//Creating the "OnlineResource" node
-//if($wms_row['wms_getcapabilities'] <> "" AND $wms_row['wms_getcapabilities'] <> NULL) {
-    $onlineResource = $doc->createElement("OnlineResource");
+	//Creating the "OnlineResource" node
+    	$onlineResource = $doc->createElement("OnlineResource");
 	$onlineResource = $service->appendChild($onlineResource);
 	$onlineResource->setAttribute("xmlns:xlink", "http://www.w3.org/1999/xlink" );
 	$onlineResource->setAttribute("xlink:href", $wms_row['wms_getcapabilities']);
-/*	$onlRes = $_SERVER["HTTP_HOST"] . $_SERVER["SCRIPT_NAME"] . "?layer_id=" . $layerId."&".session_name()."=".$sessionId;
-	if (isset($_SERVER["HTTPS"])) {
-		$onlRes = "https://" . $onlRes;
-	}
-	else {
-		$onlRes = "http://" . $onlRes;
-	}*/
-	$onlineResource->setAttribute("xlink:href", $onlRes);
 	$onlineResource->setAttribute("xlink:type", "simple");
-//}
 
+
 #Insert contact information
 
 #Creating "Contact Information" node
@@ -542,53 +530,22 @@
 $get = $HTTP->appendChild($get);
 
 #Creating the "OnlineResource" node
-
-//if ($wms_row['wms_getcapabilities'] <> "" AND $wms_row['wms_getcapabilities'] <> NULL) {
 	$onlineResource = $doc->createElement("OnlineResource");
 	$onlineResource = $get->appendChild($onlineResource);
 	$onlineResource->setAttribute("xmlns:xlink", "http://www.w3.org/1999/xlink");
 	$onlineResource->setAttribute("xlink:href", $wms_row['wms_getcapabilities']);
-/*	$onlRes = $_SERVER["HTTP_HOST"] . $_SERVER["SCRIPT_NAME"] . "?layer_id=" . $layerId;
-
-	if ($inspire) {
-	$onlRes = $onlRes."&INSPIRE=1";
-	}
-
-	if (isset($_SERVER["HTTPS"])) {
-		$onlRes = "https://" . $onlRes;
-	}
-	else {
-		$onlRes = "http://" . $onlRes;
-	}*/
-	$onlineResource->setAttribute("xlink:href", $onlRes);
 	$onlineResource->setAttribute("xlink:type", "simple");		
-//}
 
 #Creating the "Post" node
 $post = $doc->createElement("Post");
 $post = $HTTP->appendChild($post);
 
 #Creating the "OnlineResource" node
-//if ($wms_row['wms_getcapabilities'] <> "" AND $wms_row['wms_getcapabilities'] <> NULL) {
 	$onlineResource = $doc->createElement("OnlineResource");
 	$onlineResource = $post->appendChild($onlineResource);
 	$onlineResource->setAttribute("xmlns:xlink", "http://www.w3.org/1999/xlink");
 	$onlineResource->setAttribute("xlink:href", $wms_row['wms_getcapabilities']);
-/*	$onlRes = $_SERVER["HTTP_HOST"] . $_SERVER["SCRIPT_NAME"] . "?layer_id=" . $layerId;
-
-	if ($inspire) {
-	$onlRes = $onlRes."&INSPIRE=1&";
-	}
-	
-	if (isset($_SERVER["HTTPS"])) {
-		$onlRes = "https://" . $onlRes;
-	}
-	else {
-		$onlRes = "http://" . $onlRes;
-	}*/
-	$onlineResource->setAttribute("xlink:href", $onlRes);
 	$onlineResource->setAttribute("xlink:type", "simple");
-//}
 
 ##########################################################
 #GetMap	



More information about the Mapbender_commits mailing list