aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Downloads.php
diff options
context:
space:
mode:
authorManuel Hiebel <leuhmanu@mageia.org>2013-05-19 15:49:15 +0000
committerManuel Hiebel <leuhmanu@mageia.org>2013-05-19 15:49:15 +0000
commitb6bb1b538fad23e5729fd8a8b69472c7ab5515f5 (patch)
tree8135fa4ab5c7bed9c72746d3d6953cb0157838ff /lib/Downloads.php
parenta8e1c541bf89f0ae220ac27e3acbc2f339ebf33b (diff)
downloadwww-b6bb1b538fad23e5729fd8a8b69472c7ab5515f5.tar
www-b6bb1b538fad23e5729fd8a8b69472c7ab5515f5.tar.gz
www-b6bb1b538fad23e5729fd8a8b69472c7ab5515f5.tar.bz2
www-b6bb1b538fad23e5729fd8a8b69472c7ab5515f5.tar.xz
www-b6bb1b538fad23e5729fd8a8b69472c7ab5515f5.zip
updates cached list, with the script which check now a torrent file
Diffstat (limited to 'lib/Downloads.php')
-rw-r--r--lib/Downloads.php12
1 files changed, 8 insertions, 4 deletions
diff --git a/lib/Downloads.php b/lib/Downloads.php
index aef1dd185..534cd5e0f 100644
--- a/lib/Downloads.php
+++ b/lib/Downloads.php
@@ -113,8 +113,8 @@ class Downloads
$val = explode('=', trim($val));
$m[$val[0]] = $val[1];
}
- $pu = parse_url($m['url']);
- if (in_array($pu['scheme'], array('http', 'ftp'))) {
+ $pu = parse_url($m['url']);
+ if (in_array($pu['scheme'], array('http', 'ftp'))) {
$item = array(
'city' => isset($m['city']) ? $m['city'] : '?',
@@ -123,9 +123,13 @@ class Downloads
// BEWARE of the path substitution here. Must match.
'url' => str_replace('/distrib/1/i586', '', $m['url'])
);
+
+ $torrent =$item['url'].'/iso/3/torrents/Mageia-3-LiveDVD-KDE4-x86_64-DVD.torrent' ;
+ if (file_exists($torrent)){
- $mirrors[$m['country']][] = $item;
+ $mirrors[$m['country']][] = $item;
$mirrors['_C:' . $m['continent']][] = $item;
+ }
}
}
@@ -282,4 +286,4 @@ class Downloads
'fuzzy_mirror' => $fuzzy_mirror
);
}
-} \ No newline at end of file
+}