X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/2cc4c73b64b12fd351d6def17b58d28158002ff3..5d656891ba072d88b8b281d239d0dce9f7bd6a1c:/website/status.php diff --git a/website/status.php b/website/status.php index c0c379d0..9f030fb3 100644 --- a/website/status.php +++ b/website/status.php @@ -1,18 +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'); @@ -20,6 +15,7 @@ if ($sOutputFormat == 'json') { try { + $oStatus = new Nominatim\Status($oDB); $oStatus->status(); } catch (Exception $oErr) { if ($sOutputFormat == 'json') {