aboutsummaryrefslogtreecommitdiffstats
path: root/en/downloads/get/index.php
diff options
context:
space:
mode:
Diffstat (limited to 'en/downloads/get/index.php')
-rw-r--r--en/downloads/get/index.php24
1 files changed, 14 insertions, 10 deletions
diff --git a/en/downloads/get/index.php b/en/downloads/get/index.php
index 3ec90ebd2..add253c0f 100644
--- a/en/downloads/get/index.php
+++ b/en/downloads/get/index.php
@@ -33,9 +33,14 @@
*
*/
-require 'lib.php';
require_once '../../../lib/mga_geoip.php';
+define('HLANG', true);
+define('ALIGNMENT', 'Center');
+require '../../../langs.php';
+$dictionary = read_translation_file($locale, array('downloads/get', 'common_footer'));
+require 'lib.php';
+
// request
$product = get('q');
$doc = get('doc');
@@ -44,17 +49,11 @@ if (isset($_GET['torrent'])) {
$torrent = strip_tags(trim($_GET['torrent']));
}
$torrent = isset($torrent) ? true : false;
-
if (is_null($product)) {
header('Location: /downloads/');
die;
}
-define('HLANG', true);
-define('ALIGNMENT', 'Center');
-require '../../../langs.php';
-$dictionary = read_translation_file($locale, array('downloads/get', 'common_footer'));
-
session_start();
$download = null;
@@ -126,7 +125,12 @@ try {
$alt_dl_link, strtoupper($pm['scheme']), $pm['host']
);
}
- $s[] = sprintf('<td>%s</td><td>%s</td>', rewrite_city($city), implode(', ', $mirs));
+ if ("-" == $city) {
+ $city = _r("City not set");
+ }
+ $s[] = sprintf('<td>%s</td><td>%s</td>',
+ (isset($cities_i18n[$city])) ? $cities_i18n[$city] : $city,
+ implode(', ', $mirs));
}
$alternative_mirrors .= sprintf('<tr><td rowspan="%d">%s</td>%s</tr>' . PHP_EOL, count($cities), $country, implode('</tr><tr>', $s));
}
@@ -143,8 +147,8 @@ try {
_r('This <a href="%s">%s</a> download mirror is located in %s (%s).', ' '),
$one_mirror['mirror_url'],
$one_mirror['mirror_host'],
- rewrite_city($one_mirror['city']),
- $mirrors_country_name
+ ("-" == $one_mirror['city']) ? $mirrors_country_name : $one_mirror['city'],
+ ("-" == $one_mirror['city']) ? _r("City not set") : $mirrors_country_name
);
$dl2_mirror_alt .= _r('If it does not work well for you, <a href="#om" id="other_mirrors_btn">check out these other mirrors</a>.', ' ');
if (array_key_exists($_SESSION['country'], $countries)) {