From 8710f94c9f038c81e9ad89a0a2a20cc693247a96 Mon Sep 17 00:00:00 2001 From: filip Date: Sun, 15 May 2016 11:37:40 +0200 Subject: improve visual representation of countries and continents on DL page --- en/downloads/get/index.php | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) (limited to 'en/downloads/get/index.php') diff --git a/en/downloads/get/index.php b/en/downloads/get/index.php index b121e3407..21e9bed86 100644 --- a/en/downloads/get/index.php +++ b/en/downloads/get/index.php @@ -131,12 +131,19 @@ try { } // Feedback about current mirror location + trigger for alt mirrors. + if (array_key_exists($one_mirror['country'], $countries)) { + $mirrors_country_name = $countries[$one_mirror['country']]; + } else if (array_key_exists($one_mirror['country'], MGA_Geoip::$MGA_COUNTRY_CODE_TO_COUNTRY_NAME)) { + $mirrors_country_name = MGA_Geoip::$MGA_COUNTRY_CODE_TO_COUNTRY_NAME[$one_mirror['country']]; + } else { + $mirrors_country_name = $one_mirror['country']; + } $dl2_mirror_alt = sprintf( _r('This %s download mirror is located in %s (%s).'), $one_mirror['mirror_url'], $one_mirror['mirror_host'], - rewrite_city($one_mirror['city']) . ', ' . $countries[$one_mirror['country']], - $one_mirror['country'] + rewrite_city($one_mirror['city']), + $mirrors_country_name ) . ' ' . _r('If it does not work well for you, check out these other mirrors.'); @@ -233,9 +240,22 @@ if (array_key_exists('sha512', $product)) {

-- cgit v1.2.1