+
+ // Be nice about our error messages for broken geometry
+ if (!$_GET['place_id'])
+ {
+ $aPointDetails = $oDB->getRow("select osm_type, osm_id, errormessage, class, type, get_name_by_language(name,$sLanguagePrefArraySQL) as localname, ST_AsText(prevgeometry) as prevgeom, ST_AsText(newgeometry) as newgeom from import_polygon_error where osm_type = '".$_GET['osmtype']."' and osm_id = ".(int)$_GET['osmid']." order by updated desc limit 1");
+ if (!PEAR::isError($aPointDetails) && $aPointDetails) {
+ if (preg_match('/\[(-?\d+\.\d+) (-?\d+\.\d+)\]/', $aPointDetails['errormessage'], $aMatches))
+ {
+ $aPointDetails['error_x'] = $aMatches[1];
+ $aPointDetails['error_y'] = $aMatches[2];
+ }
+ include(CONST_BasePath.'/lib/template/details-error-'.$sOutputFormat.'.php');
+ exit;
+ }
+ }