diff --git a/CMakeLists.txt b/CMakeLists.txt
index 43721cc4..cb137341 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -121,7 +121,6 @@ if (BUILD_API)
set(WEBSITESCRIPTS
website/deletable.php
website/details.php
- website/hierarchy.php
website/lookup.php
website/polygons.php
website/reverse.php
diff --git a/docs/develop/Development-Environment.md b/docs/develop/Development-Environment.md
index 4f790641..b7b0a673 100644
--- a/docs/develop/Development-Environment.md
+++ b/docs/develop/Development-Environment.md
@@ -30,7 +30,6 @@ unit tests (using PHPUnit). It has the following additional requirements:
* [behave test framework](https://behave.readthedocs.io) >= 1.2.5
* [nose](https://nose.readthedocs.io)
-* [pytidylib](http://countergram.com/open-source/pytidylib)
* [phpunit](https://phpunit.de) >= 7.3
* [PHP CodeSniffer](https://github.com/squizlabs/PHP_CodeSniffer)
diff --git a/lib/ClassTypes.php b/lib/ClassTypes.php
index 752db865..bb7b0486 100644
--- a/lib/ClassTypes.php
+++ b/lib/ClassTypes.php
@@ -252,13 +252,17 @@ function getIcon($aPlace)
*/
function getIconFile($aPlace)
{
+ if (CONST_MapIcon_URL === false) {
+ return null;
+ }
+
$sIcon = getIcon($aPlace);
if (!isset($sIcon)) {
return null;
}
- return CONST_Website_BaseURL.'images/mapicons/'.$sIcon.'.p.20.png';
+ return CONST_MapIcon_URL.'/'.$sIcon.'.p.20.png';
}
/**
diff --git a/lib/init-website.php b/lib/init-website.php
index 23c15ba8..302a9478 100644
--- a/lib/init-website.php
+++ b/lib/init-website.php
@@ -16,14 +16,6 @@ function userError($sMsg)
}
-function exception_handler_html($exception)
-{
- http_response_code($exception->getCode());
- header('Content-type: text/html; charset=UTF-8');
- include(CONST_BasePath.'/lib/template/error-html.php');
- exit();
-}
-
function exception_handler_json($exception)
{
http_response_code($exception->getCode());
@@ -41,14 +33,6 @@ function exception_handler_xml($exception)
exit();
}
-function shutdown_exception_handler_html()
-{
- $error = error_get_last();
- if ($error !== null && $error['type'] === E_ERROR) {
- exception_handler_html(new Exception($error['message'], 500));
- }
-}
-
function shutdown_exception_handler_xml()
{
$error = error_get_last();
@@ -73,10 +57,7 @@ function set_exception_handler_by_format($sFormat = null)
// one by default without an explicit $sFormat set.
if (!isset($sFormat)) {
- set_exception_handler('exception_handler_html');
- } elseif ($sFormat == 'html') {
- set_exception_handler('exception_handler_html');
- register_shutdown_function('shutdown_exception_handler_html');
+ set_exception_handler('exception_handler_json');
} elseif ($sFormat == 'xml') {
set_exception_handler('exception_handler_xml');
register_shutdown_function('shutdown_exception_handler_xml');
diff --git a/lib/setup/SetupClass.php b/lib/setup/SetupClass.php
index 2815f8c4..fd31f0fe 100755
--- a/lib/setup/SetupClass.php
+++ b/lib/setup/SetupClass.php
@@ -713,13 +713,8 @@ class SetupFunctions
@define('CONST_BasePath', '".CONST_BasePath."');
if (file_exists(getenv('NOMINATIM_SETTINGS'))) require_once(getenv('NOMINATIM_SETTINGS'));
-@define('CONST_Database_DSN', '".CONST_Database_DSN."'); // or add ;host=...;port=...;user=...;password=...
+@define('CONST_Database_DSN', '".CONST_Database_DSN."');
@define('CONST_Default_Language', ".(CONST_Default_Language ? ("'".CONST_Default_Language."'") : 'false').");
-@define('CONST_Default_Lat', ".CONST_Default_Lat.");
-@define('CONST_Default_Lon', ".CONST_Default_Lon.");
-@define('CONST_Default_Zoom', ".CONST_Default_Zoom.");
-@define('CONST_Map_Tile_URL', '".CONST_Map_Tile_URL."');
-@define('CONST_Map_Tile_Attribution', '".CONST_Map_Tile_Attribution."'); // Set if tile source isn't osm.org
@define('CONST_Log_DB', ".(CONST_Log_DB ? 'true' : 'false').");
@define('CONST_Log_File', ".(CONST_Log_File ? ("'".CONST_Log_File."'") : 'false').");
@define('CONST_Max_Word_Frequency', '".CONST_Max_Word_Frequency."');
@@ -733,8 +728,8 @@ if (file_exists(getenv('NOMINATIM_SETTINGS'))) require_once(getenv('NOMINATIM_SE
@define('CONST_Term_Normalization_Rules', \"".CONST_Term_Normalization_Rules."\");
@define('CONST_Use_Aux_Location_data', ".(CONST_Use_Aux_Location_data ? 'true' : 'false').");
@define('CONST_Use_US_Tiger_Data', ".(CONST_Use_US_Tiger_Data ? 'true' : 'false').");
-@define('CONST_Website_BaseURL', '".CONST_Website_BaseURL."');
-");
+@define('CONST_MapIcon_URL', ".(CONST_MapIcon_URL ? ("'".CONST_MapIcon_URL."'") : 'false').');
+');
info(CONST_InstallPath.'/settings/settings-frontend.php has been set up successfully');
}
diff --git a/lib/template/address-html.php b/lib/template/address-html.php
deleted file mode 100644
index 165b2a9d..00000000
--- a/lib/template/address-html.php
+++ /dev/null
@@ -1,135 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-0) { ?>
-
- ';
- ?>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-