X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/ec2d491dc8939ecf28ab84e26955bc7189618096..56fd1bc1b5fde69ec2258aa94c4c9cb493554e41:/website/deletable.php diff --git a/website/deletable.php b/website/deletable.php index ac4294ba..2d7ee7e9 100644 --- a/website/deletable.php +++ b/website/deletable.php @@ -5,7 +5,9 @@ require_once(CONST_BasePath.'/lib/log.php'); require_once(CONST_BasePath.'/lib/output.php'); ini_set('memory_limit', '200M'); -$sOutputFormat = 'html'; +$oParams = new Nominatim\ParameterParser(); +$sOutputFormat = $oParams->getSet('format', array('html', 'json'), 'html'); +set_exception_handler_by_format($sOutputFormat); $oDB = new Nominatim\DB(); $oDB->connect(); @@ -21,86 +23,8 @@ if (CONST_Debug) { exit; } -?> - - -
- - - -Objects in this table have been deleted in OSM but are still in the Nominatim database.
- -'.$sCol.' | '; +if ($sOutputFormat == 'json') { + echo javascript_renderData($aPolygons); +} else { + include(CONST_BasePath.'/lib/template/deletable-html.php'); } -echo ''; -foreach ($aPolygons as $aRow) { - echo '||
---|---|---|
'.osmLink($aRow).' | '; - break; - case 'place_id': - echo ''.detailsLink($aRow).' | '; - break; - default: - echo ''.($sVal?$sVal:' ').' | '; - break; - } - } - echo '