X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/07628dc05daf0345fab3307601f05186ba863456..d45524cbfb299f5004a03c52802c64749c5ad212:/website/polygons.php diff --git a/website/polygons.php b/website/polygons.php index 423374c7..92dbf70d 100755 --- a/website/polygons.php +++ b/website/polygons.php @@ -1,36 +1,29 @@ getOne('select count(*) from import_polygon_error'); $aPolygons = array(); - while(!sizeof($aPolygons)) + while($iTotalBroken && !sizeof($aPolygons)) { $sSQL = 'select osm_type as "type",osm_id as "id",class as "key",type as "value",name->\'name\' as "name",'; $sSQL .= 'country_code as "country",errormessage as "error message",updated'; $sSQL .= " from import_polygon_error"; - if ($_GET['days']) - { - $sSQL .= " where updated > 'now'::timestamp - '".(int)$_GET['days']." day'::interval"; - $_GET['days']++; - } - if ($bReduced) - { - $sSQL .= " and errormessage like 'Area reduced%'"; - } - if ($sClass) - { - $sSQL .= " and class = '".pg_escape_string($sClass)."'"; - } + $sSQL .= " where updated > 'now'::timestamp - '".$iDays." day'::interval"; + $iDays++; + + if ($bReduced) $sSQL .= " and errormessage like 'Area reduced%'"; + if ($sClass) $sSQL .= " and class = '".pg_escape_string($sClass)."'"; $sSQL .= " order by updated desc limit 1000"; $aPolygons = $oDB->getAll($sSQL); } @@ -83,6 +76,7 @@ table td { Total number of broken polygons: $iTotalBroken

"; echo ""; echo ""; //var_dump($aPolygons[0]);