[Mapbender-commits] r5667 - branches/2.6/http/php

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Thu Feb 25 08:05:48 EST 2010


Author: verenadiewald
Date: 2010-02-25 08:05:48 -0500 (Thu, 25 Feb 2010)
New Revision: 5667

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

Modified: branches/2.6/http/php/mod_addWMSfromfilteredList_server.php
===================================================================
--- branches/2.6/http/php/mod_addWMSfromfilteredList_server.php	2010-02-25 13:04:31 UTC (rev 5666)
+++ branches/2.6/http/php/mod_addWMSfromfilteredList_server.php	2010-02-25 13:05:48 UTC (rev 5667)
@@ -95,7 +95,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);
 	}							 
 }
@@ -110,7 +119,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);
 	}		
 }
@@ -124,7 +142,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);
 	}		
 }



More information about the Mapbender_commits mailing list