From 63fcd5fd546432d68fc04ba59d1cad321e0586e7 Mon Sep 17 00:00:00 2001 From: filip Date: Wed, 18 May 2016 01:00:48 +0200 Subject: move 'Your IP ...' sentence where it fits better --- en/downloads/get/index.php | 42 ++++++++++++++++++++---------------------- 1 file changed, 20 insertions(+), 22 deletions(-) (limited to 'en/downloads') diff --git a/en/downloads/get/index.php b/en/downloads/get/index.php index 28579316a..2b7cfed17 100644 --- a/en/downloads/get/index.php +++ b/en/downloads/get/index.php @@ -139,13 +139,30 @@ try { $mirrors_country_name = $one_mirror['country']; } $dl2_mirror_alt = sprintf( - _r('This %s download mirror is located in %s (%s).'), + _r('This %s download mirror is located in %s (%s).', ' '), $one_mirror['mirror_url'], $one_mirror['mirror_host'], rewrite_city($one_mirror['city']), $mirrors_country_name - ) - . ' ' . _r('If it does not work well for you, check out these other mirrors.'); + ); + $dl2_mirror_alt .= _r('If it does not work well for you, check out these other mirrors.', ' '); + if (array_key_exists($_SESSION['country'], $countries)) { + $country_name = $countries[$_SESSION['country']]; + } else if (array_key_exists($_SESSION['country'], MGA_Geoip::$MGA_COUNTRY_CODE_TO_COUNTRY_NAME)) { + $country_name = MGA_Geoip::$MGA_COUNTRY_CODE_TO_COUNTRY_NAME[$_SESSION['country']]; + } else { + $country_name = $_SESSION['country']; + } + + if (array_key_exists($_SESSION['continent'], MGA_Geoip::$MGA_CONTINENT_CODE_TO_CONTINENT_NAME)) { + $continent_name = MGA_Geoip::$MGA_CONTINENT_CODE_TO_CONTINENT_NAME[$_SESSION['continent']]; + } else { + $continent_name = $_SESSION['continent']; + } + $dl2_mirror_alt .= sprintf( + _r('Your IP address is %s and you seem to be in %s, %s.'), + $_SESSION['ip'], $country_name, $continent_name + ); // at the end of this block we expect the following vars to be available from here: @@ -277,25 +294,6 @@ gpg: There is no indication that the signature belongs to the owner.

-

-- cgit v1.2.1