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

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Fri Aug 18 04:12:00 PDT 2017


Author: armin11
Date: 2017-08-18 04:12:00 -0700 (Fri, 18 Aug 2017)
New Revision: 9762

Modified:
   trunk/mapbender/http/classes/class_syncCkan.php
Log:
Sync also metadata for which no predefined licenses are given

Modified: trunk/mapbender/http/classes/class_syncCkan.php
===================================================================
--- trunk/mapbender/http/classes/class_syncCkan.php	2017-08-18 10:56:28 UTC (rev 9761)
+++ trunk/mapbender/http/classes/class_syncCkan.php	2017-08-18 11:12:00 UTC (rev 9762)
@@ -460,11 +460,11 @@
                         //pull all relevant information from mapbender database - first pull the resources which are owned by the corresponding group!
                         //only use metadata for which real licenses are defined !!!!!! - what should be done with the other metadata?- DO a left join!!!
                         if ($organization['is_primary_group']) {
-                            $sql = "SELECT *, f_get_coupled_resources(metadata_id) from mb_metadata JOIN md_termsofuse ON mb_metadata.metadata_id = md_termsofuse.fkey_metadata_id WHERE fkey_mb_user_id = $1 AND (fkey_mb_group_id is null OR fkey_mb_group_id = 0) AND export2csw IS true";
+                            $sql = "SELECT *, 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_user_id = $1 AND (fkey_mb_group_id is null OR fkey_mb_group_id = 0) AND export2csw IS true";
                             $v = array($this->mapbenderUserId);
                             $t = array('i');
                         } else {
-                            $sql = "SELECT *, f_get_coupled_resources(metadata_id) from mb_metadata JOIN md_termsofuse ON mb_metadata.metadata_id = md_termsofuse.fkey_metadata_id WHERE fkey_mb_group_id = $1 AND export2csw IS true";
+                            $sql = "SELECT *, 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";
                             $v = array($organization['id']);
                             $t = array('i');
                         }



More information about the Mapbender_commits mailing list