mirror of
https://github.com/osm-search/Nominatim.git
synced 2026-02-16 15:47:58 +00:00
introduce chksql function for website code and move other fail functions
The default error screen now reports the full SQL even when not in debug mode as this message is often more helpful than our custom error message.
This commit is contained in:
@@ -10,13 +10,14 @@
|
||||
$oDB =& getDB();
|
||||
|
||||
$sSQL = "select placex.place_id, calculated_country_code as country_code, name->'name' as name, i.* from placex, import_polygon_delete i where placex.osm_id = i.osm_id and placex.osm_type = i.osm_type and placex.class = i.class and placex.type = i.type";
|
||||
$aPolygons = $oDB->getAll($sSQL);
|
||||
if (PEAR::isError($aPolygons))
|
||||
{
|
||||
failInternalError("Could not get list of deleted OSM elements.", $sSQL, $aPolygons);
|
||||
}
|
||||
$aPolygons = chksql($oDB->getAll($sSQL),
|
||||
"Could not get list of deleted OSM elements.");
|
||||
|
||||
//var_dump($aPolygons);
|
||||
if (CONST_DEBUG)
|
||||
{
|
||||
var_dump($aPolygons);
|
||||
exit;
|
||||
}
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
Reference in New Issue
Block a user