[Mapbender-commits] r10390 - trunk/mapbender/http/php
svn_mapbender at osgeo.org
svn_mapbender at osgeo.org
Wed Jan 22 06:54:04 PST 2020
Author: armin11
Date: 2020-01-22 06:54:04 -0800 (Wed, 22 Jan 2020)
New Revision: 10390
Modified:
trunk/mapbender/http/php/mod_callCswMetadata.php
trunk/mapbender/http/php/mod_getCoupledResourcesForDataset.php
Log:
Bugfix for resolving dataset identifier
Modified: trunk/mapbender/http/php/mod_callCswMetadata.php
===================================================================
--- trunk/mapbender/http/php/mod_callCswMetadata.php 2020-01-21 16:42:58 UTC (rev 10389)
+++ trunk/mapbender/http/php/mod_callCswMetadata.php 2020-01-22 14:54:04 UTC (rev 10390)
@@ -483,7 +483,7 @@
$combineTextOption = "multiple"; //"multiple","single"
switch ($combineTextOption) {
case "single":
- $fullTextFilter .= '<ogc:PropertyIsLike wildCard="*" singleChar="_" escapeChar="">';
+ $fullTextFilter .= '<ogc:PropertyIsLike wildCard="*" singleChar="_" escapeChar="/">';
$fullTextFilter .= '<ogc:PropertyName>AnyText</ogc:PropertyName>';
if (count($searchTextArray) > 1) {
$fullTextFilter .= '<ogc:Literal>*'.implode('*', $searchTextArray).'*</ogc:Literal>';
@@ -502,7 +502,7 @@
//$e = new mb_exception($searchTextArray[0]."".gettype($searchTextArray));
foreach($searchTextArray as $queryString) {
//$e = new mb_exception("querystring: ".$queryString);
- $fullTextFilter .= '<ogc:PropertyIsLike wildCard="*" singleChar="_" escapeChar="">';
+ $fullTextFilter .= '<ogc:PropertyIsLike wildCard="*" singleChar="_" escapeChar="/">';
$fullTextFilter .= '<ogc:PropertyName>AnyText</ogc:PropertyName>';
/*if($queryString != '*'){
$queryString = '*' . explode($queryString) . '*';
@@ -1016,6 +1016,7 @@
//https://stackoverflow.com/questions/23652082/json-encode-issue-when-parsing-array-with-portuguese-character-in-php - use: JSON_PARTIAL_OUTPUT_ON_ERROR
//add filter object
$resultObject->searchFilter = $queryJSON->searchFilter;
+header('Content-Type: application/json');
echo json_encode($resultObject, JSON_PARTIAL_OUTPUT_ON_ERROR);
//}
//************************************************************************************
Modified: trunk/mapbender/http/php/mod_getCoupledResourcesForDataset.php
===================================================================
--- trunk/mapbender/http/php/mod_getCoupledResourcesForDataset.php 2020-01-21 16:42:58 UTC (rev 10389)
+++ trunk/mapbender/http/php/mod_getCoupledResourcesForDataset.php 2020-01-22 14:54:04 UTC (rev 10390)
@@ -218,8 +218,11 @@
//$e = new mb_exception("php/mod_getCoupledResourcesForDataset.php: datasetid from getrecordbyid: ".$mbMetadata->datasetId);
$operation = "getrecordsresolvecoupling";
$getrecordId = $mbMetadata->fileIdentifier;
- $datasetId = str_replace('&','&',rtrim($mbMetadata->datasetIdCodeSpace, '/').'/'.$mbMetadata->datasetId);
-
+ if ($mbMetadata->datasetIdCodeSpace != '') {
+ $datasetId = str_replace('&','&',rtrim($mbMetadata->datasetIdCodeSpace, '/').'/'.$mbMetadata->datasetId);
+ } else {
+ $datasetId = (string)$mbMetadata->datasetId;
+ }
$recordType = 'service';
$cswResponseObject = $cswClient->doRequest(false, $operation, $getrecordId, false, $recordType, false, false, false, $datasetId, $csw);
$serviceMetadataUrls = array();
More information about the Mapbender_commits
mailing list