[Mapbender-commits] r10069 - trunk/mapbender/http/classes

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Thu Mar 7 07:50:25 PST 2019


Author: armin11
Date: 2019-03-07 07:50:25 -0800 (Thu, 07 Mar 2019)
New Revision: 10069

Modified:
   trunk/mapbender/http/classes/class_syncCkan.php
Log:
Fix for ckan sync interface

Modified: trunk/mapbender/http/classes/class_syncCkan.php
===================================================================
--- trunk/mapbender/http/classes/class_syncCkan.php	2019-03-06 19:54:56 UTC (rev 10068)
+++ trunk/mapbender/http/classes/class_syncCkan.php	2019-03-07 15:50:25 UTC (rev 10069)
@@ -835,7 +835,7 @@
 		$orgaQuery->include_dataset_count = true;
 		$result = $ckan->action_organization_list_for_user(json_encode($orgaQuery));
 		//$e = new mb_exception("orga list: ". json_encode($result));
-               // $result = $ckan->action_organization_list_for_user();
+                // $result = $ckan->action_organization_list_for_user();
                 foreach($result->result as $orga) {
                     if ($orga->id == $organization["ckan_uuid"]) {
                         $syncListResult->geoportal_organization[$numberGeoportalOrga]->ckan_orga_ident = $organization["ckan_uuid"];
@@ -908,8 +908,8 @@
                         } else {
 			   $sql = "SELECT metadata_id as ressource_id, 'metadata' as ressource_type, uuid::varchar, title, lastchanged, fkey_termsofuse_id, f_get_coupled_resources(metadata_id) from mb_metadata LEFT OUTER JOIN md_termsofuse ON mb_metadata.metadata_id = md_termsofuse.fkey_metadata_id WHERE fkey_mb_group_id = $1 AND export2csw IS true AND md_termsofuse.fkey_termsofuse_id in (select termsofuse_id from termsofuse where isopen = 1)";
 			    $sql .= " UNION SELECT layer_metadata.ressource_id, layer_metadata.ressource_type, layer_metadata.uuid::varchar, layer_metadata.title, to_timestamp(layer_metadata.lastchanged), wms_termsofuse.fkey_termsofuse_id, '{\"coupledResources\":{\"layerIds\":[' || layer_metadata.ressource_id || '],\"featuretypeIds\":[]}}' ";
-			    $sql = "as f_get_coupled_resources FROM (SELECT layer_id as ressource_id, 'layer' as ressource_type, layer.uuid::varchar, layer_title as title, wms.wms_timestamp as lastchanged, layer.fkey_wms_id FROM layer INNER JOIN wms on layer.fkey_wms_id = wms.wms_id WHERE fkey_mb_group_id = $2 AND layer.export2csw IS true AND layer.layer_searchable = 1 AND";
-			    $sql = " layer_id NOT IN (SELECT DISTINCT fkey_layer_id FROM ows_relation_metadata WHERE fkey_layer_id IS NOT NULL)) AS layer_metadata INNER JOIN wms_termsofuse ON layer_metadata.fkey_wms_id = wms_termsofuse.fkey_wms_id AND fkey_termsofuse_id IS NOT NULL AND wms_termsofuse.fkey_termsofuse_id IN (SELECT termsofuse_id FROM termsofuse WHERE isopen = 1)";
+			    $sql .= "as f_get_coupled_resources FROM (SELECT layer_id as ressource_id, 'layer' as ressource_type, layer.uuid::varchar, layer_title as title, wms.wms_timestamp as lastchanged, layer.fkey_wms_id FROM layer INNER JOIN wms on layer.fkey_wms_id = wms.wms_id WHERE fkey_mb_group_id = $2 AND layer.export2csw IS true AND layer.layer_searchable = 1 AND";
+			    $sql .= " layer_id NOT IN (SELECT DISTINCT fkey_layer_id FROM ows_relation_metadata WHERE fkey_layer_id IS NOT NULL)) AS layer_metadata INNER JOIN wms_termsofuse ON layer_metadata.fkey_wms_id = wms_termsofuse.fkey_wms_id AND fkey_termsofuse_id IS NOT NULL AND wms_termsofuse.fkey_termsofuse_id IN (SELECT termsofuse_id FROM termsofuse WHERE isopen = 1)";
                             $v = array($organization['id'], $organization['id']);
                             $t = array('i', 'i');
                         }



More information about the Mapbender_commits mailing list