X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/301fd7f7e8d97755849e26427c12eed070f21b5f..3cdfe066336ad19772d300a85d6c1feaadc074ea:/lib/lib.php?ds=sidebyside diff --git a/lib/lib.php b/lib/lib.php index b4c415d9..7760f695 100644 --- a/lib/lib.php +++ b/lib/lib.php @@ -1,17 +1,13 @@ load(CONST_DataDir.'/settings/env.defaults'); - - if (file_exists($sProjectDir.'/.env')) { - $dotenv->load($sProjectDir.'/.env'); - } + // Temporary hack to set the direcory via environment instead of + // the installed scripts. Neither setting is part of the official + // set of settings. + defined('CONST_DataDir') or define('CONST_DataDir', $_SERVER['NOMINATIM_DATADIR']); + defined('CONST_BinDir') or define('CONST_BinDir', $_SERVER['NOMINATIM_BINDIR']); } function getSetting($sConfName, $sDefault = null) @@ -36,7 +32,7 @@ function getSettingBool($sConfName) function getSettingConfig($sConfName, $sSystemConfig) { - $sValue = $_ENV['NOMINATIM_'.$sConfName]; + $sValue = $_SERVER['NOMINATIM_'.$sConfName]; if (!$sValue) { return CONST_DataDir.'/settings/'.$sSystemConfig;