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

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Mon Jan 29 23:53:48 PST 2018


Author: armin11
Date: 2018-01-29 23:53:48 -0800 (Mon, 29 Jan 2018)
New Revision: 9850

Modified:
   trunk/mapbender/http/php/mod_dataISOMetadata.php
   trunk/mapbender/http/php/mod_featuretypeISOMetadata.php
   trunk/mapbender/http/php/mod_layerISOMetadata.php
Log:
Fix iso metadata generator - use email from department with first priority - only if this is not set, use email of the metadata owner.

Modified: trunk/mapbender/http/php/mod_dataISOMetadata.php
===================================================================
--- trunk/mapbender/http/php/mod_dataISOMetadata.php	2018-01-22 14:46:11 UTC (rev 9849)
+++ trunk/mapbender/http/php/mod_dataISOMetadata.php	2018-01-30 07:53:48 UTC (rev 9850)
@@ -353,7 +353,11 @@
 	//infos about the registrating department, check first if a special metadata point of contact is defined in the service table
 	$departmentMetadata = $admin->getOrgaInfoFromRegistry("metadata", $mb_metadata['metadata_id'], $mb_metadata['fkey_mb_user_id']);
 	//$e = new mb_exception($departmentMetadata['mb_user_email']);
-	$userMetadata['mb_user_email'] = $departmentMetadata['mb_user_email'];
+	if (isset($departmentMetadata['mb_group_email']) && $departmentMetadata['mb_group_email'] !== '') {
+		$userMetadata['mb_user_email'] = $departmentMetadata['mb_group_email'];
+	} else {
+		$userMetadata['mb_user_email'] = $departmentMetadata['mb_user_email'];
+	}
 	//schemas for metadata:
 	/*
 	<gmd:MD_Metadata xsi:schemaLocation="http://www.isotc211.org/2005/gmd http://schemas.opengis.net/iso/19139/20060504/gmd/gmd.xsd" xmlns:gmd="http://www.isotc211.org/2005/gmd" xmlns:gco="http://www.isotc211.org/2005/gco" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:gml="http://www.opengis.net/gml" xmlns:xlink="http://www.w3.org/1999/xlink">

Modified: trunk/mapbender/http/php/mod_featuretypeISOMetadata.php
===================================================================
--- trunk/mapbender/http/php/mod_featuretypeISOMetadata.php	2018-01-22 14:46:11 UTC (rev 9849)
+++ trunk/mapbender/http/php/mod_featuretypeISOMetadata.php	2018-01-30 07:53:48 UTC (rev 9850)
@@ -141,8 +141,11 @@
 
 	//infos about the registrating department, check first if a special metadata point of contact is defined in the service table
 	$departmentMetadata = $admin->getOrgaInfoFromRegistry("wfs", $mbMeta['wfs_id'], $mbMeta['wfs_owner']);
-	$userMetadata['mb_user_email'] = $departmentMetadata['mb_user_email'];
-
+	if (isset($departmentMetadata['mb_group_email']) && $departmentMetadata['mb_group_email'] !== '') {
+		$userMetadata['mb_user_email'] = $departmentMetadata['mb_group_email'];
+	} else {
+		$userMetadata['mb_user_email'] = $departmentMetadata['mb_user_email'];
+	}
 	//TODO: check if resource is freely available to anonymous user - which are all users who search thru metadata catalogues:
 	//$hasPermission=$admin->getLayerPermission($mbMeta['wfs_id'],$mbMeta['layer_name'],PUBLIC_USER); ##################
 

Modified: trunk/mapbender/http/php/mod_layerISOMetadata.php
===================================================================
--- trunk/mapbender/http/php/mod_layerISOMetadata.php	2018-01-22 14:46:11 UTC (rev 9849)
+++ trunk/mapbender/http/php/mod_layerISOMetadata.php	2018-01-30 07:53:48 UTC (rev 9850)
@@ -129,8 +129,11 @@
 
 	//infos about the registrating department, check first if a special metadata point of contact is defined in the service table
 	$departmentMetadata = $admin->getOrgaInfoFromRegistry("wms", $mapbenderMetadata['wms_id'], $mapbenderMetadata['wms_owner']);
-	$userMetadata['mb_user_email'] = $departmentMetadata['mb_user_email'];
-
+	if (isset($departmentMetadata['mb_group_email']) && $departmentMetadata['mb_group_email'] !== '') {
+		$userMetadata['mb_user_email'] = $departmentMetadata['mb_group_email'];
+	} else {
+		$userMetadata['mb_user_email'] = $departmentMetadata['mb_user_email'];
+	}
 	//check if resource is freely available to anonymous user - which are all users who search thru metadata catalogues:
 	$hasPermission=$admin->getLayerPermission($mapbenderMetadata['wms_id'],$mapbenderMetadata['layer_name'],PUBLIC_USER);
 



More information about the Mapbender_commits mailing list