--- location.inc 15 Jun 2006 12:32:37 -0000 1.34.2.2 +++ location.inc 19 Dec 2006 23:53:33 -0000 @@ -108,56 +108,56 @@ $output = ''; $country_specific_function = 'theme_location_'. (isset($location['country']) ? $location['country'] : ''); if (function_exists($country_specific_function)) { - $output .= $country_specific_function($location); + $output .= $country_specific_function($location, $hide); } elseif (count($location)) { $output .= "\n"; - $output .= '
'."\n"; + $output .= '
'."\n"; if (!empty($location['name']) && !in_array('name', $hide)) { - $output .= '
'. $location['name'] .'
'; - } - - if (!empty($location['street']) && !in_array('street', $hide)) { + $output .= '
'. $location['name'] .'
'; + } + $output .= '
'. $location['street']; + if (!empty($location['additional']) && !in_array('street', $hide)) { + $output .= ' ' . $location['additional']; + } + $output .='
'; $output .= '
'. $location['street'] .'
'; } - if (!empty($location['additional']) && !in_array('street', $hide)) { - $output .= '
' . $location['additional'] . '
'; + if (!empty($location['city']) && !in_array('city', $hide)) { + $city_province_postal[] = $location['city']; } - if ((!empty($location['city']) && !in_array('city', $hide)) || - (!empty($location['province']) && !in_array('province', $hide)) || - (!empty($location['postal_code']) && !in_array('postal_code', $hide))) { - $output .= '
'; - + if ((!empty($location['city']) && !in_array('city', $hide)) || + (!empty($location['province']) && !in_array('province', $hide)) || + (!empty($location['postal_codet']) && !in_array('postal_code', $hide))) { + $city_province_postal = array(); if (!empty($location['city']) && !in_array('city', $hide)) { $city_province_postal[] = $location['city']; } if (!empty($location['province']) && !in_array('province', $hide)) { - $city_province_postal[] = $location['province']; + $city_province_postal[] = '' . $location['city'] . ''; } if (!empty($location['postal_code']) && !in_array('postal_code', $hide)) { - $city_province_postal[] = $location['postal_code']; + $city_province_postal[] = '' . $location['postal_code'] . ''; } $output .= implode(', ', $city_province_postal); - - $output .= '
'; - } if (!empty($location['country']) && !in_array('country', $hide)) { $countries = _location_get_iso3166_list(); - $output .= '
'. $countries[$location['country']] . '
'; + + $output .= '
'. t($countries[$location['country']]) . '
'; } - - $output .= '
'; + if (!empty($location['latitude']) && !empty($location['longitude'])) { + $output .= '
Latitude: ' . $location['latitude'] . '' . 'Longitude: ' . $location['longitude'] . '
'; + } + $output .= ''; } - $output .= location_map_link($location); - return $output; }