mirror of
https://github.com/osm-search/Nominatim.git
synced 2026-02-16 15:47:58 +00:00
replace database abstraction DB with PDO
This commit is contained in:
@@ -10,13 +10,16 @@ $oParams = new Nominatim\ParameterParser();
|
||||
|
||||
$sOutputFormat = $oParams->getSet('format', array('html', 'json'), 'html');
|
||||
$aLangPrefOrder = $oParams->getPreferredLanguages();
|
||||
$sLanguagePrefArraySQL = 'ARRAY['.join(',', array_map('getDBQuoted', $aLangPrefOrder)).']';
|
||||
|
||||
|
||||
$sPlaceId = $oParams->getString('place_id');
|
||||
$sOsmType = $oParams->getSet('osmtype', array('N', 'W', 'R'));
|
||||
$iOsmId = $oParams->getInt('osmid', -1);
|
||||
|
||||
$oDB =& getDB();
|
||||
$oDB = new Nominatim\DB();
|
||||
$oDB->connect();
|
||||
|
||||
$sLanguagePrefArraySQL = $oDB->getArraySQL($oDB->getDBQuotedList($aLangPrefOrder));
|
||||
|
||||
if ($sOsmType && $iOsmId > 0) {
|
||||
$sPlaceId = chksql($oDB->getOne("select place_id from placex where osm_type = '".$sOsmType."' and osm_id = ".$iOsmId." order by type = 'postcode' asc"));
|
||||
|
||||
Reference in New Issue
Block a user