From: Sarah Hoffmann Date: Fri, 18 Sep 2020 20:41:47 +0000 (+0200) Subject: Merge remote-tracking branch 'upstream/master' X-Git-Tag: deploy~214 X-Git-Url: https://git.openstreetmap.org./nominatim.git/commitdiff_plain/61e3a053723a6a1131e234aa8ad1a37f18bbec56?hp=-c Merge remote-tracking branch 'upstream/master' --- 61e3a053723a6a1131e234aa8ad1a37f18bbec56 diff --combined CMakeLists.txt index e1ccae87,43721cc4..5aa71800 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@@ -129,16 -129,6 +129,16 @@@ if (BUILD_API website/status.php ) + set(WEBSITEFILES + 403.html + 509.html + crossdomain.xml + favicon.ico + nominatim.xml + robots.txt + taginfo.json + ) + foreach (script_source ${WEBSITESCRIPTS}) configure_file(${PROJECT_SOURCE_DIR}/cmake/website.tmpl ${PROJECT_BINARY_DIR}/${script_source}) @@@ -146,11 -136,6 +146,11 @@@ set(WEBPATHS css images js) + foreach (webfile ${WEBSITEFILES}) + configure_file(${PROJECT_SOURCE_DIR}/website/${webfile} + ${PROJECT_BINARY_DIR}/website/${webfile}) + endforeach() + foreach (wp ${WEBPATHS}) execute_process( COMMAND ln -sf ${PROJECT_SOURCE_DIR}/website/${wp} ${PROJECT_BINARY_DIR}/website/ @@@ -161,6 -146,11 +161,11 @@@ php -S 127.0.0.1:8088 WORKING_DIRECTORY ${PROJECT_BINARY_DIR}/website ) + + add_custom_target(serve-global + php -S 0.0.0.0:8088 + WORKING_DIRECTORY ${PROJECT_BINARY_DIR}/website + ) endif() #----------------------------------------------------------------------------- diff --combined sql/functions/address_lookup.sql index 88b3a741,d1ed6990..196fb434 --- a/sql/functions/address_lookup.sql +++ b/sql/functions/address_lookup.sql @@@ -180,6 -180,7 +180,7 @@@ BEGI -- Return the record for the base entry. FOR location IN SELECT placex.place_id, osm_type, osm_id, name, + coalesce(extratags->'linked_place', extratags->'place') as place_type, class, type, admin_level, type not in ('postcode', 'postal_code') as isaddress, CASE WHEN rank_address = 0 THEN 100 @@@ -198,7 -199,8 +199,8 @@@ searchcountrycode := NULL; END IF; countrylocation := ROW(location.place_id, location.osm_type, location.osm_id, - location.name, location.class, location.type, NULL, + location.name, location.class, location.type, + location.place_type, location.admin_level, true, location.isaddress, location.rank_address, location.distance)::addressline; RETURN NEXT countrylocation; @@@ -208,7 -210,7 +210,7 @@@ FOR location IN SELECT placex.place_id, osm_type, osm_id, name, class, type, coalesce(extratags->'linked_place', extratags->'place') as place_type, - admin_level, fromarea, isaddress, + admin_level, fromarea, isaddress and linked_place_id is NULL as isaddress, CASE WHEN rank_address = 11 THEN 5 ELSE rank_address END as rank_address, distance, country_code, postcode FROM place_addressline join placex on (address_place_id = placex.place_id)