Show map link from address.
[readifood.git] / lib / area.php
index 51f57d3..2aa5e2d 100644 (file)
       return;
     }
 
+    $candidates = array();
+    foreach ($cities as $city) {
+      if (! count(get_city_areas($city->getId()))) continue;
+      $candidates[] = $city;
+    }
+    if (! count($candidates)) return;
+
     form("noprint standout");
     echo "<p>Show areas in\n";
     echo "<select name=\"city_id\">\n";
-    foreach ($cities as $city) {
+    foreach ($candidates as $city) {
       option("city_id", sprintf("%s/%s", $city->getName(), $city->getId()), get_city_displayname($city));
     }
     echo "</select>\n";