X-Git-Url: http://git.iain.cx/?a=blobdiff_plain;f=lib%2Fhub.php;fp=lib%2Fhub.php;h=4e34c17070fe18ad74b2af4118cf539f0496aaac;hb=b967de0fef7828e7cf314104ddd147394efb0060;hp=79051f8bc120c0a5d08c05c9891c7c0111d860cf;hpb=a646a2cfbd63d70043e60d88afff0add11ad7e81;p=readifood.git diff --git a/lib/hub.php b/lib/hub.php index 79051f8..4e34c17 100644 --- a/lib/hub.php +++ b/lib/hub.php @@ -108,9 +108,16 @@ return; } + $candidates = array(); + foreach ($areas as $area) { + if (! count(get_area_hubs($area->getId()))) continue; + $candidates[] = $area; + } + if (! count($candidates)) return; + echo "

Show hubs in area\n"; echo "\n"; @@ -126,9 +133,16 @@ return; } + $candidates = array(); + foreach ($cities as $city) { + if (! count(get_city_hubs($city->getId()))) continue; + $candidates[] = $city; + } + if (! count($candidates)) return; + echo "

Show hubs in city\n"; echo "\n";