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

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Thu Feb 25 08:04:32 EST 2010


Author: verenadiewald
Date: 2010-02-25 08:04:31 -0500 (Thu, 25 Feb 2010)
New Revision: 5666

Modified:
   trunk/mapbender/http/php/mod_addWMSfromfilteredList_server.php
Log:
http://trac.osgeo.org/mapbender/ticket/613

Modified: trunk/mapbender/http/php/mod_addWMSfromfilteredList_server.php
===================================================================
--- trunk/mapbender/http/php/mod_addWMSfromfilteredList_server.php	2010-02-25 10:54:21 UTC (rev 5665)
+++ trunk/mapbender/http/php/mod_addWMSfromfilteredList_server.php	2010-02-25 13:04:31 UTC (rev 5666)
@@ -97,7 +97,16 @@
 	$res = db_prep_query($sql,$v,$t);
 	
 	while ($row = db_fetch_array($res)) {
-		$resultArray = array("id" => $row["wms_id"], "title" => $row["wms_title"], "abstract" => $row["wms_abstract"], "getCapabilitiesUrl" => $row["wms_getcapabilities"], "version" => $row["wms_version"]);
+		$owsproxy = $admin->getWMSOWSstring($row["wms_id"]);
+		if ($owsproxy && $owsproxy != "") {
+			$owsproxyUrl = OWSPROXY."/".session_id()."/".$owsproxy."?";
+			$wmsUrl = $owsproxyUrl;
+		}
+		else {
+			$wmsUrl = $row["wms_getcapabilities"];
+		}
+		
+		$resultArray = array("id" => $row["wms_id"], "title" => $row["wms_title"], "abstract" => $row["wms_abstract"], "getCapabilitiesUrl" => $wmsUrl, "version" => $row["wms_version"]);
 		array_push($resultObj["wms"], $resultArray);
 	}							 
 }
@@ -112,7 +121,16 @@
 	$res = db_prep_query($sql, $v, $t);
 	
 	while ($row = db_fetch_array($res)) {
-		$resultArray = array("id" => $row["wms_id"], "title" => $row["wms_title"], "abstract" => $row["wms_abstract"], "getCapabilitiesUrl" => $row["wms_getcapabilities"], "version" => $row["wms_version"]);
+		$owsproxy = $admin->getWMSOWSstring($row["wms_id"]);
+		if ($owsproxy && $owsproxy != "") {
+			$owsproxyUrl = OWSPROXY."/".session_id()."/".$owsproxy."?";
+			$wmsUrl = $owsproxyUrl;
+		}
+		else {
+			$wmsUrl = $row["wms_getcapabilities"];
+		}
+		
+		$resultArray = array("id" => $row["wms_id"], "title" => $row["wms_title"], "abstract" => $row["wms_abstract"], "getCapabilitiesUrl" => $wmsUrl, "version" => $row["wms_version"]);
 		array_push($resultObj["wms"], $resultArray);
 	}		
 }
@@ -126,11 +144,20 @@
 	$res = db_prep_query($sql, $v, $t);
 	
 	while ($row = db_fetch_array($res)) {
+		$owsproxy = $admin->getWMSOWSstring($row["wms_id"]);
+		if ($owsproxy && $owsproxy != "") {
+			$owsproxyUrl = OWSPROXY."/".session_id()."/".$owsproxy."?";
+			$wmsUrl = $owsproxyUrl;
+		}
+		else {
+			$wmsUrl = $row["wms_getcapabilities"];
+		}
+		
 		$resultArray = array(
 			"id" => $row["wms_id"], 
 			"title" => $row["wms_title"], 
 			"abstract" => $row["wms_abstract"], 
-			"getCapabilitiesUrl" => $row["wms_getcapabilities"], 
+			"getCapabilitiesUrl" => $wmsUrl, 
 			"version" => $row["wms_version"]
 		);
 		array_push($resultObj["wms"], $resultArray);



More information about the Mapbender_commits mailing list