]> git.openstreetmap.org Git - nominatim.git/blobdiff - website/polygons.php
move checkModilePresence to class, delete own debug echo
[nominatim.git] / website / polygons.php
index 4c1401efdfbe5f3a366d35f36fba4840ffd8b540..0f49183f50b649a6cf1f3d9e34639afb065c715b 100755 (executable)
@@ -18,7 +18,7 @@ $oDB =& getDB();
 $iTotalBroken = (int) chksql($oDB->getOne('select count(*) from import_polygon_error'));
 
 $aPolygons = array();
-while ($iTotalBroken && !sizeof($aPolygons)) {
+while ($iTotalBroken && empty($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';
@@ -32,7 +32,7 @@ while ($iTotalBroken && !sizeof($aPolygons)) {
     if ($bReduced) $aWhere[] = "errormessage like 'Area reduced%'";
     if ($sClass) $sWhere[] = "class = '".pg_escape_string($sClass)."'";
 
-    if (sizeof($aWhere)) {
+    if (!empty($aWhere)) {
         $sSQL .= ' where '.join(' and ', $aWhere);
     }