diff options
author | Romain d'Alverny <rda@mageia.org> | 2011-06-29 15:30:40 +0000 |
---|---|---|
committer | Romain d'Alverny <rda@mageia.org> | 2011-06-29 15:30:40 +0000 |
commit | 9f0dc37ea6713c67b1375acd5b433206ffc51ae1 (patch) | |
tree | 71b90becfde0b4dc569d3c72be43b586fd7b3166 /lib | |
parent | dc30577cf6f27537663e7f70308a8dd90cc76c5a (diff) | |
download | www-9f0dc37ea6713c67b1375acd5b433206ffc51ae1.tar www-9f0dc37ea6713c67b1375acd5b433206ffc51ae1.tar.gz www-9f0dc37ea6713c67b1375acd5b433206ffc51ae1.tar.bz2 www-9f0dc37ea6713c67b1375acd5b433206ffc51ae1.tar.xz www-9f0dc37ea6713c67b1375acd5b433206ffc51ae1.zip |
version 1 for mirrors list and path
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Downloads.php | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/Downloads.php b/lib/Downloads.php index b357e4612..ea0044cdf 100644 --- a/lib/Downloads.php +++ b/lib/Downloads.php @@ -93,7 +93,7 @@ class Downloads public static function get_all_mirrors() { $prod = true; - $cache_file = '../../lib/cached.list.php'; + $cache_file = realpath('../../lib/cached.list.php'); if ($prod) { require $cache_file; @@ -101,7 +101,7 @@ class Downloads } // @todo cache this! - $data = file('http://mirrors.mageia.org/api/foo.Cauldron.i586.list'); + $data = file('http://mirrors.mageia.org/api/mageia.1.i586.list'); $mirrors3 = array(); foreach ($data as $line) { $line = explode(',', trim($line)); @@ -115,10 +115,11 @@ class Downloads $mirrors3[$m['country']][] = array( 'city' => isset($m['city']) ? $m['city'] : '?', 'zone' => $m['zone'], - 'url' => str_replace('/distrib/cauldron/i586', '', $m['url']) + // BEWARE of the path substitution here. Must match. + 'url' => str_replace('/distrib/1/i586', '', $m['url']) ); } - + /* file_put_contents($cache_file, sprintf('<?php $mirrors = %s; ?>', |