X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/e70f405abddfe5a8a7400424558071ebba769eda..2c909c1f0c7c6e6a176eb5cc15e8d6a45449ebe8:/website/status.php diff --git a/website/status.php b/website/status.php index 90be9388..9f030fb3 100644 --- a/website/status.php +++ b/website/status.php @@ -1,15 +1,13 @@ getSet('format', array('text', 'json'), 'text'); -$oDB = DB::connect(CONST_Database_DSN, false); -$oStatus = new Nominatim\Status($oDB); - +$oDB = new Nominatim\DB(CONST_Database_DSN); 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') {