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

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Mon Mar 26 05:30:48 PDT 2018


Author: armin11
Date: 2018-03-26 05:30:47 -0700 (Mon, 26 Mar 2018)
New Revision: 9890

Modified:
   trunk/mapbender/http/php/mod_showOpenDataOrganizations.php
Log:
Fix

Modified: trunk/mapbender/http/php/mod_showOpenDataOrganizations.php
===================================================================
--- trunk/mapbender/http/php/mod_showOpenDataOrganizations.php	2018-03-26 12:18:55 UTC (rev 9889)
+++ trunk/mapbender/http/php/mod_showOpenDataOrganizations.php	2018-03-26 12:30:47 UTC (rev 9890)
@@ -71,11 +71,11 @@
 
 select opendata.*, mb_group.uuid, mb_group_id, mb_group_title, mb_group_description, mb_group_homepage, mb_group_logo_path, mb_group_address, mb_group_postcode, mb_group_city, mb_group_email, timestamp, mb_group.mb_group_ckan_uuid from mb_group, (select (sum(count_wms_layer)+sum(count_metadata)) as number_of_opendata_ressources, group_id,mb_group_name from (
 
-select count(open_published_layers.layer_id) as count_wms_layer, 0 as count_metadata,open_published_layers.group_id, mb_group_name from (select layer_id, group_id, mb_group_name from layer , (select wms_group.count, mb_group_name,group_id, wms_id from mb_group, (select count(wms_id) ,f_get_responsible_organization_for_ressource(wms_id, 'wms') as group_id,wms_id  from wms where wms_id in (select fkey_wms_id from wms_termsofuse where fkey_termsofuse_id in (select termsofuse_id from termsofuse where isopen = 1)) group by group_id, wms_id) as wms_group where mb_group.mb_group_id = wms_group.group_id AND mb_group.export2ckan = TRUE AND (mb_group.mb_group_ckan_uuid IS NOT NULL) ) as open_published_wms where layer.fkey_wms_id = open_published_wms.wms_id and layer_searchable = 1 and export2csw is true ) as open_published_layers left join ows_relation_metadata on open_published_layers.layer_id = ows_relation_metadata.fkey_layer_id where fkey_layer_id is null group by open_published_layers.gr
 oup_id, open_published_layers.mb_group_name 
+select count(open_published_layers.layer_id) as count_wms_layer, 0 as count_metadata,open_published_layers.group_id, mb_group_name from (select layer_id, group_id, mb_group_name from layer , (select wms_group.count, mb_group_name,group_id, wms_id from mb_group, (select count(wms_id) ,f_get_responsible_organization_for_ressource(wms_id, 'wms') as group_id,wms_id  from wms where wms_id in (select fkey_wms_id from wms_termsofuse where fkey_termsofuse_id in (select termsofuse_id from termsofuse where isopen = 1)) group by group_id, wms_id) as wms_group where mb_group.mb_group_id = wms_group.group_id AND mb_group.export2ckan = TRUE AND mb_group.mb_group_ckan_uuid IS  NULL) as open_published_wms where layer.fkey_wms_id = open_published_wms.wms_id and layer_searchable = 1 and export2csw is true ) as open_published_layers left join ows_relation_metadata on open_published_layers.layer_id = ows_relation_metadata.fkey_layer_id where fkey_layer_id is null group by open_published_layers.group_id
 , open_published_layers.mb_group_name 
 
 union
 
-select count_wms_layer, metadata_group.count_metadata, group_id,mb_group_name from mb_group, (select count(metadata_id) as count_metadata, 0 as count_wms_layer , f_get_responsible_organization_for_ressource(metadata_id, 'metadata') as group_id from mb_metadata where searchable is true and export2csw is true and metadata_id in (select fkey_metadata_id from md_termsofuse where fkey_termsofuse_id in (select termsofuse_id from termsofuse where isopen = 1)) group by group_id) as metadata_group where mb_group.mb_group_id = metadata_group.group_id AND mb_group.export2ckan = TRUE AND (mb_group.mb_group_ckan_uuid IS NOT NULL)
+select count_wms_layer, metadata_group.count_metadata, group_id,mb_group_name from mb_group, (select count(metadata_id) as count_metadata, 0 as count_wms_layer , f_get_responsible_organization_for_ressource(metadata_id, 'metadata') as group_id from mb_metadata where searchable is true and export2csw is true and metadata_id in (select fkey_metadata_id from md_termsofuse where fkey_termsofuse_id in (select termsofuse_id from termsofuse where isopen = 1)) group by group_id) as metadata_group where mb_group.mb_group_id = metadata_group.group_id AND mb_group.export2ckan = TRUE AND mb_group.mb_group_ckan_uuid IS  NULL
 
 ) as opendata_ressources group by group_id, mb_group_name) as opendata 
 where opendata.group_id = mb_group.mb_group_id
@@ -85,9 +85,9 @@
 
 $sql4 = <<<SQL
 
-select opendata.*, mb_group.uuid, mb_group_id, mb_group_title, mb_group_description, mb_group_homepage, mb_group_logo_path, mb_group_address, mb_group_postcode, mb_group_city, mb_group_email, timestamp, mb_group.mb_group_ckan_uuid from mb_group, (select (sum(count_wms_layer)+sum(count_metadata)) as number_of_opendata_ressources, group_id,mb_group_name from (
+select opendata.*, mb_group.uuid, mb_group_id, mb_group_title, mb_group_description, mb_group_homepage, mb_group_logo_path, mb_group_address, mb_group_postcode, mb_group_city, mb_group_email, timestamp, mb_group.mb_group_ckan_uuid from mb_group, (select (sum(count_wms_layer)+sum(count_metadata)) as number_of_opendata_ressources, group_id, mb_group_name from (
 
-select count_wms_layer, metadata_group.count_metadata, group_id,mb_group_name from mb_group, (select count(metadata_id) as count_metadata, 0 as count_wms_layer , f_get_responsible_organization_for_ressource(metadata_id, 'metadata') as group_id from mb_metadata where searchable is true and export2csw is true and metadata_id in (select fkey_metadata_id from md_termsofuse where fkey_termsofuse_id in (select termsofuse_id from termsofuse where isopen = 1)) group by group_id) as metadata_group where mb_group.mb_group_id = metadata_group.group_id AND mb_group.export2ckan = TRUE AND (mb_group.mb_group_ckan_uuid IS NOT NULL)
+select count_wms_layer, metadata_group.count_metadata, group_id, mb_group_name from mb_group, (select count(metadata_id) as count_metadata, 0 as count_wms_layer , f_get_responsible_organization_for_ressource(metadata_id, 'metadata') as group_id from mb_metadata where searchable is true and export2csw is true and metadata_id in (select fkey_metadata_id from md_termsofuse where fkey_termsofuse_id in (select termsofuse_id from termsofuse where isopen = 1)) group by group_id) as metadata_group where mb_group.mb_group_id = metadata_group.group_id AND mb_group.export2ckan = TRUE AND mb_group.mb_group_ckan_uuid IS NULL
 
 ) as opendata_ressources group by group_id, mb_group_name) as opendata 
 where opendata.group_id = mb_group.mb_group_id



More information about the Mapbender_commits mailing list