diff options
-rw-r--r-- | lib/Downloads.php | 12 | ||||
-rw-r--r-- | lib/cached.list.php | 382 |
2 files changed, 98 insertions, 296 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 +} diff --git a/lib/cached.list.php b/lib/cached.list.php index af90d3de0..90a687dcb 100644 --- a/lib/cached.list.php +++ b/lib/cached.list.php @@ -1,106 +1,49 @@ <?php $mirrors = array ( - 'NL' => + 'US' => array ( 0 => array ( - 'city' => 'Enschede', - 'continent' => 'EU', - 'zone' => 'NL', - 'url' => 'ftp://ftp.snt.utwente.nl/pub/os/linux/mageia', - ), - 2 => - array ( - 'city' => 'Enschede', - 'continent' => 'EU', - 'zone' => 'NL', - 'url' => 'http://ftp.snt.utwente.nl/pub/os/linux/mageia', + 'city' => '?', + 'continent' => 'NA', + 'zone' => 'US', + 'url' => 'ftp://mirrors.kernel.org/mageia', ), ), - '_C:EU' => + '_C:NA' => array ( 0 => array ( - 'city' => 'Enschede', - 'continent' => 'EU', - 'zone' => 'NL', - 'url' => 'ftp://ftp.snt.utwente.nl/pub/os/linux/mageia', - ), - 11 => - array ( - 'city' => 'Enschede', - 'continent' => 'EU', - 'zone' => 'NL', - 'url' => 'http://ftp.snt.utwente.nl/pub/os/linux/mageia', - ), - 4 => - array ( - 'city' => 'Cologne', - 'continent' => 'EU', - 'zone' => 'DE', - 'url' => 'http://mirror.netcologne.de/mageia', - ), - 18 => - array ( - 'city' => 'Lucern', - 'continent' => 'EU', - 'zone' => 'CH', - 'url' => 'ftp://ftp.LinuxCabal.org/pub/mirrors/Mageia', - ), - 20 => - array ( - 'city' => 'Cologne', - 'continent' => 'EU', - 'zone' => 'DE', - 'url' => 'ftp://mirror.netcologne.de/mageia', - ), - 23 => - array ( - 'city' => 'Paris', - 'continent' => 'EU', - 'zone' => 'FR', - 'url' => 'http://distrib-coffee.ipsl.jussieu.fr/pub/linux/Mageia', - ), - 24 => - array ( - 'city' => 'Lyon', - 'continent' => 'EU', - 'zone' => 'FR', - 'url' => 'ftp://fr2.rpmfind.net/linux/mageia', - ), - 25 => - array ( - 'city' => 'Hermsdorf', - 'continent' => 'EU', - 'zone' => 'DE', - 'url' => 'ftp://mirror.tuxinator.org/mageia', - ), - 29 => - array ( - 'city' => 'Hermsdorf', - 'continent' => 'EU', - 'zone' => 'DE', - 'url' => 'http://mirror.tuxinator.org/mageia', + 'city' => '?', + 'continent' => 'NA', + 'zone' => 'US', + 'url' => 'ftp://mirrors.kernel.org/mageia', ), - 30 => + 1 => array ( - 'city' => 'Lyon', - 'continent' => 'EU', - 'zone' => 'FR', - 'url' => 'http://fr2.rpmfind.net/linux/mageia', + 'city' => 'Toronto', + 'continent' => 'NA', + 'zone' => 'CA', + 'url' => 'ftp://mageia.webconquest.com', ), - 36 => + ), + 'BR' => + array ( + 0 => array ( - 'city' => '?', - 'continent' => 'EU', - 'zone' => 'CZ', - 'url' => 'http://mageia.supp.name', + 'city' => 'Campinas', + 'continent' => 'SA', + 'zone' => 'BR', + 'url' => 'ftp://ftp.las.ic.unicamp.br/pub/mageia', ), - 40 => + ), + '_C:SA' => + array ( + 0 => array ( - 'city' => 'Paris', - 'continent' => 'EU', - 'zone' => 'FR', - 'url' => 'ftp://distrib-coffee.ipsl.jussieu.fr/pub/linux/Mageia', + 'city' => 'Campinas', + 'continent' => 'SA', + 'zone' => 'BR', + 'url' => 'ftp://ftp.las.ic.unicamp.br/pub/mageia', ), ), 'TR' => @@ -110,13 +53,6 @@ 'city' => 'Ankara', 'continent' => 'AS', 'zone' => 'TR', - 'url' => 'http://ftp.linux.org.tr/mageia', - ), - 1 => - array ( - 'city' => 'Ankara', - 'continent' => 'AS', - 'zone' => 'TR', 'url' => 'ftp://ftp.linux.org.tr/mageia', ), ), @@ -127,29 +63,8 @@ 'city' => 'Ankara', 'continent' => 'AS', 'zone' => 'TR', - 'url' => 'http://ftp.linux.org.tr/mageia', - ), - 1 => - array ( - 'city' => 'Ankara', - 'continent' => 'AS', - 'zone' => 'TR', 'url' => 'ftp://ftp.linux.org.tr/mageia', ), - 3 => - array ( - 'city' => 'Tsukuba', - 'continent' => 'AS', - 'zone' => 'JP', - 'url' => 'http://ftp.tsukuba.wide.ad.jp/Linux/mageia', - ), - 5 => - array ( - 'city' => '石川', - 'continent' => 'AS', - 'zone' => 'JP', - 'url' => 'http://ftp.jaist.ac.jp/pub/Linux/Mageia', - ), ), 'CA' => array ( @@ -160,49 +75,67 @@ 'zone' => 'CA', 'url' => 'ftp://mageia.webconquest.com', ), - 1 => + ), + 'NL' => + array ( + 0 => array ( - 'city' => 'Toronto', - 'continent' => 'NA', - 'zone' => 'CA', - 'url' => 'http://mageia.webconquest.com', + 'city' => 'Enschede', + 'continent' => 'EU', + 'zone' => 'NL', + 'url' => 'ftp://ftp.snt.utwente.nl/pub/os/linux/mageia', ), ), - '_C:NA' => + '_C:EU' => array ( 0 => array ( - 'city' => 'Toronto', - 'continent' => 'NA', - 'zone' => 'CA', - 'url' => 'ftp://mageia.webconquest.com', - ), 4 => + 'city' => 'Enschede', + 'continent' => 'EU', + 'zone' => 'NL', + 'url' => 'ftp://ftp.snt.utwente.nl/pub/os/linux/mageia', + ), + 1 => array ( - 'city' => 'Toronto', - 'continent' => 'NA', - 'zone' => 'CA', - 'url' => 'http://mageia.webconquest.com', + 'city' => 'Esslingen', + 'continent' => 'EU', + 'zone' => 'DE', + 'url' => 'ftp://ftp-stud.hs-esslingen.de/pub/Mirrors/Mageia', ), - 1 => + 2 => array ( - 'city' => '?', - 'continent' => 'NA', - 'zone' => 'US', - 'url' => 'ftp://mirrors.kernel.org/mageia', + 'city' => 'Lyon', + 'continent' => 'EU', + 'zone' => 'FR', + 'url' => 'ftp://fr2.rpmfind.net/linux/mageia', ), - 3 => + 3 => + array ( + 'city' => 'Hermsdorf', + 'continent' => 'EU', + 'zone' => 'DE', + 'url' => 'ftp://mirror.tuxinator.org/mageia', + ), + 4 => + array ( + 'city' => 'Cologne', + 'continent' => 'EU', + 'zone' => 'DE', + 'url' => 'ftp://mirror.netcologne.de/mageia', + ), + 5 => array ( 'city' => '?', - 'continent' => 'NA', - 'zone' => 'US', - 'url' => 'http://mirrors.kernel.org/mageia', + 'continent' => 'EU', + 'zone' => 'CZ', + 'url' => 'ftp://ftp.sh.cvut.cz/MIRRORS/mageia', ), 6 => array ( - 'city' => 'Lenoir', - 'continent' => 'NA', - 'zone' => 'US', - 'url' => 'http://mirror.dacentec.com/mageia', + 'city' => 'Paris', + 'continent' => 'EU', + 'zone' => 'FR', + 'url' => 'ftp://distrib-coffee.ipsl.jussieu.fr/pub/linux/Mageia', ), ), 'ZA' => @@ -214,13 +147,6 @@ 'zone' => 'ZA', 'url' => 'ftp://ftp.sun.ac.za/pub/mirrors/mageia', ), - 1 => - array ( - 'city' => 'Stellenbosch', - 'continent' => 'AF', - 'zone' => 'ZA', - 'url' => 'http://ftp.sun.ac.za/ftp/pub/mirrors/mageia', - ), ), '_C:AF' => array ( @@ -231,157 +157,41 @@ 'zone' => 'ZA', 'url' => 'ftp://ftp.sun.ac.za/pub/mirrors/mageia', ), - 1 => - array ( - 'city' => 'Stellenbosch', - 'continent' => 'AF', - 'zone' => 'ZA', - 'url' => 'http://ftp.sun.ac.za/ftp/pub/mirrors/mageia', - ), - ), - 'TW' => - array ( ), 'DE' => array ( - 1 => - array ( - 'city' => 'Cologne', - 'continent' => 'EU', - 'zone' => 'DE', - 'url' => 'http://mirror.netcologne.de/mageia', - ), - 5 => - array ( - 'city' => 'Cologne', - 'continent' => 'EU', - 'zone' => 'DE', - 'url' => 'ftp://mirror.netcologne.de/mageia', - ), - 3 => - array ( - 'city' => 'Esslingen', - 'continent' => 'EU', - 'zone' => 'DE', - 'url' => 'http://ftp-stud.hs-esslingen.de/pub/Mirrors/Mageia', - ), - 9 => + 0 => array ( 'city' => 'Esslingen', 'continent' => 'EU', 'zone' => 'DE', 'url' => 'ftp://ftp-stud.hs-esslingen.de/pub/Mirrors/Mageia', ), - 6 => + 1 => array ( 'city' => 'Hermsdorf', 'continent' => 'EU', 'zone' => 'DE', 'url' => 'ftp://mirror.tuxinator.org/mageia', ), - 7 => + 2 => array ( - 'city' => 'Hermsdorf', + 'city' => 'Cologne', 'continent' => 'EU', 'zone' => 'DE', - 'url' => 'http://mirror.tuxinator.org/mageia', - ), - - ), - 'US' => - array ( - 0 => - array ( - 'city' => '?', - 'continent' => 'NA', - 'zone' => 'US', - 'url' => 'ftp://mirrors.kernel.org/mageia', - ), - 2 => - array ( - 'city' => '?', - 'continent' => 'NA', - 'zone' => 'US', - 'url' => 'http://mirrors.kernel.org/mageia', - ), - 4 => - array ( - 'city' => 'Lenoir', - 'continent' => 'NA', - 'zone' => 'US', - 'url' => 'http://mirror.dacentec.com/mageia', - ), - ), - 'CH' => - array ( - 1 => - array ( - 'city' => 'Lucern', - 'continent' => 'EU', - 'zone' => 'CH', - 'url' => 'ftp://ftp.LinuxCabal.org/pub/mirrors/Mageia', - ), - ), - 'CZ' => - array ( - 3 => - array ( - 'city' => '?', - 'continent' => 'EU', - 'zone' => 'CZ', - 'url' => 'http://mageia.supp.name', - ), - ), - 'BR' => - array ( - ), - '_C:SA' => - array ( - 1 => - array ( - 'city' => 'Buenos Aires', - 'continent' => 'SA', - 'zone' => 'AR', - 'url' => 'http://mageia.xfree.com.ar', - ), - ), - 'AR' => - array ( - 0 => - array ( - 'city' => 'Buenos Aires', - 'continent' => 'SA', - 'zone' => 'AR', - 'url' => 'http://mageia.xfree.com.ar', + 'url' => 'ftp://mirror.netcologne.de/mageia', ), ), - 'SE' => - array ( - ), 'FR' => array ( - 1 => - array ( - 'city' => 'Paris', - 'continent' => 'EU', - 'zone' => 'FR', - 'url' => 'http://distrib-coffee.ipsl.jussieu.fr/pub/linux/Mageia', - ), - 2 => + 0 => array ( 'city' => 'Lyon', 'continent' => 'EU', 'zone' => 'FR', 'url' => 'ftp://fr2.rpmfind.net/linux/mageia', ), - 3 => - array ( - 'city' => 'Lyon', - 'continent' => 'EU', - 'zone' => 'FR', - 'url' => 'http://fr2.rpmfind.net/linux/mageia', - ), - 4 => + 1 => array ( 'city' => 'Paris', 'continent' => 'EU', @@ -389,26 +199,14 @@ 'url' => 'ftp://distrib-coffee.ipsl.jussieu.fr/pub/linux/Mageia', ), ), - 'JP' => + 'CZ' => array ( 0 => array ( - 'city' => 'Tsukuba', - 'continent' => 'AS', - 'zone' => 'JP', - 'url' => 'http://ftp.tsukuba.wide.ad.jp/Linux/mageia', - ), - 1 => - array ( - 'city' => '石川', - 'continent' => 'AS', - 'zone' => 'JP', - 'url' => 'http://ftp.jaist.ac.jp/pub/Linux/Mageia', + 'city' => '?', + 'continent' => 'EU', + 'zone' => 'CZ', + 'url' => 'ftp://ftp.sh.cvut.cz/MIRRORS/mageia', ), ), - 'IT' => - array ( - ), - - -); ?> +); ?>
\ No newline at end of file |