From 9f0dc37ea6713c67b1375acd5b433206ffc51ae1 Mon Sep 17 00:00:00 2001 From: Romain d'Alverny Date: Wed, 29 Jun 2011 15:30:40 +0000 Subject: version 1 for mirrors list and path --- lib/Downloads.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'lib') 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('', -- cgit v1.2.1