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:
@@ -7,9 +7,7 @@ require_once(CONST_BasePath.'/lib/Status.php');
|
||||
$oParams = new Nominatim\ParameterParser();
|
||||
$sOutputFormat = $oParams->getSet('format', array('text', 'json'), 'text');
|
||||
|
||||
$oDB = DB::connect(CONST_Database_DSN, false);
|
||||
$oStatus = new Nominatim\Status($oDB);
|
||||
|
||||
$oDB = new Nominatim\DB();
|
||||
|
||||
if ($sOutputFormat == 'json') {
|
||||
header('content-type: application/json; charset=UTF-8');
|
||||
@@ -17,6 +15,7 @@ if ($sOutputFormat == 'json') {
|
||||
|
||||
|
||||
try {
|
||||
$oStatus = new Nominatim\Status($oDB);
|
||||
$oStatus->status();
|
||||
} catch (Exception $oErr) {
|
||||
if ($sOutputFormat == 'json') {
|
||||
|
||||
Reference in New Issue
Block a user