diff options
author | filip <filip.komar@gmail.com> | 2016-06-01 16:41:19 +0200 |
---|---|---|
committer | filip <filip.komar@gmail.com> | 2016-06-01 16:41:19 +0200 |
commit | 501bc64d8b0754c13da1145bc3ac267784a561ce (patch) | |
tree | 4429ef558b8bf41dc08098b33b2d9bb17b307a16 /lib/Downloads.php | |
parent | 38f6cf7ecc3b712069889b0efaea799b2806506f (diff) | |
download | www-501bc64d8b0754c13da1145bc3ac267784a561ce.tar www-501bc64d8b0754c13da1145bc3ac267784a561ce.tar.gz www-501bc64d8b0754c13da1145bc3ac267784a561ce.tar.bz2 www-501bc64d8b0754c13da1145bc3ac267784a561ce.tar.xz www-501bc64d8b0754c13da1145bc3ac267784a561ce.zip |
adding caching list for mirrorlist
+ update other two caching lists (ISO and doc)
Diffstat (limited to 'lib/Downloads.php')
-rw-r--r-- | lib/Downloads.php | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/Downloads.php b/lib/Downloads.php index b69bafaea..71821b490 100644 --- a/lib/Downloads.php +++ b/lib/Downloads.php @@ -131,10 +131,12 @@ class Downloads * * @return array */ - public static function get_all_mirrors($prod = true, $documentation = false) + public static function get_all_mirrors($prod = true, $documentation = false, $mirrorlist = false) { if ($documentation) { $cache_file = realpath(__DIR__ . '/cached.list_doc.php'); + } else if ($mirrorlist) { + $cache_file = realpath(__DIR__ . '/cached.list_mirrorlist.php'); } else { $cache_file = realpath(__DIR__ . '/cached.list.php'); } @@ -168,6 +170,8 @@ class Downloads if ($documentation) { $test_file = $item['url'].'/people/marcom/doc/mga5/date.txt'; + } else if ($mirrorlist) { + $test_file = $item['url'].'/distrib/6/x86_64/media/core/updates/repodata/repomd.xml'; } else { $test_file = $item['url'].'/iso/5/torrents/Mageia-5-LiveDVD-KDE4-x86_64-DVD.torrent'; } |