[Mapbender-commits] r9696 - trunk/mapbender/http/php

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Wed Feb 22 05:54:00 PST 2017


Author: armin11
Date: 2017-02-22 05:54:00 -0800 (Wed, 22 Feb 2017)
New Revision: 9696

Modified:
   trunk/mapbender/http/php/mod_featuretypeISOMetadata.php
Log:
Fix for empty keywords

Modified: trunk/mapbender/http/php/mod_featuretypeISOMetadata.php
===================================================================
--- trunk/mapbender/http/php/mod_featuretypeISOMetadata.php	2017-02-22 13:23:11 UTC (rev 9695)
+++ trunk/mapbender/http/php/mod_featuretypeISOMetadata.php	2017-02-22 13:54:00 UTC (rev 9696)
@@ -320,11 +320,12 @@
 	$e = new mb_notice("look for custom categories: ");
 	while ($row = db_fetch_array($res)) {
         $pos++;
-        $xmlBuilder->addValue($MD_Metadata,
-            './gmd:identificationInfo/srv:SV_ServiceIdentification/gmd:descriptiveKeywords/gmd:MD_Keywords/gmd:keyword['.$pos.']/gco:CharacterString',
-            $row['keyword']);
+	if ($row['keyword'] !== null && $row['keyword'] !== '') {
+        	$xmlBuilder->addValue($MD_Metadata,
+            	'./gmd:identificationInfo/srv:SV_ServiceIdentification/gmd:descriptiveKeywords/gmd:MD_Keywords/gmd:keyword['.$pos.']/gco:CharacterString',
+            	$row['keyword']);
+		}
 	}
-
 	//Part B 3 INSPIRE Category
 	//do this only if an INSPIRE keyword (Annex I-III) is set
 	//Resource Constraints B 8



More information about the Mapbender_commits mailing list