X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/8c3a0efe8b75a06279998e66a932d8a56c483961..ca3283cbaa0240a52d65d0fc21d39732fca1a305:/website/deletable.php diff --git a/website/deletable.php b/website/deletable.php index 2d7ee7e9..81fb4f99 100644 --- a/website/deletable.php +++ b/website/deletable.php @@ -1,15 +1,15 @@ getSet('format', array('html', 'json'), 'html'); +$sOutputFormat = $oParams->getSet('format', array('json'), 'json'); set_exception_handler_by_format($sOutputFormat); -$oDB = new Nominatim\DB(); +$oDB = new Nominatim\DB(CONST_Database_DSN); $oDB->connect(); $sSQL = 'select placex.place_id, country_code,'; @@ -24,7 +24,5 @@ if (CONST_Debug) { } if ($sOutputFormat == 'json') { - echo javascript_renderData($aPolygons); -} else { - include(CONST_BasePath.'/lib/template/deletable-html.php'); + javascript_renderData($aPolygons); }