]> git.openstreetmap.org Git - nominatim.git/blobdiff - website/search.php
Merge pull request #1233 from mtmail/better-gbpostcode-setup-warning
[nominatim.git] / website / search.php
index 6dc443359c78706a79098cb985875d5de873111f..0b678caa65994c16145ac18c6141e6c9f11d4793 100755 (executable)
@@ -26,7 +26,8 @@ if (CONST_Search_ReversePlanForAll
 }
 
 // Format for output
-$sOutputFormat = $oParams->getSet('format', array('html', 'xml', 'json', 'jsonv2'), 'html');
+$sOutputFormat = $oParams->getSet('format', array('html', 'xml', 'json', 'jsonv2', 'geojson', 'geocodejson'), 'html');
+set_exception_handler_by_format($sOutputFormat);
 
 $sForcedGeometry = ($sOutputFormat == 'html') ? 'geojson' : null;
 $oGeocode->loadParamArray($oParams, $sForcedGeometry);
@@ -81,5 +82,5 @@ $sMoreURL = CONST_Website_BaseURL.'search.php?'.http_build_query($aMoreParams);
 
 if (CONST_Debug) exit;
 
-$sOutputTemplate = ($sOutputFormat=='jsonv2' ? 'json' : $sOutputFormat);
+$sOutputTemplate = ($sOutputFormat == 'jsonv2') ? 'json' : $sOutputFormat;
 include(CONST_BasePath.'/lib/template/search-'.$sOutputTemplate.'.php');