[Mapbender-commits] r8764 - in trunk/mapbender: http/classes http/php resources/db/pgsql/UTF-8/update
svn_mapbender at osgeo.org
svn_mapbender at osgeo.org
Fri Jan 31 03:18:43 PST 2014
Author: armin11
Date: 2014-01-31 03:18:40 -0800 (Fri, 31 Jan 2014)
New Revision: 8764
Modified:
trunk/mapbender/http/classes/class_metadata_new.php
trunk/mapbender/http/php/mod_callMetadata.php
trunk/mapbender/resources/db/pgsql/UTF-8/update/update_2.7.4_to_2.8_pgsql_UTF-8.sql
Log:
Bugfix for opendata search option
Modified: trunk/mapbender/http/classes/class_metadata_new.php
===================================================================
--- trunk/mapbender/http/classes/class_metadata_new.php 2014-01-30 15:10:23 UTC (rev 8763)
+++ trunk/mapbender/http/classes/class_metadata_new.php 2014-01-31 11:18:40 UTC (rev 8764)
@@ -87,7 +87,11 @@
$this->hostName = $hostName;
$this->orderBy = $orderBy;
$this->resourceIds = $resourceIds;
- $this->restrictToOpenData = $restrictToOpenData;
+ if ($restrictToOpenData === "true") {
+ $this->restrictToOpenData = true;
+ } else {
+ $this->restrictToOpenData = false;
+ }
//definitions for generating tagClouds
$this->maxObjects = 15;
$this->maxFontSize = 30;
Modified: trunk/mapbender/http/php/mod_callMetadata.php
===================================================================
--- trunk/mapbender/http/php/mod_callMetadata.php 2014-01-30 15:10:23 UTC (rev 8763)
+++ trunk/mapbender/http/php/mod_callMetadata.php 2014-01-31 11:18:40 UTC (rev 8764)
@@ -36,7 +36,7 @@
$searchBbox = NULL;
$searchTypeBbox = "intersects"; //outside / inside
$accessRestrictions = "false";
-$restrictToOpenData = false;
+//$restrictToOpenData = "false";
$languageCode = "de";
$outputFormat = 'json';
#$searchResources = "wms,wfs,wmc,georss,dataset";
@@ -59,7 +59,7 @@
$searchURL = urldecode($searchURL);
//control if some request variables are not set and set them explicit to NULL
-$checkForNullRequests = array("registratingDepartments","isoCategories","inspireThemes","customCategories","regTimeBegin","regTimeEnd","timeBegin","timeEnd","searchBbox","searchTypeBbox","searchResources","orderBy","hostName","resourceIds");
+$checkForNullRequests = array("registratingDepartments","isoCategories","inspireThemes","customCategories","regTimeBegin","regTimeEnd","timeBegin","timeEnd","searchBbox","searchTypeBbox","searchResources","orderBy","hostName","resourceIds","restrictToOpenData");
for($i=0; $i < count($checkForNullRequests); $i++){
if (!$_REQUEST[$checkForNullRequests[$i]] or $_REQUEST[$checkForNullRequests[$i]] == 'false' or $_REQUEST[$checkForNullRequests[$i]] == 'undefined') {
@@ -275,10 +275,10 @@
}
switch ($testMatch) {
case "true":
- $restrictToOpenData = true;
+ $restrictToOpenData = "true";
break;
case "false":
- $restrictToOpenData = false;
+ $restrictToOpenData = "false";
break;
}
$testMatch = NULL;
@@ -553,7 +553,7 @@
$classificationElements[5]['name'] = 'searchBbox';
$classificationElements[6]['name'] = 'regTimeBegin';
$classificationElements[7]['name'] = 'regTimeEnd';
-$classificationElements[8]['name'] = 'restrictedToOpenData';
+$classificationElements[8]['name'] = 'restrictToOpenData';
$classificationElements[0]['source'] = '';
$classificationElements[1]['source'] = 'database';
@@ -573,7 +573,7 @@
$classificationElements[5]['list'] = false;
$classificationElements[6]['list'] = false;
$classificationElements[7]['list'] = false;
-$classificationElements[8]['list'] = true;
+$classificationElements[8]['list'] = false;
//Defining of the different result categories
$resourceCategories = array();
@@ -703,9 +703,12 @@
$queryJSON->searchFilter->classes[$i]->name = $searchResources[$i];
}
//generate search filter file - if more categories are defined give
-#echo "<br> number of filter elements: ".count($classificationElements)."<br>";
+//echo "<br> number of filter elements: ".count($classificationElements)."<br>";
for($i=0; $i < count($classificationElements); $i++){
+ //echo "<br> filter for element: ".$classificationElements[$i]['name']."<br>";
+ //echo "<br> variable for element: ". (string)${$classificationElements[$i]['name']}."<br>";
if (isset(${$classificationElements[$i]['name']}) & ${$classificationElements[$i]['name']} !='' & ${$classificationElements[$i]['name']} != NULL) {
+ //echo "<br> found: ".$classificationElements[$i]['name']."<br>";
//pull register information out of database in arrays
if ($classificationElements[$i]['source'] == 'database') {
$funcName = "get_".$classificationElements[$i]['name']."Array";
Modified: trunk/mapbender/resources/db/pgsql/UTF-8/update/update_2.7.4_to_2.8_pgsql_UTF-8.sql
===================================================================
--- trunk/mapbender/resources/db/pgsql/UTF-8/update/update_2.7.4_to_2.8_pgsql_UTF-8.sql 2014-01-30 15:10:23 UTC (rev 8763)
+++ trunk/mapbender/resources/db/pgsql/UTF-8/update/update_2.7.4_to_2.8_pgsql_UTF-8.sql 2014-01-31 11:18:40 UTC (rev 8764)
@@ -219,7 +219,7 @@
--enhance search view with isopen classification for resources
-- View: search_wms_view
-DROP VIEW search_wms_view;
+DROP VIEW search_wms_view CASCADE;
CREATE OR REPLACE VIEW search_wms_view AS
SELECT DISTINCT ON (wms_unref.layer_id) wms_unref.wms_id, wms_unref.availability, wms_unref.status, wms_unref.wms_title, wms_unref.wms_abstract, wms_unref.stateorprovince, wms_unref.country, wms_unref.accessconstraints, wms_unref.termsofuse, wms_unref.isopen, wms_unref.wms_owner, wms_unref.layer_id, wms_unref.epsg, wms_unref.layer_title, wms_unref.layer_abstract, wms_unref.layer_name, wms_unref.layer_parent, wms_unref.layer_pos, wms_unref.layer_queryable, wms_unref.load_count, wms_unref.searchtext, wms_unref.wms_timestamp, wms_unref.department, wms_unref.mb_group_name, f_collect_custom_cat_layer(wms_unref.layer_id) AS md_custom_cats, f_collect_inspire_cat_layer(wms_unref.layer_id) AS md_inspire_cats, f_collect_topic_cat_layer(wms_unref.layer_id) AS md_topic_cats, geometryfromtext(((((((((((((((((((('POLYGON(('::text || layer_epsg.minx::text) || ' '::text) || layer_epsg.miny::text) || ','::text) || layer_epsg.minx::text) || ' '::text) || layer_epsg.maxy::text) || ','::text)
|| layer_epsg.maxx::text) || ' '::text) || layer_epsg.maxy::text) || ','::text) || layer_epsg.maxx::text) || ' '::text) || layer_epsg.miny::text) || ','::text) || layer_epsg.minx::text) || ' '::text) || layer_epsg.miny::text) || '))'::text, 4326) AS the_geom, (((((layer_epsg.minx::text || ','::text) || layer_epsg.miny::text) || ','::text) || layer_epsg.maxx::text) || ','::text) || layer_epsg.maxy::text AS bbox, wms_unref.wms_proxylog, wms_unref.wms_network_access, wms_unref.wms_pricevolume, wms_unref.mb_group_logo_path
@@ -239,7 +239,7 @@
-- View: search_wfs_view
-DROP VIEW search_wfs_view;
+DROP VIEW search_wfs_view CASCADE;
CREATE OR REPLACE VIEW search_wfs_view AS
SELECT wfs_dep.wfs_id, wfs_dep.wfs_title, wfs_dep.wfs_abstract, wfs_dep.administrativearea, wfs_dep.country, wfs_dep.accessconstraints, wfs_dep.termsofuse, wfs_dep.isopen, wfs_dep.wfs_owner, wfs_featuretype.featuretype_id, wfs_featuretype.featuretype_srs, wfs_featuretype.featuretype_title, wfs_featuretype.featuretype_abstract, f_collect_searchtext_wfs(wfs_dep.wfs_id, wfs_featuretype.featuretype_id) AS searchtext, wfs_element.element_type, wfs_conf.wfs_conf_id, wfs_conf.wfs_conf_abstract, wfs_conf.wfs_conf_description, f_getwfsmodultype(wfs_conf.wfs_conf_id) AS modultype, wfs_dep.wfs_timestamp, wfs_dep.department, wfs_dep.mb_group_name, wfs_dep.mb_group_logo_path
More information about the Mapbender_commits
mailing list