X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/0947b618085f7d46515a3ec06cab5ed818e8635f..25557e5f14734aa597dbe32293be25d2c539531c:/utils/specialphrases.php diff --git a/utils/specialphrases.php b/utils/specialphrases.php index 58e06222..b1df6436 100644 --- a/utils/specialphrases.php +++ b/utils/specialphrases.php @@ -11,9 +11,11 @@ $aCMDOptions array('quiet', 'q', 0, 1, 0, 0, 'bool', 'Quiet output'), array('verbose', 'v', 0, 1, 0, 0, 'bool', 'Verbose output'), array('wiki-import', '', 0, 1, 0, 0, 'bool', 'Create import script for search phrases '), + array('project-dir', '', 0, 1, 1, 1, 'realpath', 'Base directory of the Nominatim installation (default: .)'), ); getCmdOpt($_SERVER['argv'], $aCMDOptions, $aCMDResult, true, true); +loadSettings($aCMDResult['project-dir'] ?? getcwd()); setupHTTPProxy(); include(getSettingConfig('PHRASE_CONFIG', 'phrase_settings.php')); @@ -23,9 +25,9 @@ if ($aCMDResult['wiki-import']) { $aPairs = array(); $sLanguageIn = getSetting( - LANGUAGES, + 'LANGUAGES', 'af,ar,br,ca,cs,de,en,es,et,eu,fa,fi,fr,gl,hr,hu,'. - 'ia,is,it,ja,mk,nl,no,pl,ps,pt,ru,sk,sl,sv,uk,vi'; + 'ia,is,it,ja,mk,nl,no,pl,ps,pt,ru,sk,sl,sv,uk,vi' ); foreach (explode(',', $sLanguageIn) as $sLanguage) { @@ -107,7 +109,10 @@ if ($aCMDResult['wiki-import']) { echo 'CREATE INDEX idx_placex_classtype ON placex (class, type);'; foreach ($aPairs as $aPair) { - $sql_tablespace = CONST_Tablespace_Aux_Data ? ' TABLESPACE '.CONST_Tablespace_Aux_Data : ''; + $sql_tablespace = getSetting('TABLESPACE_AUX_DATA'); + if ($sql_tablespace) { + $sql_tablespace = ' TABLESPACE '.$sql_tablespace; + } printf( 'CREATE TABLE place_classtype_%s_%s' @@ -149,7 +154,7 @@ if ($aCMDResult['wiki-import']) { . ";\n", pg_escape_string($aPair[0]), pg_escape_string($aPair[1]), - getSetting('DATABASE_WEBUSER'); + getSetting('DATABASE_WEBUSER') ); }