[Mapbender-commits] r10262 - trunk/mapbender/http/php
svn_mapbender at osgeo.org
svn_mapbender at osgeo.org
Wed Sep 18 01:59:52 PDT 2019
Author: armin11
Date: 2019-09-18 01:59:52 -0700 (Wed, 18 Sep 2019)
New Revision: 10262
Modified:
trunk/mapbender/http/php/mod_exportISOMetadata.php
Log:
New option to exclude some metadata records from not to be exported if they came directly from csw interfaces
Modified: trunk/mapbender/http/php/mod_exportISOMetadata.php
===================================================================
--- trunk/mapbender/http/php/mod_exportISOMetadata.php 2019-09-18 08:59:37 UTC (rev 10261)
+++ trunk/mapbender/http/php/mod_exportISOMetadata.php 2019-09-18 08:59:52 UTC (rev 10262)
@@ -21,6 +21,10 @@
require_once(dirname(__FILE__) . "/../../core/globalSettings.php");
require_once(dirname(__FILE__) . "/../classes/class_connector.php");
+if (file_exists(dirname(__FILE__)."/../../conf/exportIsoMetadata.json")) {
+ $configObject = json_decode(file_get_contents("../../conf/exportIsoMetadata.json"));
+}
+
$con = db_connect(DBSERVER,OWNER,PW);
db_select_db(DB,$con);
@@ -44,9 +48,10 @@
}
$sql = "update mb_metadata set export2csw = false where position('GetRecordById' in data) <> 0 and position('GetRecordById' in data) is not null";
-$v = array();
-$t = array();
-$res = db_prep_query($sql,$v,$t);
+if (isset($configObject->excludeFromCswExportRule) && count($configObject->excludeFromCswExportRule) > 0) {
+ $sql .= " AND metadata_id NOT IN (".implode(",", $configObject->excludeFromCswExportRule).")";
+}
+$res = db_query($sql);
$sql = "SELECT layer_id ";
$sql .= "FROM ".$wmsView." WHERE export2csw = true";
More information about the Mapbender_commits
mailing list