replace database abstraction DB with PDO

This commit is contained in:
marc tobias
2019-02-24 16:14:36 +01:00
parent b20a534e0c
commit d4b633bfc5
42 changed files with 499 additions and 255 deletions

View File

@@ -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') {