aboutsummaryrefslogtreecommitdiffstats
path: root/en/downloads/dl.php
diff options
context:
space:
mode:
authorRomain d'Alverny <rda@mageia.org>2011-04-26 08:17:28 +0000
committerRomain d'Alverny <rda@mageia.org>2011-04-26 08:17:28 +0000
commit430279313b852c10cd004972c2f19ab0277b6536 (patch)
treed69dbc6a651211daf80c49479d2651e74c374c95 /en/downloads/dl.php
parente5b216a983a654c942f6b373fa98f90e6b4e48f8 (diff)
downloadwww-430279313b852c10cd004972c2f19ab0277b6536.tar
www-430279313b852c10cd004972c2f19ab0277b6536.tar.gz
www-430279313b852c10cd004972c2f19ab0277b6536.tar.bz2
www-430279313b852c10cd004972c2f19ab0277b6536.tar.xz
www-430279313b852c10cd004972c2f19ab0277b6536.zip
Fix alternate downloads ISO file name.
CCBUG 991
Diffstat (limited to 'en/downloads/dl.php')
-rw-r--r--en/downloads/dl.php17
1 files changed, 11 insertions, 6 deletions
diff --git a/en/downloads/dl.php b/en/downloads/dl.php
index bebdb1e1b..1c19458e0 100644
--- a/en/downloads/dl.php
+++ b/en/downloads/dl.php
@@ -31,9 +31,11 @@ $product_iso = $product . '.iso';
$wsd = new Downloads('en', null);
$a = $wsd->prepare_download(null, true);
+$product_dl_link = null;
if ($torrent) {
if (isset($p['torrent'])) {
+ $product_dl_link = $p['torrent'];
$dl_link = sprintf('%s/%s', $a['mirror_url'], $p['torrent']);
}
else {
@@ -42,10 +44,11 @@ if ($torrent) {
}
}
else {
- if (isset($p['path']))
- $dl_link = sprintf('%s/%s', $a['mirror_url'], $p['path']);
- else
- $dl_link = sprintf('%s/%s/%s', $a['mirror_url'], 'iso/cauldron', $product_iso);
+ $product_dl_link = isset($p['path']) ?
+ $p['path'] :
+ sprintf('iso/cauldron/%s', $product_iso);
+
+ $dl_link = sprintf('%s/%s', $a['mirror_url'], $product_dl_link);
}
// @fixme (rda) actually, http-equiv="refresh" is deprecated behaviour now.
@@ -64,7 +67,7 @@ foreach ($g_mirrors as $country => $cities):
$mirs = array();
foreach ($mirrors as $m) {
$pm = parse_url($m);
- $alt_dl_link = sprintf('%s/%s/%s', $m, 'iso/cauldron', $product_iso);
+ $alt_dl_link = sprintf('%s%s', $m, $product_dl_link);
$mirs[] = sprintf('%s://<a href="%s" rel="nofollow">%s</a>',
$pm['scheme'], $alt_dl_link, $pm['host']);
}
@@ -76,6 +79,8 @@ $dl2_mirror_alt = sprintf($_t['dl_mirror_loc'],
$a['mirror_url'], $a['mirror_host'], $countries[$a['country']], $a['country'])
. ' ' . $_t['dl_alt_mirrors'];
+
+$relocation = '';
?><!DOCTYPE html>
<html lang="<?php echo $locale; ?>">
<head>
@@ -137,7 +142,7 @@ $ sha1 <?php echo $product_iso, "\n", $p['sha1'], "\n"; ?>
<p>To speed up fixes &amp; improvements for beta2, we organize
two test days for beta1 in the coming days.</p>
<p><a href="http://blog.mageia.org/en/2011/04/07/on-the-tests-again/">Learn more</a>.</p>
- </div>
+ </div>
<p><?php echo sprintf($_t['wherehelp'],
'<a href="http://mageia.org/wiki/doku.php?id=marketing">', '</a>',