X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/fae8da2bcb78d6020231b42a5a3f2444b64755eb..56fd1bc1b5fde69ec2258aa94c4c9cb493554e41:/website/status.php diff --git a/website/status.php b/website/status.php index 90be9388..0d483544 100644 --- a/website/status.php +++ b/website/status.php @@ -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') {