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

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Wed Jul 22 07:34:35 PDT 2015


Author: armin11
Date: 2015-07-22 07:34:35 -0700 (Wed, 22 Jul 2015)
New Revision: 9264

Modified:
   trunk/mapbender/http/classes/class_iso19139.php
   trunk/mapbender/http/classes/class_metadata_new.php
Log:
Bugfix

Modified: trunk/mapbender/http/classes/class_iso19139.php
===================================================================
--- trunk/mapbender/http/classes/class_iso19139.php	2015-07-21 13:26:28 UTC (rev 9263)
+++ trunk/mapbender/http/classes/class_iso19139.php	2015-07-22 14:34:35 UTC (rev 9264)
@@ -335,8 +335,14 @@
 			$this->hierachyLevel = $this->hierachyLevel[0];
 			$this->tmpExtentBegin = $iso19139Xml->xpath('//gmd:MD_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:extent/gmd:EX_Extent/gmd:temporalElement/gmd:EX_TemporalExtent/gmd:extent/gml:TimePeriod/gml:beginPosition');
 			$this->tmpExtentBegin = $this->tmpExtentBegin[0];
+			if ($this->tmpExtentBegin == "") {
+				$this->tmpExtentBegin = "1900-01-01";
+			}
 			$this->tmpExtentEnd = $iso19139Xml->xpath('//gmd:MD_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:extent/gmd:EX_Extent/gmd:temporalElement/gmd:EX_TemporalExtent/gmd:extent/gml:TimePeriod/gml:endPosition');		
 			$this->tmpExtentEnd = $this->tmpExtentEnd[0];
+			if ($this->tmpExtentEnd == "") {
+				$this->tmpExtentEnd = "1900-01-01";
+			}
 			//spatial_res_type/spatial_res_value
 			$equivalentScale = $iso19139Xml->xpath('//gmd:MD_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:spatialResolution/gmd:MD_Resolution/gmd:equivalentScale/gmd:MD_RepresentativeFraction/gmd:denominator/gco:Integer');
 			$equivalentScale = $equivalentScale[0];
@@ -1631,6 +1637,10 @@
 			$this->createWktPolygonFromPointArray($this->polygonalExtentExterior),
 			$this->transferSize
 		);
+			$e = new mb_exception($this->tmpExtentBegin);
+			$e = new mb_exception($this->tmpExtentEnd);
+			$e = new mb_exception($this->createDate);
+			$e = new mb_exception($this->changeDate);
 			$t = array('s','s','s','s','s','s','s','s','s','s','s','s','s','b','s','s','s','s','i','i','s','s','b','s','s','s','s','s','s','POLYGON','s','s','s','i','POLYGON','d');
 			$res = db_prep_query($sql,$v,$t);
 			return $res;

Modified: trunk/mapbender/http/classes/class_metadata_new.php
===================================================================
--- trunk/mapbender/http/classes/class_metadata_new.php	2015-07-21 13:26:28 UTC (rev 9263)
+++ trunk/mapbender/http/classes/class_metadata_new.php	2015-07-22 14:34:35 UTC (rev 9264)
@@ -814,6 +814,7 @@
 	}
 
 	private function generateWMSMetadata($xmlDoc) {
+		global $admin;
 		$starttime = $this->microtime_float();
 		list($sql, $v, $t, $n) = $this->generateSearchSQL();
 		//call database search in limits
@@ -843,7 +844,7 @@
 				$this->allJSON->categories = $this->json->decode($this->keyJSON);
 				$this->allJSON->keywords =  $this->json->decode($this->catJSON);
 				//load filter from file getFromStorage
-
+				$admin = new administration();
 				$filename = $this->tempFolder."/".$this->searchId."_filter.json";
 				$fileExists = $admin->getFromStorage($filename,TMP_SEARCH_RESULT_STORAGE);
 				if ($fileExists == false) {



More information about the Mapbender_commits mailing list