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

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Wed Mar 30 23:15:33 PDT 2016


Author: armin11
Date: 2016-03-30 23:15:33 -0700 (Wed, 30 Mar 2016)
New Revision: 9426

Modified:
   trunk/mapbender/http/classes/class_iso19139.php
Log:
Bugfix for category handling for isoMetadata

Modified: trunk/mapbender/http/classes/class_iso19139.php
===================================================================
--- trunk/mapbender/http/classes/class_iso19139.php	2016-03-16 13:39:11 UTC (rev 9425)
+++ trunk/mapbender/http/classes/class_iso19139.php	2016-03-31 06:15:33 UTC (rev 9426)
@@ -1400,6 +1400,22 @@
 				$tablePrefix = 'layer';
 			break;
 		}
+		//check if categories are arrays or not, if not parse as integer and safe as array with one element
+		if (!is_array($this->isoCategories)) {
+			$intCategory = (integer)$this->isoCategories;
+			$this->isoCategories = array();
+			$this->isoCategories[0] = $intCategory;
+		}
+		if (!is_array($this->inspireCategorie)) {
+			$intCategory = (integer)$this->inspireCategories;
+			$this->inspireCategories = array();
+			$this->inspireCategories[0] = $intCategory;
+		}
+		if (!is_array($this->customCategories)) {
+			$intCategory = (integer)$this->customCategories;
+			$this->customCategories = array();
+			$this->customCategories[0] = $intCategory;
+		}
 		//map keys into relevant ids
 		$sqlInsert = "";
 		if (count($this->isoCategories) > 0) {



More information about the Mapbender_commits mailing list