fix syntax errors and update tests

Some of the tests with bad parameters now return a HTTP 400.
This commit is contained in:
Sarah Hoffmann
2016-06-12 22:33:37 +02:00
parent 033b9590bd
commit 348a3082c9
8 changed files with 24 additions and 27 deletions

View File

@@ -5,6 +5,7 @@
require_once(CONST_BasePath.'/lib/init-website.php');
require_once(CONST_BasePath.'/lib/log.php');
require_once(CONST_BasePath.'/lib/PlaceLookup.php');
require_once(CONST_BasePath.'/lib/output.php');
if (strpos(CONST_BulkUserIPs, ','.$_SERVER["REMOTE_ADDR"].',') !== false)
{
@@ -38,7 +39,7 @@
$oPlaceLookup->setIncludeExtraTags(getParamBool('extratags', false));
$oPlaceLookup->setIncludeNameDetails(getParamBool('namedetails', false));
$aOsmIds = explode(',', $getParamString('osm_ids', ''));
$aOsmIds = explode(',', getParamString('osm_ids', ''));
if (count($aOsmIds) > CONST_Places_Max_ID_count)
{

View File

@@ -56,8 +56,8 @@
$hLog = logStart($oDB, 'reverse', $_SERVER['QUERY_STRING'], $aLangPrefOrder);
$sOsmType = getParamSet('osmtype', array('N', 'W', 'R'));
$iOsmId = getParamInt('osmid', -1);
$sOsmType = getParamSet('osm_type', array('N', 'W', 'R'));
$iOsmId = getParamInt('osm_id', -1);
$fLat = getParamFloat('lat');
$fLon = getParamFloat('lon');
if ($sOsmType && $iOsmId > 0)