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

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Tue Apr 9 00:54:38 PDT 2019


Author: armin11
Date: 2019-04-09 00:54:38 -0700 (Tue, 09 Apr 2019)
New Revision: 10095

Modified:
   trunk/mapbender/http/php/mod_dataISOMetadata.php
Log:
Fix for dataset metadata proxy

Modified: trunk/mapbender/http/php/mod_dataISOMetadata.php
===================================================================
--- trunk/mapbender/http/php/mod_dataISOMetadata.php	2019-04-02 10:22:49 UTC (rev 10094)
+++ trunk/mapbender/http/php/mod_dataISOMetadata.php	2019-04-09 07:54:38 UTC (rev 10095)
@@ -215,9 +215,7 @@
 				$metadataUrlObject = new connector($mb_metadata['link']);
 				$metadataXml = $metadataUrlObject->file;
 				//TODO: exchange contact and licence information if metadata proxy is activated!
-				
 				if ($mb_metadata['md_proxy'] == true || $mb_metadata['md_proxy'] == 't') {
-					//$metadataXml1 = exchangeLicenceAndContact($metadataXml, $mb_metadata['metadata_id'], $mb_metadata['fkey_mb_group_id'], $mb_metadata['md_license_source_note']);
 					$metadataXml = exchangeLicenceAndContact($metadataXml, $mb_metadata['metadata_id'], $mb_metadata['fkey_mb_group_id'], $mb_metadata['md_license_source_note']);
 				}
 				if ($_REQUEST['VALIDATE'] != "true") {
@@ -251,7 +249,6 @@
 			//do the same as for the external case but all from caps should be harvested
 			if ($mb_metadata['harvestresult'] == 1 || $mb_metadata['harvestresult'] == '1') {
 				if ($mb_metadata['md_proxy'] == true || $mb_metadata['md_proxy'] == 't') {
-					//$metadataXml1 = exchangeLicenceAndContact($mb_metadata['data'], $mb_metadata['metadata_id'], $mb_metadata['fkey_mb_group_id'], $mb_metadata['md_license_source_note']);
 					$mb_metadata['data'] = exchangeLicenceAndContact($mb_metadata['data'], $mb_metadata['metadata_id'], $mb_metadata['fkey_mb_group_id'], $mb_metadata['md_license_source_note']);
 				}
 				if ($_REQUEST['VALIDATE'] != "true") {
@@ -371,7 +368,7 @@
 			$arrayResourceConstraintsNodeList = (array)$resourceConstraintsNodeList;
 			//TODO - if this is empty - create a new entry
 			//if (!empty($arrayResourceConstraintsNodeList)) {	
-			if (count($resourceConstraintsNodeList) > 0) {
+			if (count($resourceConstraintsNodeList) > 0 && !empty($arrayResourceConstraintsNodeList)) {
 				//$e = new mb_exception("list is not empty!");
 				//load xml from constraint generator
 				$licenseDomObject = new DOMDocument();



More information about the Mapbender_commits mailing list