$sViewboxSmallSQL = $oDB->getOne($sSQL);
if (PEAR::isError($sViewboxSmallSQL))
{
- var_dump($sViewboxSmallSQL);
- exit;
+ failInternalError("Could not get small viewbox.", $sSQL, $sViewboxSmallSQL);
}
$sViewboxSmallSQL = "'".$sViewboxSmallSQL."'::geometry";
$sViewboxLargeSQL = $oDB->getOne($sSQL);
if (PEAR::isError($sViewboxLargeSQL))
{
- var_dump($sViewboxLargeSQL);
- exit;
+ failInternalError("Could not get large viewbox.", $sSQL, $sViewboxLargeSQL);
}
$sViewboxLargeSQL = "'".$sViewboxLargeSQL."'::geometry";
}
$aDatabaseWords = array();
if (PEAR::IsError($aDatabaseWords))
{
- var_dump($sSQL, $aDatabaseWords);
- exit;
+ failInternalError("Could not get word tokens.", $sSQL, $aDatabaseWords);
}
$aPossibleMainWordIDs = array();
foreach($aDatabaseWords as $aToken)
$aViewBoxPlaceIDs = $oDB->getAll($sSQL);
if (PEAR::IsError($aViewBoxPlaceIDs))
{
- var_dump($sSQL, $aViewBoxPlaceIDs);
- exit;
+ failInternalError("Could not get places for search terms.", $sSQL, $aViewBoxPlaceIDs);
}
if (time() - $iStartTime > 60) {
file_put_contents(CONST_BasePath.'/log/long_queries.log', date('Y-m-d H:i:s', $iStartTime).' '.$sSQL."\n", FILE_APPEND);
$sPlaceIDs = join(',',$aPlaceIDs);
// Now they are indexed look for a house attached to a street we found
- $sHouseNumberRegex = '\\\\m'.str_replace(' ','[-, ]',$aSearch['sHouseNumber']).'\\\\M';
+ $sHouseNumberRegex = '\\\\m'.str_replace(' ','[-,/ ]',$aSearch['sHouseNumber']).'\\\\M';
$sSQL = "select place_id from placex where parent_place_id in (".$sPlaceIDs.") and housenumber ~* E'".$sHouseNumberRegex."'";
if (sizeof($aExcludePlaceIDs))
{
if (PEAR::IsError($aPlaceIDs))
{
- var_dump($sSQL, $aPlaceIDs);
- exit;
+ failInternalError("Could not get place IDs from tokens." ,$sSQL, $aPlaceIDs);
}
if (CONST_Debug) var_Dump($aPlaceIDs);
if (PEAR::IsError($aSearchResults))
{
- var_dump($sSQL, $aSearchResults);
- exit;
+ failInternalError("Could not get details for place.", $sSQL, $aSearchResults);
}
}
} // end if ($sQuery)
if (PEAR::IsError($aSearchResults))
{
- var_dump($sSQL, $aSearchResults);
- exit;
+ failInternalError("Could not get details for place (near).", $sSQL, $aSearchResults);
}
}
}
$aPointPolygon = $oDB->getRow($sSQL);
if (PEAR::IsError($aPointPolygon))
{
- var_dump($sSQL, $aPointPolygon);
- exit;
+ failInternalError("Could not get outline.", $sSQL, $aPointPolygon);
}
if ($aPointPolygon['place_id'])
{