[Mapbender-commits] r6242 - trunk/mapbender/http/classes

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Wed Jun 2 08:00:41 EDT 2010


Author: christoph
Date: 2010-06-02 08:00:36 -0400 (Wed, 02 Jun 2010)
New Revision: 6242

Modified:
   trunk/mapbender/http/classes/class_wms.php
Log:
timestamp, searchable, metadata

Modified: trunk/mapbender/http/classes/class_wms.php
===================================================================
--- trunk/mapbender/http/classes/class_wms.php	2010-06-02 11:52:09 UTC (rev 6241)
+++ trunk/mapbender/http/classes/class_wms.php	2010-06-02 12:00:36 UTC (rev 6242)
@@ -36,6 +36,8 @@
 	var $wms_getfeatureinfo;
 	var $wms_getlegendurl;
 	var $wms_upload_url;
+	var $wms_timestamp;
+	var $wms_timestamp_create;
 	var $wms_srs = array();
 	var $wms_termsofuse;
 	  
@@ -916,6 +918,7 @@
 			}
 			$this->objLayer[$i]->gui_layer_minscale = $this->objLayer[$i]->layer_minscale;
 			$this->objLayer[$i]->gui_layer_maxscale = $this->objLayer[$i]->layer_maxscale;
+			$this->objLayer[$i]->layer_searchable = 1;
 		}
 		for($i=0;$i<count($this->data_format);$i++){
 			if(mb_strtolower($this->data_type[$i]) == 'map' && mb_strtoupper($this->data_format[$i]) == mb_strtoupper($map_default)){
@@ -1056,6 +1059,7 @@
 		$newLayer->layer_minscale = $currentLayer["extension"]["MINSCALE"];
 		$newLayer->layer_maxscale = $currentLayer["extension"]["MAXSCALE"];
 		$newLayer->layer_metadataurl = $currentLayer["metadataurl"];
+//		$newLayer->layer_searchable = $currentLayer["searchable"];
 		$newLayer->gui_layer_wms_id = $currentLayer["extension"]["WMS_ID"];
 		$newLayer->gui_layer_status = $currentLayer["extension"]["GUI_STATUS"];
 		$newLayer->gui_layer_style = ""; // TODO: Add correct data
@@ -1205,6 +1209,8 @@
 				$this->objLayer[$i]->layer_minscale . "','". 
 				$this->objLayer[$i]->layer_maxscale ."','". 
 				$this->objLayer[$i]->layer_metadataurl ."','". 
+// will be added later, not needed now
+//				$this->objLayer[$i]->layer_searchable ."','". 
 				$this->objLayer[$i]->gui_layer_wms_id ."','". 
 				$this->objLayer[$i]->gui_layer_status ."','".
 				$this->objLayer[$i]->gui_layer_style ."','".  
@@ -1324,6 +1330,8 @@
 				$this->objLayer[$i]->layer_minscale . "','". 
 				$this->objLayer[$i]->layer_maxscale ."','". 
 				$this->objLayer[$i]->layer_metadataurl ."','". 
+// will be added later, not needed now
+//				$this->objLayer[$i]->layer_searchable ."','". 
 				$this->objLayer[$i]->gui_layer_wms_id ."','". 
 				$this->objLayer[$i]->gui_layer_status ."','".
 				$this->objLayer[$i]->gui_layer_style ."','". 
@@ -1395,9 +1403,9 @@
 		$sql.= "wms_getfeatureinfo, wms_getlegendurl, wms_getcapabilities_doc, wms_upload_url, fees, ";
 		$sql .= "accessconstraints, contactperson, contactposition, contactorganization, address, city, ";
 		$sql .= "stateorprovince, postcode, country, contactvoicetelephone, contactfacsimiletelephone, contactelectronicmailaddress, ";
-		$sql .= "wms_owner,wms_timestamp,wms_username,wms_password,wms_auth_type,";
+		$sql .= "wms_owner,wms_timestamp,wms_timestamp_create,wms_username,wms_password,wms_auth_type,";
 		$sql .= "wms_supportsld, wms_userlayer, wms_userstyle, wms_remotewfs) ";
-		$sql .= "VALUES($1,$2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12,$13,$14,$15,$16,$17,$18,$19,$20,$21,$22,$23,$24,$25,$26,$27,$28,$29,$30,$31)";
+		$sql .= "VALUES($1,$2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12,$13,$14,$15,$16,$17,$18,$19,$20,$21,$22,$23,$24,$25,$26,$27,$28,$29,$30,$31,$32)";
 		$v = array(
 			$this->wms_version,
 			$this->wms_title,
@@ -1423,6 +1431,7 @@
 			$this->contactelectronicmailaddress,
 			Mapbender::session()->get('mb_user_id'),
 			strtotime("now"),
+			strtotime("now"),
 			$username,
 			$password,
 			$authType,
@@ -1532,9 +1541,16 @@
 	}
 	function insertLayer($i,$myWMS){
 		global $con;
-		$sql = "INSERT INTO layer(fkey_wms_id, layer_pos, layer_parent, layer_name, layer_title, ";
-		$sql .= " layer_queryable, layer_minscale, layer_maxscale,layer_dataurl,layer_metadataurl,layer_abstract) ";
-		$sql .= "VALUES($1,$2,$3,$4,$5,$6,$7,$8,$9,$10,$11)";
+		$sql = <<<SQL
+
+INSERT INTO layer 
+(fkey_wms_id, layer_pos, layer_parent, layer_name, layer_title, 
+layer_queryable, layer_minscale, layer_maxscale, layer_dataurl,
+layer_metadataurl, layer_searchable, layer_abstract) 
+VALUES
+($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12)
+
+SQL;
 		if($this->objLayer[$i]->layer_id != null){
 			$tmpPos =  $this->objLayer[$i]->layer_id;
 		}
@@ -1548,7 +1564,8 @@
 				$this->objLayer[$i]->layer_title,
 				$this->objLayer[$i]->layer_queryable,$this->objLayer[$i]->layer_minscale,
 				$this->objLayer[$i]->layer_maxscale,$this->objLayer[$i]->layer_dataurl_href,
-				$this->objLayer[$i]->layer_metadataurl,$this->objLayer[$i]->layer_abstract);
+				$this->objLayer[$i]->layer_metadataurl, $this->objLayer[$i]->layer_searchable,
+				$this->objLayer[$i]->layer_abstract);
 		$t = array('i','i','s','s','s','i','i','i','s','s','s');
 		$res = db_prep_query($sql,$v,$t);
 		if(!$res){
@@ -1590,8 +1607,9 @@
 		$sql .= "layer_maxscale = $6, ";
 		$sql .= "layer_dataurl = $7, ";
 		$sql .= "layer_metadataurl = $8, ";
-		$sql .= "layer_abstract = $9 ";
-		$sql .= "WHERE layer_id = $10";
+		$sql .= "layer_searchable = $9, ";
+		$sql .= "layer_abstract = $10 ";
+		$sql .= "WHERE layer_id = $11";
 		
 		if($this->objLayer[$i]->layer_id != null){
 			$tmpPos =  $this->objLayer[$i]->layer_id;
@@ -1606,9 +1624,10 @@
 				$this->objLayer[$i]->layer_title,
 				$this->objLayer[$i]->layer_queryable,$this->objLayer[$i]->layer_minscale,
 				$this->objLayer[$i]->layer_maxscale,$this->objLayer[$i]->layer_dataurl_href,
-				$this->objLayer[$i]->layer_metadataurl,$this->objLayer[$i]->layer_abstract, $l_id		
+				$this->objLayer[$i]->layer_metadataurl, $this->objLayer[$i]->layer_searchable,
+				$this->objLayer[$i]->layer_abstract, $l_id		
 			);
-		$t = array('i','s','s','i','i','i','s','s','s','i');
+		$t = array('i','s','s','i','i','i','s','s','i', 's','i');
 		$res = db_prep_query($sql,$v,$t);
 		if($this->overwrite == true){
 			$sql = "UPDATE layer SET ";
@@ -2296,6 +2315,20 @@
 				$this->wms_userlayer = $row2["wms_userlayer"];
 				$this->wms_userstyle = $row2["wms_userstyle"];
 				$this->wms_remotewfs = $row2["wms_remotewfs"];
+				$this->wms_timestamp_create = $row2["wms_timestamp_create"];
+				$this->fees = $row2["fees"];
+				$this->accessconstraints = $row2["accessconstraints"];
+				$this->contactperson = $row2["contactperson"];
+				$this->contactposition = $row2["contactposition"];
+				$this->contactvoicetelephone = $row2["contactvoicetelephone"];
+				$this->contactfacsimiletelephone = $row2["contactfacsimiletelephone"];
+				$this->contactorganization = $row2["contactorganization"];
+				$this->address = $row2["address"];
+				$this->city = $row2["city"];
+				$this->stateorprovince = $row2["stateorprovince"];
+				$this->postcode = $row2["postcode"];
+				$this->country = $row2["country"];
+				$this->contactelectronicmailaddress = $row2["contactelectronicmailaddress"];
 				
 				$count_wms++;
 			}
@@ -2347,6 +2380,7 @@
 				$this->objLayer[$layer_cnt]->layer_title = administration::convertIncomingString($row2["layer_title"]);			
 				$this->objLayer[$layer_cnt]->layer_dataurl_href =$row2["layer_dataurl"];
 				$this->objLayer[$layer_cnt]->layer_metadataurl =$row2["layer_metadataurl"];
+				$this->objLayer[$layer_cnt]->layer_searchable =$row2["layer_searchable"];
 				$this->objLayer[$layer_cnt]->layer_pos =$row2["layer_pos"];						
 				$this->objLayer[$layer_cnt]->layer_queryable =$row2["layer_pos"];
 				$this->objLayer[$layer_cnt]->layer_queryable =$row2["layer_queryable"];
@@ -2450,6 +2484,21 @@
 			$this->wms_userlayer = $row2["wms_userlayer"];
 			$this->wms_userstyle = $row2["wms_userstyle"];
 			$this->wms_remotewfs = $row2["wms_remotewfs"];
+			$this->wms_timestamp = $row2["wms_timestamp"];
+			$this->wms_timestamp_create = $row2["wms_timestamp_create"];
+			$this->fees = $row2["fees"];
+			$this->accessconstraints = $row2["accessconstraints"];
+			$this->contactperson = $row2["contactperson"];
+			$this->contactposition = $row2["contactposition"];
+			$this->contactvoicetelephone = $row2["contactvoicetelephone"];
+			$this->contactfacsimiletelephone = $row2["contactfacsimiletelephone"];
+			$this->contactorganization = $row2["contactorganization"];
+			$this->address = $row2["address"];
+			$this->city = $row2["city"];
+			$this->stateorprovince = $row2["stateorprovince"];
+			$this->postcode = $row2["postcode"];
+			$this->country = $row2["country"];
+			$this->contactelectronicmailaddress = $row2["contactelectronicmailaddress"];
 			
 			#some default
 			$this->gui_wms_visible = 1;
@@ -2498,6 +2547,7 @@
 			$this->objLayer[$layer_cnt]->layer_title =$row2["layer_title"];			
 			$this->objLayer[$layer_cnt]->layer_dataurl_href =$row2["layer_dataurl"];
 			$this->objLayer[$layer_cnt]->layer_metadataurl =$row2["layer_metadataurl"];
+			$this->objLayer[$layer_cnt]->layer_searchable =$row2["layer_searchable"];
 			$this->objLayer[$layer_cnt]->layer_pos =$row2["layer_pos"];						
 			$this->objLayer[$layer_cnt]->layer_queryable =$row2["layer_pos"];
 			$this->objLayer[$layer_cnt]->layer_queryable =$row2["layer_queryable"];
@@ -2689,6 +2739,7 @@
 	var $layer_maxscale;	
     var $layer_dataurl_href;
     var $layer_metadataurl;
+	var $layer_searchable;
     var $layer_keyword = array();
 	var $layer_epsg = array();
 	var $layer_style = array();



More information about the Mapbender_commits mailing list