X-Git-Url: http://git.iain.cx/?a=blobdiff_plain;f=lib%2Ffunctions.php;h=73ea46443743007dd483b8a2d5d80bc6dd888516;hb=8d1046edac05814d1a7ddd4d55aa356a46d06685;hp=7a02b2af054808cd98dd7b2343ab35354c7c5c49;hpb=a646a2cfbd63d70043e60d88afff0add11ad7e81;p=readifood.git diff --git a/lib/functions.php b/lib/functions.php index 7a02b2a..73ea464 100644 --- a/lib/functions.php +++ b/lib/functions.php @@ -317,6 +317,13 @@ return $q->findOneById($address->getAreaId()); } + function get_address_map_link($address) { + $postcode = trim($address->getPostcode()); + if ($postcode) { + return " " . get_small_link("Map", "http://maps.google.co.uk/maps?q=" . urlencode($postcode)); + } + } + function get_contact_address($contact) { $q = new AddressQuery; return $q->findOneById($contact->getAddressId());