[Mapbender-commits] r7701 - in trunk/mapbender/http: classes plugins

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Sun Mar 13 06:42:49 EDT 2011


Author: armin11
Date: 2011-03-13 03:42:49 -0700 (Sun, 13 Mar 2011)
New Revision: 7701

Modified:
   trunk/mapbender/http/classes/class_wms.php
   trunk/mapbender/http/plugins/mb_metadata_server.php
Log:
Bugfix some problems when using the wms metadata editor - one problems remains: the searchable flag is not updated - should be fixed fast.

Modified: trunk/mapbender/http/classes/class_wms.php
===================================================================
--- trunk/mapbender/http/classes/class_wms.php	2011-03-13 10:35:14 UTC (rev 7700)
+++ trunk/mapbender/http/classes/class_wms.php	2011-03-13 10:42:49 UTC (rev 7701)
@@ -2747,7 +2747,7 @@
 	* creatObjfromDBNoGui
 	*
 	*/ 
-	  function createObjFromDBNoGui($wms_id){
+	  function createObjFromDBNoGui($wms_id, $withProxyUrls = true){
 	   	$sql = "Select * from wms where wms_id = $1 ";
 		$v = array($wms_id);
 		$t = array('i');
@@ -2760,7 +2760,8 @@
 			$this->wms_abstract = administration::convertIncomingString($this->stripEndlineAndCarriageReturn($row2["wms_abstract"]));
 			$wmsowsproxy = $row2["wms_owsproxy"];
 			#$wmsowsproxy = "test";
-			if($wmsowsproxy != ""){
+			//exchange the method urls with owsproxy urls if needed - default is to do it, but sometimes this is not usefull!
+			if($wmsowsproxy != "" && $withProxyUrls){
 				$owsproxyurl = OWSPROXY."/".session_id()."/".$wmsowsproxy."?";
 				$this->wms_getmap = $owsproxyurl;
 				$this->wms_getcapabilities =  $owsproxyurl;
@@ -2777,6 +2778,7 @@
 			// be encoded to the original encoding
 			// if different from the database encoding
 			$this->wms_getcapabilities_doc = $row2["wms_getcapabilities_doc"];
+			$this->wms_upload_url = $row2["wms_upload_url"];
 			$this->wms_filter = $row2["wms_filter"];
 			$this->wms_supportsld = $row2["wms_supportsld"];
 			$this->wms_userlayer = $row2["wms_userlayer"];
@@ -2798,6 +2800,7 @@
 			$this->country = $row2["country"];
 			$this->contactelectronicmailaddress = $row2["contactelectronicmailaddress"];
 			$this->wms_network_access = $row2["wms_network_access"];
+			$this->uuid = $row2["uuid"];
 			
 			#some default
 			$this->gui_wms_visible = 1;
@@ -2853,6 +2856,7 @@
 			$this->objLayer[$layer_cnt]->layer_queryable =$row2["layer_queryable"];
 			$this->objLayer[$layer_cnt]->layer_minscale =$row2["layer_minscale"];
 			$this->objLayer[$layer_cnt]->layer_maxscale = $row2["layer_maxscale"];
+			$this->objLayer[$layer_cnt]->uuid = $row2["uuid"];
 			
 			if($this->objLayer[$layer_cnt]->layer_minscale == ""){
 				$this->objLayer[$layer_cnt]->layer_minscale = 0;

Modified: trunk/mapbender/http/plugins/mb_metadata_server.php
===================================================================
--- trunk/mapbender/http/plugins/mb_metadata_server.php	2011-03-13 10:35:14 UTC (rev 7700)
+++ trunk/mapbender/http/plugins/mb_metadata_server.php	2011-03-13 10:42:49 UTC (rev 7701)
@@ -77,7 +77,7 @@
 		getWms($wmsId);
 
 		$wms = new wms();
-		$wms->createObjFromDBNoGui($wmsId);
+		$wms->createObjFromDBNoGui($wmsId);//here the owsproxyurls will be read out - to make previews with proxy urls
 
 		$fields = array(
 			"wms_id", 
@@ -324,7 +324,7 @@
 		getWms($wmsId);
 		
 		$wms = new wms();
-		$wms->createObjFromDBNoGui($wmsId);
+		$wms->createObjFromDBNoGui($wmsId,false);//here the original urls will be used - cause the object will used to update the wms table
 		
 		$columns = array(
 			"wms_abstract", 



More information about the Mapbender_commits mailing list