]> git.openstreetmap.org Git - nominatim.git/blob - lib-php/setup_functions.php
work around strange query planning behaviour
[nominatim.git] / lib-php / setup_functions.php
1 <?php
2 /**
3  * SPDX-License-Identifier: GPL-2.0-only
4  *
5  * This file is part of Nominatim. (https://nominatim.org)
6  *
7  * Copyright (C) 2022 by the Nominatim developer community.
8  * For a full list of authors see the git log.
9  */
10
11 function getOsm2pgsqlBinary()
12 {
13     $sBinary = getSetting('OSM2PGSQL_BINARY');
14
15     return $sBinary ? $sBinary : CONST_Default_Osm2pgsql;
16 }
17
18 function getImportStyle()
19 {
20     $sStyle = getSetting('IMPORT_STYLE');
21
22     if (in_array($sStyle, array('admin', 'street', 'address', 'full', 'extratags'))) {
23         return CONST_ConfigDir.'/import-'.$sStyle.'.style';
24     }
25
26     return $sStyle;
27 }