diff options
Diffstat (limited to 'lib')
42 files changed, 1607 insertions, 687 deletions
diff --git a/lib/Downloads.php b/lib/Downloads.php index f4b21f85f..69a0e38ad 100644 --- a/lib/Downloads.php +++ b/lib/Downloads.php @@ -88,8 +88,8 @@ class Downloads /** * Sort 2D array by multiple associative or numeric keys. * $sorted_array = self::sort_2d_array_by_multiple_keys($unsorted_array, 'first key', 'second', ...); - * - * based on SortArray http://php.net/manual/en/function.usort.php#42535 + * + * Note that keys are preserved! * * @param array $unsorted_array * @@ -103,21 +103,27 @@ class Downloads */ public static function sort_2d_array_by_multiple_keys() { - $arguments = func_get_args(); - $array = $arguments[0]; - $anonymous_function = ''; - $num_of_arguments = count($arguments); - for ($cur_argument = 1; $cur_argument < $num_of_arguments; $cur_argument++) { - $anonymous_function .= "if (\$first['$arguments[$cur_argument]'] != \$second['$arguments[$cur_argument]']) {"; - $anonymous_function .= " \$compare_result = strcoll(\$first['$arguments[$cur_argument]'], \$second['$arguments[$cur_argument]']);"; - $anonymous_function .= " if (0 == \$compare_result) { return 0; };"; - $anonymous_function .= " return ((0 > \$compare_result) ? -1 : 1);"; - $anonymous_function .= "}"; - } - $anonymous_function .= "return 0;"; - $compare_function = create_function("\$first, \$second", $anonymous_function); - usort($array, $compare_function); - return $array; + $arguments = func_get_args(); + $unsorted_array = array_shift($arguments); + $sort_order = $arguments; + uasort($unsorted_array, function($first_value, $second_value) use($sort_order) { + $result = 0; + for($argument_num = 1, $num_of_arguments = count($sort_order); $argument_num <= $num_of_arguments; $argument_num += 1) { + $key = $sort_order[$argument_num - 1]; + $first_compare_value = $first_value[$key]; + $second_compare_value = $second_value[$key]; + $comparison = strcoll($first_compare_value, $second_compare_value); + if(0 == $comparison) { + $temp_result = 0; + } else { + $temp_result = (0 > $comparison) ? -1 : 1; + } + $result += $temp_result; + $result = 10 * $result; + } + return $result; + }); + return $unsorted_array; } /** @@ -149,7 +155,7 @@ class Downloads require $cache_file; } else { - $data = file('http://mirrors.mageia.org/api/mageia.7.i586.list'); + $data = file('http://mirrors.mageia.org/api/mageia.9.i586.list'); $mirrors = array(); $num_up = 0; $num_dn = 0; @@ -162,50 +168,66 @@ class Downloads include_once(realpath(__DIR__) . '/../en/downloads/get/lib.php'); $refresh_country_and_city_arrays = true; } + $num_of_all_mirrs = count($data); + $num_of_tested_mirrs = 0; + $common_patern = '/distrib/8/i586'; + $common_patern = '/distrib/9/i586'; + //~ $common_patern = '/distrib/cauldron/i586'; + // this huge regex magic achieved with a lot of help from great https://regex101.com/ + $single_mirror_parsing_regex = '/\s*continent\s*=\s*(?<continent>\w*)\s*,\s*'; + $single_mirror_parsing_regex .= '\s*zone\s*=\s*(?<zone>\w*)\s*,\s*'; + $single_mirror_parsing_regex .= '\s*country\s*=\s*(?<country>\w*)\s*,\s*'; + $single_mirror_parsing_regex .= '(?:\s*city\s*=\s*(?<city>[\S ,]*)\s*,\s*)?'; + $single_mirror_parsing_regex .= '\s*latitude\s*=\s*[-]?\d*\.?\d*\s*,\s*'; + $single_mirror_parsing_regex .= '\s*longitude\s*=\s*[-]?\d*\.?\d*\s*,\s*'; + $single_mirror_parsing_regex .= '\s*version\s*=\s*\w*\s*,\s*arch\s*=\s*\w*\s*,\s*type\s*=\s*\w*\s*,\s*'; + $single_mirror_parsing_regex .= '\s*url\s*=\s*(?<url>\S*)\s*/m'; foreach ($data as $line) { - $line = explode(',', trim($line)); - $m = array(); - foreach ($line as $val) { - $val = explode('=', trim($val)); - if (!empty($val[1])) { - $m[$val[0]] = $val[1]; - } else { - // workaround to add second values with unescaped comma in csv line to the previous (valid) value - end($m); - $m[key($m)] = $m[key($m)] . ", " . $val[0]; - if ($refresh_country_and_city_arrays == true) { - // store $line to examine faults - $faults[] = $line; - } - } + $num_of_tested_mirrs++; + $mirrs_processed = sprintf("%.0f %%", $num_of_tested_mirrs / $num_of_all_mirrs * 100); + $regex_error = preg_match_all($single_mirror_parsing_regex, $line, $matches, PREG_SET_ORDER, 0); + if (false === $regex_error) { + $faults['error: regex parse failed'][] = $line; + echo 'Regex parse failed error in line ' . $line; + continue; + } + $m = $matches[0]; + if ('' == $m['url']) { + $faults['error: parse url'][] = $line; + echo 'Url parse error in line ' . $line; + continue; + } + if ('' == $m['continent']) { + $faults['error: parse continent'][] = $line; + echo 'Continent parse error in line ' . $line; + continue; + } else { + $mirr_continent = $m['continent']; + } + if (false === strpos($m['url'], $common_patern)) { + $faults['error: url distrib missing'][] = $line; + echo "Url no $common_patern error in line $line"; + continue; } $pu = parse_url($m['url']); if (in_array($pu['scheme'], array('http', 'https', 'ftp'))) { $item = array( - 'zone' => isset($m['zone']) ? $m['zone'] : '?', - 'country' => isset($m['country']) ? $m['country'] : '?', - 'city' => isset($m['city']) ? $m['city'] : '-', + 'zone' => ('' != $m['zone']) ? $m['zone'] : '?', + 'country' => ('' != $m['country']) ? $m['country'] : '?', + 'city' => ('' != $m['city']) ? trim($m['city']) : '-', // BEWARE of the path substitution here. Must match. - 'url' => str_replace('/distrib/7/i586', '', $m['url']) + 'url' => str_replace($common_patern, '', $m['url']) ); if ($refresh_country_and_city_arrays == true) { // prepare details for i18n - if (isset($m['city'])) { - if (isset($cities_i18n[$m['city']])) { - $mirror_cities[$m['city']] = $cities_i18n[$m['city']]; + if ('-' != $item['city']) { + if (isset($cities_i18n[$item['city']])) { + $mirror_cities[$item['city']] = $cities_i18n[$item['city']]; } else { - $mirror_cities[$m['city']] = '_r("' . $m['city'] . '") // new city (not yet in /en/downloads/get/lib.php)'; + $mirror_cities[$item['city']] = '_r("' . $item['city'] . '") // new city (not yet in /en/downloads/get/lib.php)'; } - } else if ($refresh_country_and_city_arrays == true) { - // store data in $faults array to easy find location manually with latitude and longitude if needed - $latitude = $m['latitude']; - $longitude = $m['longitude']; - $map_magnification = 5; - $map_data = "set latitude is $latitude and longitude $longitude"; - $map_data .= " (<a href=\"https://www.openstreetmap.org/search?query=" . $latitude; - $map_data .= "%20" . $longitude . "#map=" . $map_magnification . "/" . $latitude; - $map_data .= "/" . $longitude . "\" >OpenStreetMap</a>)"; - $faults[$map_data] = $line; + } else { + $faults['notice: no city given'][] = $line; } if (isset($countries[$item['country']])) { $mirror_countries[$item['country']] = $countries[$item['country']]; @@ -215,26 +237,27 @@ class Downloads } if ($documentation) { - $test_file = $item['url'].'/doc/mga7/date.txt'; + $test_file = $item['url'].'/doc/mga8/date.txt'; } else if ($mirrorlist) { - $test_file = $item['url'].'/distrib/7/x86_64/media/core/updates/repodata/repomd.xml'; + $test_file = $item['url'].'/distrib/9/x86_64/media/core/updates/repodata/repomd.xml'; // when changing, please change $common_patern too + $test_file = $item['url'].'/distrib/9/x86_64/media/core/release/meta-task-9-2.mga9.noarch.rpm'; // when changing, please change $common_patern too } else { - $test_file = $item['url'].'/iso/7.1/torrents/Mageia-7.1-x86_64.torrent'; + $test_file = $item['url'].'/iso/9/torrents/Mageia-9-Live-Xfce-i586.torrent'; } if (false === @file_get_contents($test_file)) { $num_dn++; - echo "Down ($num_dn) $test_file \n"; + echo "Down $num_dn (up: $num_up, about $mirrs_processed of _all_ mirrors tested) $test_file \n"; } else { $num_up++; - echo "Up ($num_up) $test_file \n"; -// $mirrors[$m['country']][] = $item; - $mirrors['_C:' . $m['continent']][] = $item; + echo "Up $num_up (down: $num_dn, about $mirrs_processed of _all_ mirrors tested) $test_file \n"; + $mirrors['_C:' . $mirr_continent][] = $item; } } } ksort($mirrors); foreach ($mirrors as &$continent) { - $continent = self::sort_2d_array_by_multiple_keys($continent, 'zone', 'country', 'city', 'url'); + $sorted_continent = self::sort_2d_array_by_multiple_keys($continent, 'zone', 'country', 'city', 'url'); + $continent = array_values($sorted_continent); } unset($continent); @@ -260,7 +283,7 @@ class Downloads var_export($mirror_cities); echo ";\nArray of countries for i18n: "; var_export($countries_u); - echo ";\nArray of faults: "; + echo ";\nArray of faults and warnings: "; var_export($faults); echo ";\n"; } @@ -285,7 +308,7 @@ class Downloads * * @return array */ - function get_mirror($country, $continent = null, $prod = true, $documentation = false, $mirrorlist = false) + function get_mirror($country, $continent = null, $prod = true, $documentation = false, $mirrorlist = false, $https_only = false) { $mirs = self::get_all_mirrors($prod, $documentation, $mirrorlist); $continent = '_C:' . $continent; @@ -297,67 +320,136 @@ class Downloads 'continent_minus_country' => array(), 'other_continents' => array() ); + $hostnames = array(); + $list_of_mirrs['country_alternate_protocol'] = array(); + $continent_https_only = array(); + $other_continents_https_only = array(); foreach ($mirs as $curr_continent => $continent_mirrors) { - if ($continent != $curr_continent) - { - if ($mirrorlist) + foreach ($continent_mirrors as $mirror) { + if ($continent != $curr_continent) { - foreach ($continent_mirrors as $mirror) { + if ($mirrorlist) + { $list_of_mirrs['other_continents'][] = $mirror['url']; } + elseif (true === $https_only) + { + $pu = parse_url($mirror['url']); + if ('https' == $pu['scheme']) + { + $other_continents_https_only[$curr_continent][] = $mirror; + } + } } - continue; - } - foreach ($continent_mirrors as $mirror) { - if (strpos($mirror['url'], 'distrib-coffee.ipsl.jussieu.fr') !== false) - { - // exclude source server to drop it's DL load - continue; - } - // keep assisting the french mirrors with german ones - if ($mirror['country'] == 'DE') - { - $fr_mirr_asist[] = $mirror; - } - // only add german mirrors when french are on turn - // sorting of mirror db cache must be kept to work properly (DE before FR) - if ($country == 'FR' && $mirror['country'] == 'FR' && count($fr_mirr_asist) > 0) - { - $mirrors[$continent] = $fr_mirr_asist; - $fr_mirr_asist = array(); - } - if ($mirrorlist) + else { - if ($mirror['country'] == $country) + if (strpos($mirror['url'], 'distrib-coffee.ipsl.jussieu.fr') !== false) { - $list_of_mirrs['country'][] = $mirror['url']; + // exclude source server to drop it's DL load + continue; + } + // keep assisting the french mirrors with german ones + if ($country == 'FR' && $mirror['country'] == 'DE') + { + $pu = parse_url($mirror['url']); + if ('https' == $pu['scheme']) { + $fr_mirr_asist[] = $mirror; + } + } + // only add german mirrors when french are on turn + // sorting of mirror db cache must be kept to work properly (DE before FR) + if ($country == 'FR' && $mirror['country'] == 'FR' && count($fr_mirr_asist) > 0) + { + $mirrors[$continent] = $fr_mirr_asist; + $fr_mirr_asist = array(); + } + if ($mirrorlist) + { + $pu = parse_url($mirror['url']); + if (in_array($pu['host'], $hostnames)) + { + $list_of_mirrs['country_alternate_protocol'][] = $mirror['url']; + } + else + { + $hostnames[] = $pu['host']; + if ($mirror['country'] == $country) + { + $list_of_mirrs['country'][] = $mirror['url']; + } + else + { + $list_of_mirrs['continent_minus_country'][] = $mirror['url']; + } + } } else { - $list_of_mirrs['continent_minus_country'][] = $mirror['url']; + if ($mirror['country'] == $country) + { + if (true === $https_only) + { + $pu = parse_url($mirror['url']); + if ('https' == $pu['scheme']) { + $mirrors[$continent][] = $mirror; + } + } + else + { + $mirrors[$continent][] = $mirror; + } + } + else + { + if (true === $https_only) + { + $pu = parse_url($mirror['url']); + if ('https' == $pu['scheme']) { + $continent_https_only[$curr_continent][] = $mirror; + } + } + } } } - else + } + } + if (count($mirrors) == 0) + { + if (true === $https_only) + { + if (count($continent_https_only) > 0) { - if ($mirror['country'] == $country) - { - $mirrors[$continent][] = $mirror; - } + $mirrors = $continent_https_only; + } + if (count($mirrors) == 0 && count($other_continents_https_only) > 0) + { + $mirrors = $other_continents_https_only; } } - if (count($mirrors) == 0) + else { // add all continent mirrors if country doesn't have any $mirrors[$continent] = $continent_mirrors; } } + // falback if selection fails if (count($mirrors) > 0) { $mirs = $mirrors; } - shuffle($mirs); - $mirr_continent = $mirs[0]; + // a workaround as shuffle() doesn't preserve assoc. keys + if (count($mirs) > 1) + { + $mirs_keys = array_keys($mirs); + shuffle($mirs_keys); + foreach($mirs_keys as $key) { + $shuffled[$key] = $mirs[$key]; + } + $mirs = $shuffled; + } + + $mirr_continent = array_keys($mirs)[0]; $mirs = array_shift($mirs); shuffle($mirs); $one_mirror = array_shift($mirs); @@ -371,6 +463,7 @@ class Downloads $resulting_mirrs = array_merge( $list_of_mirrs['country'], $list_of_mirrs['continent_minus_country'], + $list_of_mirrs['country_alternate_protocol'], $list_of_mirrs['other_continents'] ); $one_mirror['mirrors_list'] = array_slice($resulting_mirrs, 0, 10); @@ -379,9 +472,9 @@ class Downloads return $one_mirror; } - function prepare_download($force = false, $country = null, $prod = true, $documentation = false, $mirrorlist = false) + function prepare_download($force = false, $country = null, $prod = true, $documentation = false, $mirrorlist = false, $https_only = false) { - return $this->get_one_mirror($force, $country, $prod, $documentation, $mirrorlist); + return $this->get_one_mirror($force, $country, $prod, $documentation, $mirrorlist, $https_only); } /** @@ -397,7 +490,7 @@ class Downloads * * TODO extract as much as possible $_SESSION(read) and $_SERVER and $_GET */ - function get_one_mirror($force = false, $country = null, $prod = true, $documentation = false, $mirrorlist = false) + function get_one_mirror($force = false, $country = null, $prod = true, $documentation = false, $mirrorlist = false, $https_only = false) { $fuzzy_mirror = false; @@ -459,7 +552,7 @@ class Downloads $continent = null; } - $mirror = $this->get_mirror($country, $continent, $prod, $documentation, $mirrorlist); + $mirror = $this->get_mirror($country, $continent, $prod, $documentation, $mirrorlist, $https_only); $mirror['purl'] = parse_url($mirror['url']); // reassign country, as get_one_mirror() may have decided diff --git a/lib/cached.list.php b/lib/cached.list.php index 391de643e..6b1e93505 100644 --- a/lib/cached.list.php +++ b/lib/cached.list.php @@ -15,6 +15,13 @@ 'city' => 'Stellenbosch', 'url' => 'http://ftp.sun.ac.za/ftp/pub/mirrors/mageia', ), + 2 => + array ( + 'zone' => 'ZA', + 'country' => 'ZA', + 'city' => 'Stellenbosch', + 'url' => 'https://ftp.sun.ac.za/ftp/pub/mirrors/mageia', + ), ), '_C:AS' => array ( @@ -23,136 +30,150 @@ 'zone' => 'CN', 'country' => 'CN', 'city' => 'Beijing', - 'url' => 'http://mirrors.tuna.tsinghua.edu.cn/mageia', + 'url' => 'https://mirrors.tuna.tsinghua.edu.cn/mageia', ), 1 => array ( 'zone' => 'CN', 'country' => 'CN', - 'city' => 'Beijing', - 'url' => 'https://mirrors.tuna.tsinghua.edu.cn/mageia', + 'city' => 'Hefei', + 'url' => 'http://mirrors.ustc.edu.cn/mageia', ), 2 => array ( 'zone' => 'CN', 'country' => 'CN', - 'city' => 'Shanghai', - 'url' => 'http://ftp.sjtu.edu.cn/mageia', + 'city' => 'Hefei', + 'url' => 'https://mirrors.ustc.edu.cn/mageia', ), 3 => array ( 'zone' => 'CN', 'country' => 'CN', - 'city' => 'Shanghai', - 'url' => 'https://ftp.sjtu.edu.cn/mageia', + 'city' => 'Nanjing', + 'url' => 'http://mirrors.nju.edu.cn/mageia', ), 4 => array ( - 'zone' => 'IL', - 'country' => 'IL', - 'city' => '-', - 'url' => 'http://mirror.isoc.org.il/pub/mageia', + 'zone' => 'CN', + 'country' => 'CN', + 'city' => 'Nanjing', + 'url' => 'https://mirrors.nju.edu.cn/mageia', ), 5 => array ( + 'zone' => 'CN', + 'country' => 'CN', + 'city' => 'Shanghai', + 'url' => 'http://ftp.sjtu.edu.cn/mageia', + ), + 6 => + array ( + 'zone' => 'CN', + 'country' => 'CN', + 'city' => 'Shanghai', + 'url' => 'https://ftp.sjtu.edu.cn/mageia', + ), + 7 => + array ( 'zone' => 'JP', 'country' => 'JP', 'city' => 'Tsukuba', 'url' => 'http://ftp.tsukuba.wide.ad.jp/Linux/mageia', ), - 6 => + 8 => + array ( + 'zone' => 'JP', + 'country' => 'JP', + 'city' => 'Tsukuba', + 'url' => 'https://ftp.tsukuba.wide.ad.jp/Linux/mageia', + ), + 9 => array ( 'zone' => 'PH', 'country' => 'PH', 'city' => 'Cebu', 'url' => 'ftp://mirror.rise.ph/mageia', ), - 7 => + 10 => array ( 'zone' => 'PH', 'country' => 'PH', 'city' => 'Cebu', 'url' => 'http://mirror.rise.ph/mageia', ), - 8 => + 11 => array ( 'zone' => 'TR', 'country' => 'TR', 'city' => 'Ankara', 'url' => 'ftp://ftp.linux.org.tr/mageia', ), - 9 => + 12 => array ( 'zone' => 'TR', 'country' => 'TR', 'city' => 'Ankara', 'url' => 'http://ftp.linux.org.tr/mageia', ), - 10 => + 13 => array ( - 'zone' => 'TW', - 'country' => 'TW', - 'city' => 'Chungli', - 'url' => 'ftp://ftp.yzu.edu.tw/Linux/Mageia', + 'zone' => 'TR', + 'country' => 'TR', + 'city' => 'Ankara', + 'url' => 'https://ftp.linux.org.tr/mageia', ), - 11 => + 14 => array ( 'zone' => 'TW', 'country' => 'TW', 'city' => 'HsinChu', 'url' => 'ftp://free.nchc.org.tw/mageia', ), - 12 => + 15 => array ( 'zone' => 'TW', 'country' => 'TW', 'city' => 'HsinChu', 'url' => 'ftp://ftp.twaren.net/Linux/Mageia', ), - 13 => + 16 => array ( 'zone' => 'TW', 'country' => 'TW', 'city' => 'HsinChu', 'url' => 'http://free.nchc.org.tw/mageia', ), - 14 => - array ( - 'zone' => 'TW', - 'country' => 'TW', - 'city' => 'Taipei', - 'url' => 'ftp://ftp.tku.edu.tw/Linux/Mageia', - ), - 15 => + 17 => array ( 'zone' => 'TW', 'country' => 'TW', - 'city' => 'Taipei', - 'url' => 'http://ftp.tku.edu.tw/Linux/Mageia', + 'city' => 'HsinChu', + 'url' => 'https://free.nchc.org.tw/mageia', ), ), '_C:EU' => array ( 0 => array ( - 'zone' => 'BE', - 'country' => 'BE', - 'city' => 'Brussels', - 'url' => 'ftp://ftp.belnet.be/mirror/mageia', + 'zone' => 'BG', + 'country' => 'BG', + 'city' => 'Sofia', + 'url' => 'ftp://mirrors.netix.net/mageia', ), 1 => array ( 'zone' => 'BG', 'country' => 'BG', 'city' => 'Sofia', - 'url' => 'ftp://mirrors.netix.net/mageia', + 'url' => 'http://mirrors.netix.net/mageia', ), 2 => array ( 'zone' => 'BG', 'country' => 'BG', 'city' => 'Sofia', - 'url' => 'http://mirrors.netix.net/mageia', + 'url' => 'https://mirrors.netix.net/mageia', ), 3 => array ( @@ -170,10 +191,10 @@ ), 5 => array ( - 'zone' => 'CZ', - 'country' => 'CZ', - 'city' => '-', - 'url' => 'http://mageia.supp.name', + 'zone' => 'BY', + 'country' => 'BY', + 'city' => 'Minsk', + 'url' => 'https://mirror.datacenter.by/pub/mirrors/mageia.org', ), 6 => array ( @@ -191,335 +212,433 @@ ), 8 => array ( + 'zone' => 'CZ', + 'country' => 'CZ', + 'city' => 'Brno', + 'url' => 'https://ftp.fi.muni.cz/pub/linux/mageia', + ), + 9 => + array ( + 'zone' => 'DE', + 'country' => 'DE', + 'city' => 'Düsseldorf', + 'url' => 'ftp://mirror.tuxinator.org/mageia', + ), + 10 => + array ( 'zone' => 'DE', 'country' => 'DE', 'city' => 'Düsseldorf', 'url' => 'http://mirror.tuxinator.org/mageia', ), - 9 => + 11 => + array ( + 'zone' => 'DE', + 'country' => 'DE', + 'city' => 'Düsseldorf', + 'url' => 'https://mirror.tuxinator.org/mageia', + ), + 12 => array ( 'zone' => 'DE', 'country' => 'DE', 'city' => 'Erlangen', 'url' => 'ftp://ftp.fau.de/mageia', ), - 10 => + 13 => array ( 'zone' => 'DE', 'country' => 'DE', 'city' => 'Erlangen', 'url' => 'http://ftp.fau.de/mageia', ), - 11 => + 14 => array ( 'zone' => 'DE', 'country' => 'DE', 'city' => 'Erlangen', 'url' => 'https://ftp.fau.de/mageia', ), - 12 => + 15 => array ( 'zone' => 'DE', 'country' => 'DE', 'city' => 'Falkenstein/Vogtl.', 'url' => 'ftp://mirror2.tuxinator.org/mageia', ), - 13 => + 16 => array ( 'zone' => 'DE', 'country' => 'DE', 'city' => 'Falkenstein/Vogtl.', 'url' => 'http://mirror2.tuxinator.org/mageia', ), - 14 => + 17 => + array ( + 'zone' => 'DE', + 'country' => 'DE', + 'city' => 'Falkenstein/Vogtl.', + 'url' => 'https://mirror2.tuxinator.org/mageia', + ), + 18 => array ( 'zone' => 'DE', 'country' => 'DE', 'city' => 'Göttingen', 'url' => 'ftp://ftp5.gwdg.de/pub/linux/mageia', ), - 15 => + 19 => array ( 'zone' => 'DE', 'country' => 'DE', 'city' => 'Göttingen', 'url' => 'http://ftp5.gwdg.de/pub/linux/mageia', ), - 16 => + 20 => array ( 'zone' => 'DE', 'country' => 'DE', 'city' => 'Göttingen', 'url' => 'https://ftp5.gwdg.de/pub/linux/mageia', ), - 17 => + 21 => array ( 'zone' => 'DE', 'country' => 'DE', 'city' => 'Schneverdingen', 'url' => 'ftp://ftp-stud.hs-esslingen.de/pub/Mirrors/Mageia', ), - 18 => + 22 => array ( 'zone' => 'DE', 'country' => 'DE', 'city' => 'Schneverdingen', 'url' => 'http://ftp-stud.hs-esslingen.de/pub/Mirrors/Mageia', ), - 19 => + 23 => array ( 'zone' => 'DE', 'country' => 'DE', 'city' => 'Schneverdingen', 'url' => 'https://ftp-stud.hs-esslingen.de/pub/Mirrors/Mageia', ), - 20 => - array ( - 'zone' => 'DK', - 'country' => 'DK', - 'city' => 'DTU, Lyngby', - 'url' => 'ftp://ftp.klid.dk/mageia', - ), - 21 => + 24 => array ( 'zone' => 'DK', 'country' => 'DK', 'city' => 'DTU, Lyngby', 'url' => 'http://ftp.klid.dk/ftp/mageia', ), - 22 => + 25 => array ( 'zone' => 'FR', 'country' => 'FR', 'city' => 'Lyon', - 'url' => 'ftp://fr2.rpmfind.net/linux/mageia', + 'url' => 'http://fr2.rpmfind.net/linux/mageia', ), - 23 => + 26 => array ( 'zone' => 'FR', 'country' => 'FR', 'city' => 'Lyon', - 'url' => 'http://fr2.rpmfind.net/linux/mageia', + 'url' => 'https://fr2.rpmfind.net/linux/mageia', ), - 24 => + 27 => + array ( + 'zone' => 'FR', + 'country' => 'FR', + 'city' => 'Ons-en-Bray', + 'url' => 'ftp://geex.freeboxos.fr', + ), + 28 => + array ( + 'zone' => 'FR', + 'country' => 'FR', + 'city' => 'Ons-en-Bray', + 'url' => 'http://geex.freeboxos.fr', + ), + 29 => + array ( + 'zone' => 'FR', + 'country' => 'FR', + 'city' => 'Ons-en-Bray', + 'url' => 'https://geex.freeboxos.fr', + ), + 30 => array ( 'zone' => 'FR', 'country' => 'FR', 'city' => 'Paris', 'url' => 'ftp://distrib-coffee.ipsl.jussieu.fr/pub/linux/Mageia', ), - 25 => + 31 => array ( 'zone' => 'FR', 'country' => 'FR', 'city' => 'Paris', 'url' => 'ftp://ftp.free.fr/mirrors/mageia.org', ), - 26 => + 32 => + array ( + 'zone' => 'FR', + 'country' => 'FR', + 'city' => 'Paris', + 'url' => 'http://aglae.biomedicale.univ-paris5.fr', + ), + 33 => array ( 'zone' => 'FR', 'country' => 'FR', 'city' => 'Paris', 'url' => 'http://distrib-coffee.ipsl.jussieu.fr/pub/linux/Mageia', ), - 27 => + 34 => array ( 'zone' => 'FR', 'country' => 'FR', 'city' => 'Paris', 'url' => 'http://ftp.free.fr/mirrors/mageia.org', ), - 28 => + 35 => array ( 'zone' => 'FR', 'country' => 'FR', 'city' => 'Paris', - 'url' => 'http://magie.remi.lu', + 'url' => 'https://distrib-coffee.ipsl.jussieu.fr/pub/linux/Mageia', ), - 29 => + 36 => array ( 'zone' => 'GB', 'country' => 'GB', 'city' => 'Canterbury', 'url' => 'ftp://www.mirrorservice.org/sites/mageia.org/pub/mageia', ), - 30 => + 37 => array ( 'zone' => 'GB', 'country' => 'GB', 'city' => 'Canterbury', 'url' => 'http://www.mirrorservice.org/sites/mageia.org/pub/mageia', ), - 31 => + 38 => array ( - 'zone' => 'GR', - 'country' => 'GR', - 'city' => 'Heraklion', - 'url' => 'ftp://ftp.cc.uoc.gr/mirrors/linux/mageia', + 'zone' => 'GB', + 'country' => 'GB', + 'city' => 'Canterbury', + 'url' => 'https://www.mirrorservice.org/sites/mageia.org/pub/mageia', ), - 32 => + 39 => array ( 'zone' => 'GR', 'country' => 'GR', - 'city' => 'Heraklion', - 'url' => 'http://ftp.cc.uoc.gr/mirrors/linux/mageia', + 'city' => '-', + 'url' => 'http://ftp.cc.uoc.gr/pub/linux/mageia', ), - 33 => + 40 => array ( 'zone' => 'HU', 'country' => 'HU', 'city' => 'Miskolc', 'url' => 'http://quantum-mirror.hu/mirrors/pub/mageia', ), - 34 => + 41 => array ( 'zone' => 'HU', 'country' => 'HU', 'city' => 'Miskolc', 'url' => 'https://quantum-mirror.hu/mirrors/pub/mageia', ), - 35 => + 42 => + array ( + 'zone' => 'IT', + 'country' => 'IT', + 'city' => '-', + 'url' => 'http://mageia.mirror.garr.it/mirrors/mageia', + ), + 43 => + array ( + 'zone' => 'IT', + 'country' => 'IT', + 'city' => '-', + 'url' => 'https://mageia.mirror.garr.it/mageia', + ), + 44 => array ( 'zone' => 'IT', 'country' => 'IT', 'city' => 'Milan', 'url' => 'ftp://vodka.sublink.org/mageia', ), - 36 => + 45 => array ( 'zone' => 'IT', 'country' => 'IT', 'city' => 'Milan', 'url' => 'http://vodka.sublink.org/mageia', ), - 37 => + 46 => + array ( + 'zone' => 'MC', + 'country' => 'MC', + 'city' => 'Monaco', + 'url' => 'http://mirrors.qontinuum.space/mageia', + ), + 47 => array ( 'zone' => 'NL', 'country' => 'NL', 'city' => 'Amsterdam', 'url' => 'ftp://ftp.nluug.nl/pub/os/Linux/distr/mageia', ), - 38 => + 48 => array ( 'zone' => 'NL', 'country' => 'NL', 'city' => 'Amsterdam', 'url' => 'http://ftp.nluug.nl/pub/os/Linux/distr/mageia', ), - 39 => + 49 => array ( 'zone' => 'NL', 'country' => 'NL', 'city' => 'Amsterdam', - 'url' => 'http://mageia.mirror.triple-it.nl', + 'url' => 'https://ftp.nluug.nl/pub/os/Linux/distr/mageia', ), - 40 => + 50 => + array ( + 'zone' => 'NL', + 'country' => 'NL', + 'city' => 'Enschede', + 'url' => 'ftp://ftp.snt.utwente.nl/pub/os/linux/mageia', + ), + 51 => array ( 'zone' => 'NL', 'country' => 'NL', 'city' => 'Enschede', 'url' => 'http://ftp.snt.utwente.nl/pub/os/linux/mageia', ), - 41 => + 52 => + array ( + 'zone' => 'NL', + 'country' => 'NL', + 'city' => 'Enschede', + 'url' => 'https://ftp.snt.utwente.nl/pub/os/linux/mageia', + ), + 53 => array ( 'zone' => 'PL', 'country' => 'PL', - 'city' => 'Warszawa', + 'city' => 'Szczecin', 'url' => 'ftp://ftp.icm.edu.pl/pub/Linux/sunsite/distributions/mageia', ), - 42 => + 54 => array ( 'zone' => 'PL', 'country' => 'PL', - 'city' => 'Warszawa', + 'city' => 'Szczecin', 'url' => 'http://ftp.icm.edu.pl/pub/Linux/sunsite/distributions/mageia', ), - 43 => + 55 => + array ( + 'zone' => 'PL', + 'country' => 'PL', + 'city' => 'Szczecin', + 'url' => 'https://ftp.icm.edu.pl/pub/Linux/sunsite/distributions/mageia', + ), + 56 => array ( 'zone' => 'RU', 'country' => 'RU', 'city' => 'Краснодар', - 'url' => 'ftp://mirror.yandex.ru/mageia', + 'url' => 'http://mirror.yandex.ru/mageia', ), - 44 => + 57 => array ( 'zone' => 'RU', 'country' => 'RU', 'city' => 'Краснодар', - 'url' => 'http://mirror.yandex.ru/mageia', + 'url' => 'https://mirror.yandex.ru/mageia', ), - 45 => + 58 => array ( 'zone' => 'SE', 'country' => 'SE', 'city' => 'Umeå', 'url' => 'http://ftp.acc.umu.se/mirror/mageia', ), - 46 => + 59 => + array ( + 'zone' => 'SE', + 'country' => 'SE', + 'city' => 'Umeå', + 'url' => 'https://ftp.acc.umu.se/mirror/mageia', + ), + 60 => + array ( + 'zone' => 'UA', + 'country' => 'UA', + 'city' => 'Vinnytsia', + 'url' => 'ftp://mageia.ip-connect.info/mirror/mageia', + ), + 61 => array ( 'zone' => 'UA', 'country' => 'UA', 'city' => 'Vinnytsia', 'url' => 'ftp://mageia.ip-connect.vn.ua/mirror/mageia', ), - 47 => + 62 => + array ( + 'zone' => 'UA', + 'country' => 'UA', + 'city' => 'Vinnytsia', + 'url' => 'http://mageia.ip-connect.info', + ), + 63 => array ( 'zone' => 'UA', 'country' => 'UA', 'city' => 'Vinnytsia', 'url' => 'http://mageia.ip-connect.vn.ua', ), + 64 => + array ( + 'zone' => 'UA', + 'country' => 'UA', + 'city' => 'Vinnytsia', + 'url' => 'https://mageia.ip-connect.info', + ), ), '_C:NA' => array ( 0 => array ( - 'zone' => 'CA', - 'country' => 'CA', - 'city' => 'Beauharnois', - 'url' => 'https://mirror.softiternity.com/Mageia', - ), - 1 => - array ( 'zone' => 'US', 'country' => 'US', 'city' => '-', 'url' => 'http://mirrors.kernel.org/mageia', ), - 2 => - array ( - 'zone' => 'US', - 'country' => 'US', - 'city' => 'Durham', - 'url' => 'http://distro.ibiblio.org/pub/linux/distributions/mageia', - ), - 3 => + 1 => array ( 'zone' => 'US', 'country' => 'US', - 'city' => 'Lenoir, NC', - 'url' => 'http://mirror.dacentec.com/mageia', + 'city' => '-', + 'url' => 'https://mirrors.kernel.org/mageia', ), - 4 => + 2 => array ( 'zone' => 'US', 'country' => 'US', 'city' => 'Princeton', 'url' => 'http://mirror.math.princeton.edu/pub/mageia', ), - 5 => - array ( - 'zone' => 'US', - 'country' => 'US', - 'city' => 'Richmond, VA', - 'url' => 'ftp://mageia.jameswhitby.net/mageia', - ), - 6 => + 3 => array ( 'zone' => 'US', 'country' => 'US', - 'city' => 'Richmond, VA', - 'url' => 'http://mageia.jameswhitby.net', + 'city' => 'Princeton', + 'url' => 'https://mirror.math.princeton.edu/pub/mageia', ), ), '_C:OC' => @@ -531,36 +650,78 @@ 'city' => 'Brisbane', 'url' => 'http://mirror.aarnet.edu.au/pub/mageia', ), + 1 => + array ( + 'zone' => 'AU', + 'country' => 'AU', + 'city' => 'Brisbane', + 'url' => 'https://mirror.aarnet.edu.au/pub/mageia', + ), ), '_C:SA' => array ( 0 => array ( + 'zone' => 'AR', + 'country' => 'AR', + 'city' => 'Buenos Aires', + 'url' => 'http://mageia.zero.com.ar', + ), + 1 => + array ( + 'zone' => 'AR', + 'country' => 'AR', + 'city' => 'Buenos Aires', + 'url' => 'https://mageia.zero.com.ar', + ), + 2 => + array ( 'zone' => 'BR', 'country' => 'BR', 'city' => '-', 'url' => 'http://mageia.c3sl.ufpr.br', ), - 1 => + 3 => array ( 'zone' => 'BR', 'country' => 'BR', 'city' => 'Brasilia', - 'url' => 'ftp://mageia.fis.unb.br/linux/mageia', + 'url' => 'ftp://mageia.fis.unb.br/pub/linux/mageia', ), - 2 => + 4 => + array ( + 'zone' => 'BR', + 'country' => 'BR', + 'city' => 'Brasilia', + 'url' => 'http://mageia.fis.unb.br', + ), + 5 => + array ( + 'zone' => 'BR', + 'country' => 'BR', + 'city' => 'Brasilia', + 'url' => 'https://mageia.fis.unb.br', + ), + 6 => array ( 'zone' => 'EC', 'country' => 'EC', 'city' => 'Cuenca', 'url' => 'ftp://mirror.cedia.org.ec/mageia', ), - 3 => + 7 => array ( 'zone' => 'EC', 'country' => 'EC', 'city' => 'Cuenca', 'url' => 'http://mirror.cedia.org.ec/mageia', ), + 8 => + array ( + 'zone' => 'EC', + 'country' => 'EC', + 'city' => 'Cuenca', + 'url' => 'https://mirror.cedia.org.ec/mageia', + ), ), ); ?> diff --git a/lib/cached.list_doc.php b/lib/cached.list_doc.php index 65e2121f9..dae37db42 100644 --- a/lib/cached.list_doc.php +++ b/lib/cached.list_doc.php @@ -15,6 +15,13 @@ 'city' => 'Stellenbosch', 'url' => 'http://ftp.sun.ac.za/ftp/pub/mirrors/mageia', ), + 2 => + array ( + 'zone' => 'ZA', + 'country' => 'ZA', + 'city' => 'Stellenbosch', + 'url' => 'https://ftp.sun.ac.za/ftp/pub/mirrors/mageia', + ), ), '_C:AS' => array ( @@ -23,136 +30,150 @@ 'zone' => 'CN', 'country' => 'CN', 'city' => 'Beijing', - 'url' => 'http://mirrors.tuna.tsinghua.edu.cn/mageia', + 'url' => 'https://mirrors.tuna.tsinghua.edu.cn/mageia', ), 1 => array ( 'zone' => 'CN', 'country' => 'CN', - 'city' => 'Beijing', - 'url' => 'https://mirrors.tuna.tsinghua.edu.cn/mageia', + 'city' => 'Hefei', + 'url' => 'http://mirrors.ustc.edu.cn/mageia', ), 2 => array ( 'zone' => 'CN', 'country' => 'CN', + 'city' => 'Hefei', + 'url' => 'https://mirrors.ustc.edu.cn/mageia', + ), + 3 => + array ( + 'zone' => 'CN', + 'country' => 'CN', + 'city' => 'Nanjing', + 'url' => 'http://mirrors.nju.edu.cn/mageia', + ), + 4 => + array ( + 'zone' => 'CN', + 'country' => 'CN', + 'city' => 'Nanjing', + 'url' => 'https://mirrors.nju.edu.cn/mageia', + ), + 5 => + array ( + 'zone' => 'CN', + 'country' => 'CN', 'city' => 'Shanghai', 'url' => 'http://ftp.sjtu.edu.cn/mageia', ), - 3 => + 6 => array ( 'zone' => 'CN', 'country' => 'CN', 'city' => 'Shanghai', 'url' => 'https://ftp.sjtu.edu.cn/mageia', ), - 4 => + 7 => array ( 'zone' => 'JP', 'country' => 'JP', 'city' => 'Tsukuba', 'url' => 'http://ftp.tsukuba.wide.ad.jp/Linux/mageia', ), - 5 => + 8 => + array ( + 'zone' => 'JP', + 'country' => 'JP', + 'city' => 'Tsukuba', + 'url' => 'https://ftp.tsukuba.wide.ad.jp/Linux/mageia', + ), + 9 => array ( 'zone' => 'PH', 'country' => 'PH', 'city' => 'Cebu', 'url' => 'ftp://mirror.rise.ph/mageia', ), - 6 => + 10 => array ( 'zone' => 'PH', 'country' => 'PH', 'city' => 'Cebu', 'url' => 'http://mirror.rise.ph/mageia', ), - 7 => + 11 => array ( 'zone' => 'TR', 'country' => 'TR', 'city' => 'Ankara', 'url' => 'ftp://ftp.linux.org.tr/mageia', ), - 8 => + 12 => array ( 'zone' => 'TR', 'country' => 'TR', 'city' => 'Ankara', 'url' => 'http://ftp.linux.org.tr/mageia', ), - 9 => - array ( - 'zone' => 'TW', - 'country' => 'TW', - 'city' => 'Chungli', - 'url' => 'ftp://ftp.yzu.edu.tw/Linux/Mageia', - ), - 10 => + 13 => array ( - 'zone' => 'TW', - 'country' => 'TW', - 'city' => 'Chungli', - 'url' => 'http://ftp.yzu.edu.tw/Linux/Mageia', + 'zone' => 'TR', + 'country' => 'TR', + 'city' => 'Ankara', + 'url' => 'https://ftp.linux.org.tr/mageia', ), - 11 => + 14 => array ( 'zone' => 'TW', 'country' => 'TW', 'city' => 'HsinChu', 'url' => 'ftp://free.nchc.org.tw/mageia', ), - 12 => + 15 => array ( 'zone' => 'TW', 'country' => 'TW', 'city' => 'HsinChu', 'url' => 'ftp://ftp.twaren.net/Linux/Mageia', ), - 13 => + 16 => array ( 'zone' => 'TW', 'country' => 'TW', 'city' => 'HsinChu', 'url' => 'http://free.nchc.org.tw/mageia', ), - 14 => - array ( - 'zone' => 'TW', - 'country' => 'TW', - 'city' => 'Taipei', - 'url' => 'ftp://ftp.tku.edu.tw/Linux/Mageia', - ), - 15 => + 17 => array ( 'zone' => 'TW', 'country' => 'TW', - 'city' => 'Taipei', - 'url' => 'http://ftp.tku.edu.tw/Linux/Mageia', + 'city' => 'HsinChu', + 'url' => 'https://free.nchc.org.tw/mageia', ), ), '_C:EU' => array ( 0 => array ( - 'zone' => 'BE', - 'country' => 'BE', - 'city' => 'Brussels', - 'url' => 'ftp://ftp.belnet.be/mirror/mageia', + 'zone' => 'BG', + 'country' => 'BG', + 'city' => 'Sofia', + 'url' => 'ftp://mirrors.netix.net/mageia', ), 1 => array ( 'zone' => 'BG', 'country' => 'BG', 'city' => 'Sofia', - 'url' => 'ftp://mirrors.netix.net/mageia', + 'url' => 'http://mirrors.netix.net/mageia', ), 2 => array ( 'zone' => 'BG', 'country' => 'BG', 'city' => 'Sofia', - 'url' => 'http://mirrors.netix.net/mageia', + 'url' => 'https://mirrors.netix.net/mageia', ), 3 => array ( @@ -170,10 +191,10 @@ ), 5 => array ( - 'zone' => 'CZ', - 'country' => 'CZ', - 'city' => '-', - 'url' => 'http://mageia.supp.name', + 'zone' => 'BY', + 'country' => 'BY', + 'city' => 'Minsk', + 'url' => 'https://mirror.datacenter.by/pub/mirrors/mageia.org', ), 6 => array ( @@ -191,328 +212,433 @@ ), 8 => array ( + 'zone' => 'CZ', + 'country' => 'CZ', + 'city' => 'Brno', + 'url' => 'https://ftp.fi.muni.cz/pub/linux/mageia', + ), + 9 => + array ( + 'zone' => 'DE', + 'country' => 'DE', + 'city' => 'Düsseldorf', + 'url' => 'ftp://mirror.tuxinator.org/mageia', + ), + 10 => + array ( 'zone' => 'DE', 'country' => 'DE', 'city' => 'Düsseldorf', 'url' => 'http://mirror.tuxinator.org/mageia', ), - 9 => + 11 => + array ( + 'zone' => 'DE', + 'country' => 'DE', + 'city' => 'Düsseldorf', + 'url' => 'https://mirror.tuxinator.org/mageia', + ), + 12 => array ( 'zone' => 'DE', 'country' => 'DE', 'city' => 'Erlangen', 'url' => 'ftp://ftp.fau.de/mageia', ), - 10 => + 13 => array ( 'zone' => 'DE', 'country' => 'DE', 'city' => 'Erlangen', 'url' => 'http://ftp.fau.de/mageia', ), - 11 => + 14 => array ( 'zone' => 'DE', 'country' => 'DE', 'city' => 'Erlangen', 'url' => 'https://ftp.fau.de/mageia', ), - 12 => + 15 => array ( 'zone' => 'DE', 'country' => 'DE', 'city' => 'Falkenstein/Vogtl.', 'url' => 'ftp://mirror2.tuxinator.org/mageia', ), - 13 => + 16 => array ( 'zone' => 'DE', 'country' => 'DE', 'city' => 'Falkenstein/Vogtl.', 'url' => 'http://mirror2.tuxinator.org/mageia', ), - 14 => + 17 => + array ( + 'zone' => 'DE', + 'country' => 'DE', + 'city' => 'Falkenstein/Vogtl.', + 'url' => 'https://mirror2.tuxinator.org/mageia', + ), + 18 => array ( 'zone' => 'DE', 'country' => 'DE', 'city' => 'Göttingen', 'url' => 'ftp://ftp5.gwdg.de/pub/linux/mageia', ), - 15 => + 19 => array ( 'zone' => 'DE', 'country' => 'DE', 'city' => 'Göttingen', 'url' => 'http://ftp5.gwdg.de/pub/linux/mageia', ), - 16 => + 20 => array ( 'zone' => 'DE', 'country' => 'DE', 'city' => 'Göttingen', 'url' => 'https://ftp5.gwdg.de/pub/linux/mageia', ), - 17 => + 21 => array ( 'zone' => 'DE', 'country' => 'DE', 'city' => 'Schneverdingen', 'url' => 'ftp://ftp-stud.hs-esslingen.de/pub/Mirrors/Mageia', ), - 18 => + 22 => array ( 'zone' => 'DE', 'country' => 'DE', 'city' => 'Schneverdingen', 'url' => 'http://ftp-stud.hs-esslingen.de/pub/Mirrors/Mageia', ), - 19 => + 23 => array ( 'zone' => 'DE', 'country' => 'DE', 'city' => 'Schneverdingen', 'url' => 'https://ftp-stud.hs-esslingen.de/pub/Mirrors/Mageia', ), - 20 => - array ( - 'zone' => 'DK', - 'country' => 'DK', - 'city' => 'DTU, Lyngby', - 'url' => 'ftp://ftp.klid.dk/mageia', - ), - 21 => + 24 => array ( 'zone' => 'DK', 'country' => 'DK', 'city' => 'DTU, Lyngby', 'url' => 'http://ftp.klid.dk/ftp/mageia', ), - 22 => + 25 => array ( 'zone' => 'FR', 'country' => 'FR', 'city' => 'Lyon', - 'url' => 'ftp://fr2.rpmfind.net/linux/mageia', + 'url' => 'http://fr2.rpmfind.net/linux/mageia', ), - 23 => + 26 => array ( 'zone' => 'FR', 'country' => 'FR', 'city' => 'Lyon', - 'url' => 'http://fr2.rpmfind.net/linux/mageia', + 'url' => 'https://fr2.rpmfind.net/linux/mageia', ), - 24 => + 27 => + array ( + 'zone' => 'FR', + 'country' => 'FR', + 'city' => 'Ons-en-Bray', + 'url' => 'ftp://geex.freeboxos.fr', + ), + 28 => + array ( + 'zone' => 'FR', + 'country' => 'FR', + 'city' => 'Ons-en-Bray', + 'url' => 'http://geex.freeboxos.fr', + ), + 29 => + array ( + 'zone' => 'FR', + 'country' => 'FR', + 'city' => 'Ons-en-Bray', + 'url' => 'https://geex.freeboxos.fr', + ), + 30 => array ( 'zone' => 'FR', 'country' => 'FR', 'city' => 'Paris', 'url' => 'ftp://distrib-coffee.ipsl.jussieu.fr/pub/linux/Mageia', ), - 25 => + 31 => array ( 'zone' => 'FR', 'country' => 'FR', 'city' => 'Paris', 'url' => 'ftp://ftp.free.fr/mirrors/mageia.org', ), - 26 => + 32 => + array ( + 'zone' => 'FR', + 'country' => 'FR', + 'city' => 'Paris', + 'url' => 'http://aglae.biomedicale.univ-paris5.fr', + ), + 33 => array ( 'zone' => 'FR', 'country' => 'FR', 'city' => 'Paris', 'url' => 'http://distrib-coffee.ipsl.jussieu.fr/pub/linux/Mageia', ), - 27 => + 34 => array ( 'zone' => 'FR', 'country' => 'FR', 'city' => 'Paris', 'url' => 'http://ftp.free.fr/mirrors/mageia.org', ), - 28 => + 35 => array ( 'zone' => 'FR', 'country' => 'FR', 'city' => 'Paris', - 'url' => 'http://magie.remi.lu', + 'url' => 'https://distrib-coffee.ipsl.jussieu.fr/pub/linux/Mageia', ), - 29 => + 36 => array ( 'zone' => 'GB', 'country' => 'GB', 'city' => 'Canterbury', 'url' => 'ftp://www.mirrorservice.org/sites/mageia.org/pub/mageia', ), - 30 => + 37 => array ( 'zone' => 'GB', 'country' => 'GB', 'city' => 'Canterbury', 'url' => 'http://www.mirrorservice.org/sites/mageia.org/pub/mageia', ), - 31 => + 38 => array ( - 'zone' => 'GR', - 'country' => 'GR', - 'city' => 'Heraklion', - 'url' => 'ftp://ftp.cc.uoc.gr/mirrors/linux/mageia', + 'zone' => 'GB', + 'country' => 'GB', + 'city' => 'Canterbury', + 'url' => 'https://www.mirrorservice.org/sites/mageia.org/pub/mageia', ), - 32 => + 39 => array ( 'zone' => 'GR', 'country' => 'GR', - 'city' => 'Heraklion', - 'url' => 'http://ftp.cc.uoc.gr/mirrors/linux/mageia', + 'city' => '-', + 'url' => 'http://ftp.cc.uoc.gr/pub/linux/mageia', ), - 33 => + 40 => array ( 'zone' => 'HU', 'country' => 'HU', 'city' => 'Miskolc', 'url' => 'http://quantum-mirror.hu/mirrors/pub/mageia', ), - 34 => + 41 => array ( 'zone' => 'HU', 'country' => 'HU', 'city' => 'Miskolc', 'url' => 'https://quantum-mirror.hu/mirrors/pub/mageia', ), - 35 => + 42 => + array ( + 'zone' => 'IT', + 'country' => 'IT', + 'city' => '-', + 'url' => 'http://mageia.mirror.garr.it/mirrors/mageia', + ), + 43 => + array ( + 'zone' => 'IT', + 'country' => 'IT', + 'city' => '-', + 'url' => 'https://mageia.mirror.garr.it/mageia', + ), + 44 => array ( 'zone' => 'IT', 'country' => 'IT', 'city' => 'Milan', 'url' => 'ftp://vodka.sublink.org/mageia', ), - 36 => + 45 => array ( 'zone' => 'IT', 'country' => 'IT', 'city' => 'Milan', 'url' => 'http://vodka.sublink.org/mageia', ), - 37 => + 46 => + array ( + 'zone' => 'MC', + 'country' => 'MC', + 'city' => 'Monaco', + 'url' => 'http://mirrors.qontinuum.space/mageia', + ), + 47 => array ( 'zone' => 'NL', 'country' => 'NL', 'city' => 'Amsterdam', 'url' => 'ftp://ftp.nluug.nl/pub/os/Linux/distr/mageia', ), - 38 => + 48 => array ( 'zone' => 'NL', 'country' => 'NL', 'city' => 'Amsterdam', 'url' => 'http://ftp.nluug.nl/pub/os/Linux/distr/mageia', ), - 39 => + 49 => array ( 'zone' => 'NL', 'country' => 'NL', 'city' => 'Amsterdam', - 'url' => 'http://mageia.mirror.triple-it.nl', + 'url' => 'https://ftp.nluug.nl/pub/os/Linux/distr/mageia', ), - 40 => + 50 => + array ( + 'zone' => 'NL', + 'country' => 'NL', + 'city' => 'Enschede', + 'url' => 'ftp://ftp.snt.utwente.nl/pub/os/linux/mageia', + ), + 51 => array ( 'zone' => 'NL', 'country' => 'NL', 'city' => 'Enschede', 'url' => 'http://ftp.snt.utwente.nl/pub/os/linux/mageia', ), - 41 => + 52 => + array ( + 'zone' => 'NL', + 'country' => 'NL', + 'city' => 'Enschede', + 'url' => 'https://ftp.snt.utwente.nl/pub/os/linux/mageia', + ), + 53 => array ( 'zone' => 'PL', 'country' => 'PL', - 'city' => 'Warszawa', + 'city' => 'Szczecin', 'url' => 'ftp://ftp.icm.edu.pl/pub/Linux/sunsite/distributions/mageia', ), - 42 => + 54 => array ( 'zone' => 'PL', 'country' => 'PL', - 'city' => 'Warszawa', + 'city' => 'Szczecin', 'url' => 'http://ftp.icm.edu.pl/pub/Linux/sunsite/distributions/mageia', ), - 43 => + 55 => + array ( + 'zone' => 'PL', + 'country' => 'PL', + 'city' => 'Szczecin', + 'url' => 'https://ftp.icm.edu.pl/pub/Linux/sunsite/distributions/mageia', + ), + 56 => array ( 'zone' => 'RU', 'country' => 'RU', 'city' => 'Краснодар', - 'url' => 'ftp://mirror.yandex.ru/mageia', + 'url' => 'http://mirror.yandex.ru/mageia', ), - 44 => + 57 => array ( 'zone' => 'RU', 'country' => 'RU', 'city' => 'Краснодар', - 'url' => 'http://mirror.yandex.ru/mageia', + 'url' => 'https://mirror.yandex.ru/mageia', ), - 45 => + 58 => array ( 'zone' => 'SE', 'country' => 'SE', 'city' => 'Umeå', 'url' => 'http://ftp.acc.umu.se/mirror/mageia', ), - 46 => + 59 => + array ( + 'zone' => 'SE', + 'country' => 'SE', + 'city' => 'Umeå', + 'url' => 'https://ftp.acc.umu.se/mirror/mageia', + ), + 60 => + array ( + 'zone' => 'UA', + 'country' => 'UA', + 'city' => 'Vinnytsia', + 'url' => 'ftp://mageia.ip-connect.info/mirror/mageia', + ), + 61 => array ( 'zone' => 'UA', 'country' => 'UA', 'city' => 'Vinnytsia', 'url' => 'ftp://mageia.ip-connect.vn.ua/mirror/mageia', ), - 47 => + 62 => + array ( + 'zone' => 'UA', + 'country' => 'UA', + 'city' => 'Vinnytsia', + 'url' => 'http://mageia.ip-connect.info', + ), + 63 => array ( 'zone' => 'UA', 'country' => 'UA', 'city' => 'Vinnytsia', 'url' => 'http://mageia.ip-connect.vn.ua', ), + 64 => + array ( + 'zone' => 'UA', + 'country' => 'UA', + 'city' => 'Vinnytsia', + 'url' => 'https://mageia.ip-connect.info', + ), ), '_C:NA' => array ( 0 => array ( - 'zone' => 'CA', - 'country' => 'CA', - 'city' => 'Beauharnois', - 'url' => 'https://mirror.softiternity.com/Mageia', - ), - 1 => - array ( 'zone' => 'US', 'country' => 'US', 'city' => '-', 'url' => 'http://mirrors.kernel.org/mageia', ), - 2 => + 1 => array ( 'zone' => 'US', 'country' => 'US', - 'city' => 'Lenoir, NC', - 'url' => 'http://mirror.dacentec.com/mageia', + 'city' => '-', + 'url' => 'https://mirrors.kernel.org/mageia', ), - 3 => + 2 => array ( 'zone' => 'US', 'country' => 'US', 'city' => 'Princeton', 'url' => 'http://mirror.math.princeton.edu/pub/mageia', ), - 4 => - array ( - 'zone' => 'US', - 'country' => 'US', - 'city' => 'Richmond, VA', - 'url' => 'ftp://mageia.jameswhitby.net/mageia', - ), - 5 => + 3 => array ( 'zone' => 'US', 'country' => 'US', - 'city' => 'Richmond, VA', - 'url' => 'http://mageia.jameswhitby.net', + 'city' => 'Princeton', + 'url' => 'https://mirror.math.princeton.edu/pub/mageia', ), ), '_C:OC' => @@ -531,43 +657,78 @@ 'city' => 'Brisbane', 'url' => 'http://mirror.aarnet.edu.au/pub/mageia', ), + 2 => + array ( + 'zone' => 'AU', + 'country' => 'AU', + 'city' => 'Brisbane', + 'url' => 'https://mirror.aarnet.edu.au/pub/mageia', + ), ), '_C:SA' => array ( 0 => array ( + 'zone' => 'AR', + 'country' => 'AR', + 'city' => 'Buenos Aires', + 'url' => 'http://mageia.zero.com.ar', + ), + 1 => + array ( + 'zone' => 'AR', + 'country' => 'AR', + 'city' => 'Buenos Aires', + 'url' => 'https://mageia.zero.com.ar', + ), + 2 => + array ( 'zone' => 'BR', 'country' => 'BR', 'city' => '-', 'url' => 'http://mageia.c3sl.ufpr.br', ), - 1 => + 3 => array ( 'zone' => 'BR', 'country' => 'BR', 'city' => 'Brasilia', - 'url' => 'ftp://mageia.fis.unb.br/linux/mageia', + 'url' => 'ftp://mageia.fis.unb.br/pub/linux/mageia', ), - 2 => + 4 => array ( 'zone' => 'BR', 'country' => 'BR', 'city' => 'Brasilia', 'url' => 'http://mageia.fis.unb.br', ), - 3 => + 5 => + array ( + 'zone' => 'BR', + 'country' => 'BR', + 'city' => 'Brasilia', + 'url' => 'https://mageia.fis.unb.br', + ), + 6 => array ( 'zone' => 'EC', 'country' => 'EC', 'city' => 'Cuenca', 'url' => 'ftp://mirror.cedia.org.ec/mageia', ), - 4 => + 7 => array ( 'zone' => 'EC', 'country' => 'EC', 'city' => 'Cuenca', 'url' => 'http://mirror.cedia.org.ec/mageia', ), + 8 => + array ( + 'zone' => 'EC', + 'country' => 'EC', + 'city' => 'Cuenca', + 'url' => 'https://mirror.cedia.org.ec/mageia', + ), ), ); ?> diff --git a/lib/cached.list_mirrorlist.php b/lib/cached.list_mirrorlist.php index de809760a..6022445c3 100644 --- a/lib/cached.list_mirrorlist.php +++ b/lib/cached.list_mirrorlist.php @@ -15,6 +15,13 @@ 'city' => 'Stellenbosch', 'url' => 'http://ftp.sun.ac.za/ftp/pub/mirrors/mageia', ), + 2 => + array ( + 'zone' => 'ZA', + 'country' => 'ZA', + 'city' => 'Stellenbosch', + 'url' => 'https://ftp.sun.ac.za/ftp/pub/mirrors/mageia', + ), ), '_C:AS' => array ( @@ -22,144 +29,144 @@ array ( 'zone' => 'CN', 'country' => 'CN', - 'city' => 'Beijing', - 'url' => 'http://mirrors.tuna.tsinghua.edu.cn/mageia', + 'city' => 'Hefei', + 'url' => 'http://mirrors.ustc.edu.cn/mageia', ), 1 => array ( 'zone' => 'CN', 'country' => 'CN', - 'city' => 'Beijing', - 'url' => 'https://mirrors.tuna.tsinghua.edu.cn/mageia', + 'city' => 'Hefei', + 'url' => 'https://mirrors.ustc.edu.cn/mageia', ), 2 => array ( 'zone' => 'CN', 'country' => 'CN', - 'city' => 'Shanghai', - 'url' => 'http://ftp.sjtu.edu.cn/mageia', + 'city' => 'Nanjing', + 'url' => 'http://mirrors.nju.edu.cn/mageia', ), 3 => array ( 'zone' => 'CN', 'country' => 'CN', - 'city' => 'Shanghai', - 'url' => 'https://ftp.sjtu.edu.cn/mageia', + 'city' => 'Nanjing', + 'url' => 'https://mirrors.nju.edu.cn/mageia', ), 4 => array ( - 'zone' => 'IL', - 'country' => 'IL', - 'city' => '-', - 'url' => 'http://mirror.isoc.org.il/pub/mageia', + 'zone' => 'CN', + 'country' => 'CN', + 'city' => 'Shanghai', + 'url' => 'http://ftp.sjtu.edu.cn/mageia', ), 5 => array ( + 'zone' => 'CN', + 'country' => 'CN', + 'city' => 'Shanghai', + 'url' => 'https://ftp.sjtu.edu.cn/mageia', + ), + 6 => + array ( 'zone' => 'JP', 'country' => 'JP', 'city' => 'Tsukuba', 'url' => 'http://ftp.tsukuba.wide.ad.jp/Linux/mageia', ), - 6 => + 7 => + array ( + 'zone' => 'JP', + 'country' => 'JP', + 'city' => 'Tsukuba', + 'url' => 'https://ftp.tsukuba.wide.ad.jp/Linux/mageia', + ), + 8 => array ( 'zone' => 'PH', 'country' => 'PH', 'city' => 'Cebu', 'url' => 'ftp://mirror.rise.ph/mageia', ), - 7 => + 9 => array ( 'zone' => 'PH', 'country' => 'PH', 'city' => 'Cebu', 'url' => 'http://mirror.rise.ph/mageia', ), - 8 => + 10 => array ( 'zone' => 'TR', 'country' => 'TR', 'city' => 'Ankara', 'url' => 'ftp://ftp.linux.org.tr/mageia', ), - 9 => + 11 => array ( 'zone' => 'TR', 'country' => 'TR', 'city' => 'Ankara', 'url' => 'http://ftp.linux.org.tr/mageia', ), - 10 => - array ( - 'zone' => 'TW', - 'country' => 'TW', - 'city' => 'Chungli', - 'url' => 'ftp://ftp.yzu.edu.tw/Linux/Mageia', - ), - 11 => - array ( - 'zone' => 'TW', - 'country' => 'TW', - 'city' => 'Chungli', - 'url' => 'http://ftp.yzu.edu.tw/Linux/Mageia', - ), 12 => array ( - 'zone' => 'TW', - 'country' => 'TW', - 'city' => 'HsinChu', - 'url' => 'ftp://free.nchc.org.tw/mageia', + 'zone' => 'TR', + 'country' => 'TR', + 'city' => 'Ankara', + 'url' => 'https://ftp.linux.org.tr/mageia', ), 13 => array ( 'zone' => 'TW', 'country' => 'TW', 'city' => 'HsinChu', - 'url' => 'ftp://ftp.twaren.net/Linux/Mageia', + 'url' => 'ftp://free.nchc.org.tw/mageia', ), 14 => array ( 'zone' => 'TW', 'country' => 'TW', 'city' => 'HsinChu', - 'url' => 'http://free.nchc.org.tw/mageia', + 'url' => 'ftp://ftp.twaren.net/Linux/Mageia', ), 15 => array ( 'zone' => 'TW', 'country' => 'TW', - 'city' => 'Taipei', - 'url' => 'ftp://ftp.tku.edu.tw/Linux/Mageia', + 'city' => 'HsinChu', + 'url' => 'http://free.nchc.org.tw/mageia', ), 16 => array ( 'zone' => 'TW', 'country' => 'TW', - 'city' => 'Taipei', - 'url' => 'http://ftp.tku.edu.tw/Linux/Mageia', + 'city' => 'HsinChu', + 'url' => 'https://free.nchc.org.tw/mageia', ), ), '_C:EU' => array ( 0 => array ( - 'zone' => 'BE', - 'country' => 'BE', - 'city' => 'Brussels', - 'url' => 'ftp://ftp.belnet.be/mirror/mageia', + 'zone' => 'BG', + 'country' => 'BG', + 'city' => 'Sofia', + 'url' => 'ftp://mirrors.netix.net/mageia', ), 1 => array ( 'zone' => 'BG', 'country' => 'BG', 'city' => 'Sofia', - 'url' => 'ftp://mirrors.netix.net/mageia', + 'url' => 'http://mirrors.netix.net/mageia', ), 2 => array ( 'zone' => 'BG', 'country' => 'BG', 'city' => 'Sofia', - 'url' => 'http://mirrors.netix.net/mageia', + 'url' => 'https://mirrors.netix.net/mageia', ), 3 => array ( @@ -177,10 +184,10 @@ ), 5 => array ( - 'zone' => 'CZ', - 'country' => 'CZ', - 'city' => '-', - 'url' => 'http://mageia.supp.name', + 'zone' => 'BY', + 'country' => 'BY', + 'city' => 'Minsk', + 'url' => 'https://mirror.datacenter.by/pub/mirrors/mageia.org', ), 6 => array ( @@ -198,335 +205,433 @@ ), 8 => array ( + 'zone' => 'CZ', + 'country' => 'CZ', + 'city' => 'Brno', + 'url' => 'https://ftp.fi.muni.cz/pub/linux/mageia', + ), + 9 => + array ( + 'zone' => 'DE', + 'country' => 'DE', + 'city' => 'Düsseldorf', + 'url' => 'ftp://mirror.tuxinator.org/mageia', + ), + 10 => + array ( 'zone' => 'DE', 'country' => 'DE', 'city' => 'Düsseldorf', 'url' => 'http://mirror.tuxinator.org/mageia', ), - 9 => + 11 => + array ( + 'zone' => 'DE', + 'country' => 'DE', + 'city' => 'Düsseldorf', + 'url' => 'https://mirror.tuxinator.org/mageia', + ), + 12 => array ( 'zone' => 'DE', 'country' => 'DE', 'city' => 'Erlangen', 'url' => 'ftp://ftp.fau.de/mageia', ), - 10 => + 13 => array ( 'zone' => 'DE', 'country' => 'DE', 'city' => 'Erlangen', 'url' => 'http://ftp.fau.de/mageia', ), - 11 => + 14 => array ( 'zone' => 'DE', 'country' => 'DE', 'city' => 'Erlangen', 'url' => 'https://ftp.fau.de/mageia', ), - 12 => + 15 => array ( 'zone' => 'DE', 'country' => 'DE', 'city' => 'Falkenstein/Vogtl.', 'url' => 'ftp://mirror2.tuxinator.org/mageia', ), - 13 => + 16 => array ( 'zone' => 'DE', 'country' => 'DE', 'city' => 'Falkenstein/Vogtl.', 'url' => 'http://mirror2.tuxinator.org/mageia', ), - 14 => + 17 => + array ( + 'zone' => 'DE', + 'country' => 'DE', + 'city' => 'Falkenstein/Vogtl.', + 'url' => 'https://mirror2.tuxinator.org/mageia', + ), + 18 => array ( 'zone' => 'DE', 'country' => 'DE', 'city' => 'Göttingen', 'url' => 'ftp://ftp5.gwdg.de/pub/linux/mageia', ), - 15 => + 19 => array ( 'zone' => 'DE', 'country' => 'DE', 'city' => 'Göttingen', 'url' => 'http://ftp5.gwdg.de/pub/linux/mageia', ), - 16 => + 20 => array ( 'zone' => 'DE', 'country' => 'DE', 'city' => 'Göttingen', 'url' => 'https://ftp5.gwdg.de/pub/linux/mageia', ), - 17 => + 21 => array ( 'zone' => 'DE', 'country' => 'DE', 'city' => 'Schneverdingen', 'url' => 'ftp://ftp-stud.hs-esslingen.de/pub/Mirrors/Mageia', ), - 18 => + 22 => array ( 'zone' => 'DE', 'country' => 'DE', 'city' => 'Schneverdingen', 'url' => 'http://ftp-stud.hs-esslingen.de/pub/Mirrors/Mageia', ), - 19 => + 23 => array ( 'zone' => 'DE', 'country' => 'DE', 'city' => 'Schneverdingen', 'url' => 'https://ftp-stud.hs-esslingen.de/pub/Mirrors/Mageia', ), - 20 => - array ( - 'zone' => 'DK', - 'country' => 'DK', - 'city' => 'DTU, Lyngby', - 'url' => 'ftp://ftp.klid.dk/mageia', - ), - 21 => + 24 => array ( 'zone' => 'DK', 'country' => 'DK', 'city' => 'DTU, Lyngby', 'url' => 'http://ftp.klid.dk/ftp/mageia', ), - 22 => + 25 => array ( 'zone' => 'FR', 'country' => 'FR', 'city' => 'Lyon', - 'url' => 'ftp://fr2.rpmfind.net/linux/mageia', + 'url' => 'http://fr2.rpmfind.net/linux/mageia', ), - 23 => + 26 => array ( 'zone' => 'FR', 'country' => 'FR', 'city' => 'Lyon', - 'url' => 'http://fr2.rpmfind.net/linux/mageia', + 'url' => 'https://fr2.rpmfind.net/linux/mageia', ), - 24 => + 27 => + array ( + 'zone' => 'FR', + 'country' => 'FR', + 'city' => 'Ons-en-Bray', + 'url' => 'ftp://geex.freeboxos.fr', + ), + 28 => + array ( + 'zone' => 'FR', + 'country' => 'FR', + 'city' => 'Ons-en-Bray', + 'url' => 'http://geex.freeboxos.fr', + ), + 29 => + array ( + 'zone' => 'FR', + 'country' => 'FR', + 'city' => 'Ons-en-Bray', + 'url' => 'https://geex.freeboxos.fr', + ), + 30 => array ( 'zone' => 'FR', 'country' => 'FR', 'city' => 'Paris', 'url' => 'ftp://distrib-coffee.ipsl.jussieu.fr/pub/linux/Mageia', ), - 25 => + 31 => array ( 'zone' => 'FR', 'country' => 'FR', 'city' => 'Paris', 'url' => 'ftp://ftp.free.fr/mirrors/mageia.org', ), - 26 => + 32 => + array ( + 'zone' => 'FR', + 'country' => 'FR', + 'city' => 'Paris', + 'url' => 'http://aglae.biomedicale.univ-paris5.fr', + ), + 33 => array ( 'zone' => 'FR', 'country' => 'FR', 'city' => 'Paris', 'url' => 'http://distrib-coffee.ipsl.jussieu.fr/pub/linux/Mageia', ), - 27 => + 34 => array ( 'zone' => 'FR', 'country' => 'FR', 'city' => 'Paris', 'url' => 'http://ftp.free.fr/mirrors/mageia.org', ), - 28 => + 35 => array ( 'zone' => 'FR', 'country' => 'FR', 'city' => 'Paris', - 'url' => 'http://magie.remi.lu', + 'url' => 'https://distrib-coffee.ipsl.jussieu.fr/pub/linux/Mageia', ), - 29 => + 36 => array ( 'zone' => 'GB', 'country' => 'GB', 'city' => 'Canterbury', 'url' => 'ftp://www.mirrorservice.org/sites/mageia.org/pub/mageia', ), - 30 => + 37 => array ( 'zone' => 'GB', 'country' => 'GB', 'city' => 'Canterbury', 'url' => 'http://www.mirrorservice.org/sites/mageia.org/pub/mageia', ), - 31 => + 38 => array ( - 'zone' => 'GR', - 'country' => 'GR', - 'city' => 'Heraklion', - 'url' => 'ftp://ftp.cc.uoc.gr/mirrors/linux/mageia', + 'zone' => 'GB', + 'country' => 'GB', + 'city' => 'Canterbury', + 'url' => 'https://www.mirrorservice.org/sites/mageia.org/pub/mageia', ), - 32 => + 39 => array ( 'zone' => 'GR', 'country' => 'GR', - 'city' => 'Heraklion', - 'url' => 'http://ftp.cc.uoc.gr/mirrors/linux/mageia', + 'city' => '-', + 'url' => 'http://ftp.cc.uoc.gr/pub/linux/mageia', ), - 33 => + 40 => array ( 'zone' => 'HU', 'country' => 'HU', 'city' => 'Miskolc', 'url' => 'http://quantum-mirror.hu/mirrors/pub/mageia', ), - 34 => + 41 => array ( 'zone' => 'HU', 'country' => 'HU', 'city' => 'Miskolc', 'url' => 'https://quantum-mirror.hu/mirrors/pub/mageia', ), - 35 => + 42 => + array ( + 'zone' => 'IT', + 'country' => 'IT', + 'city' => '-', + 'url' => 'http://mageia.mirror.garr.it/mirrors/mageia', + ), + 43 => + array ( + 'zone' => 'IT', + 'country' => 'IT', + 'city' => '-', + 'url' => 'https://mageia.mirror.garr.it/mageia', + ), + 44 => array ( 'zone' => 'IT', 'country' => 'IT', 'city' => 'Milan', 'url' => 'ftp://vodka.sublink.org/mageia', ), - 36 => + 45 => array ( 'zone' => 'IT', 'country' => 'IT', 'city' => 'Milan', 'url' => 'http://vodka.sublink.org/mageia', ), - 37 => + 46 => + array ( + 'zone' => 'MC', + 'country' => 'MC', + 'city' => 'Monaco', + 'url' => 'http://mirrors.qontinuum.space/mageia', + ), + 47 => array ( 'zone' => 'NL', 'country' => 'NL', 'city' => 'Amsterdam', 'url' => 'ftp://ftp.nluug.nl/pub/os/Linux/distr/mageia', ), - 38 => + 48 => array ( 'zone' => 'NL', 'country' => 'NL', 'city' => 'Amsterdam', 'url' => 'http://ftp.nluug.nl/pub/os/Linux/distr/mageia', ), - 39 => + 49 => array ( 'zone' => 'NL', 'country' => 'NL', 'city' => 'Amsterdam', - 'url' => 'http://mageia.mirror.triple-it.nl', + 'url' => 'https://ftp.nluug.nl/pub/os/Linux/distr/mageia', ), - 40 => + 50 => + array ( + 'zone' => 'NL', + 'country' => 'NL', + 'city' => 'Enschede', + 'url' => 'ftp://ftp.snt.utwente.nl/pub/os/linux/mageia', + ), + 51 => array ( 'zone' => 'NL', 'country' => 'NL', 'city' => 'Enschede', 'url' => 'http://ftp.snt.utwente.nl/pub/os/linux/mageia', ), - 41 => + 52 => + array ( + 'zone' => 'NL', + 'country' => 'NL', + 'city' => 'Enschede', + 'url' => 'https://ftp.snt.utwente.nl/pub/os/linux/mageia', + ), + 53 => array ( 'zone' => 'PL', 'country' => 'PL', - 'city' => 'Warszawa', + 'city' => 'Szczecin', 'url' => 'ftp://ftp.icm.edu.pl/pub/Linux/sunsite/distributions/mageia', ), - 42 => + 54 => array ( 'zone' => 'PL', 'country' => 'PL', - 'city' => 'Warszawa', + 'city' => 'Szczecin', 'url' => 'http://ftp.icm.edu.pl/pub/Linux/sunsite/distributions/mageia', ), - 43 => + 55 => + array ( + 'zone' => 'PL', + 'country' => 'PL', + 'city' => 'Szczecin', + 'url' => 'https://ftp.icm.edu.pl/pub/Linux/sunsite/distributions/mageia', + ), + 56 => array ( 'zone' => 'RU', 'country' => 'RU', 'city' => 'Краснодар', - 'url' => 'ftp://mirror.yandex.ru/mageia', + 'url' => 'http://mirror.yandex.ru/mageia', ), - 44 => + 57 => array ( 'zone' => 'RU', 'country' => 'RU', 'city' => 'Краснодар', - 'url' => 'http://mirror.yandex.ru/mageia', + 'url' => 'https://mirror.yandex.ru/mageia', ), - 45 => + 58 => array ( 'zone' => 'SE', 'country' => 'SE', 'city' => 'Umeå', 'url' => 'http://ftp.acc.umu.se/mirror/mageia', ), - 46 => + 59 => + array ( + 'zone' => 'SE', + 'country' => 'SE', + 'city' => 'Umeå', + 'url' => 'https://ftp.acc.umu.se/mirror/mageia', + ), + 60 => + array ( + 'zone' => 'UA', + 'country' => 'UA', + 'city' => 'Vinnytsia', + 'url' => 'ftp://mageia.ip-connect.info/mirror/mageia', + ), + 61 => array ( 'zone' => 'UA', 'country' => 'UA', 'city' => 'Vinnytsia', 'url' => 'ftp://mageia.ip-connect.vn.ua/mirror/mageia', ), - 47 => + 62 => + array ( + 'zone' => 'UA', + 'country' => 'UA', + 'city' => 'Vinnytsia', + 'url' => 'http://mageia.ip-connect.info', + ), + 63 => array ( 'zone' => 'UA', 'country' => 'UA', 'city' => 'Vinnytsia', 'url' => 'http://mageia.ip-connect.vn.ua', ), + 64 => + array ( + 'zone' => 'UA', + 'country' => 'UA', + 'city' => 'Vinnytsia', + 'url' => 'https://mageia.ip-connect.info', + ), ), '_C:NA' => array ( 0 => array ( - 'zone' => 'CA', - 'country' => 'CA', - 'city' => 'Beauharnois', - 'url' => 'https://mirror.softiternity.com/Mageia', - ), - 1 => - array ( 'zone' => 'US', 'country' => 'US', 'city' => '-', 'url' => 'http://mirrors.kernel.org/mageia', ), - 2 => - array ( - 'zone' => 'US', - 'country' => 'US', - 'city' => 'Durham', - 'url' => 'http://distro.ibiblio.org/pub/linux/distributions/mageia', - ), - 3 => + 1 => array ( 'zone' => 'US', 'country' => 'US', - 'city' => 'Lenoir, NC', - 'url' => 'http://mirror.dacentec.com/mageia', + 'city' => '-', + 'url' => 'https://mirrors.kernel.org/mageia', ), - 4 => + 2 => array ( 'zone' => 'US', 'country' => 'US', 'city' => 'Princeton', 'url' => 'http://mirror.math.princeton.edu/pub/mageia', ), - 5 => - array ( - 'zone' => 'US', - 'country' => 'US', - 'city' => 'Richmond, VA', - 'url' => 'ftp://mageia.jameswhitby.net/mageia', - ), - 6 => + 3 => array ( 'zone' => 'US', 'country' => 'US', - 'city' => 'Richmond, VA', - 'url' => 'http://mageia.jameswhitby.net', + 'city' => 'Princeton', + 'url' => 'https://mirror.math.princeton.edu/pub/mageia', ), ), '_C:OC' => @@ -545,43 +650,78 @@ 'city' => 'Brisbane', 'url' => 'http://mirror.aarnet.edu.au/pub/mageia', ), + 2 => + array ( + 'zone' => 'AU', + 'country' => 'AU', + 'city' => 'Brisbane', + 'url' => 'https://mirror.aarnet.edu.au/pub/mageia', + ), ), '_C:SA' => array ( 0 => array ( + 'zone' => 'AR', + 'country' => 'AR', + 'city' => 'Buenos Aires', + 'url' => 'http://mageia.zero.com.ar', + ), + 1 => + array ( + 'zone' => 'AR', + 'country' => 'AR', + 'city' => 'Buenos Aires', + 'url' => 'https://mageia.zero.com.ar', + ), + 2 => + array ( 'zone' => 'BR', 'country' => 'BR', 'city' => '-', 'url' => 'http://mageia.c3sl.ufpr.br', ), - 1 => + 3 => array ( 'zone' => 'BR', 'country' => 'BR', 'city' => 'Brasilia', - 'url' => 'ftp://mageia.fis.unb.br/linux/mageia', + 'url' => 'ftp://mageia.fis.unb.br/pub/linux/mageia', ), - 2 => + 4 => array ( 'zone' => 'BR', 'country' => 'BR', 'city' => 'Brasilia', 'url' => 'http://mageia.fis.unb.br', ), - 3 => + 5 => + array ( + 'zone' => 'BR', + 'country' => 'BR', + 'city' => 'Brasilia', + 'url' => 'https://mageia.fis.unb.br', + ), + 6 => array ( 'zone' => 'EC', 'country' => 'EC', 'city' => 'Cuenca', 'url' => 'ftp://mirror.cedia.org.ec/mageia', ), - 4 => + 7 => array ( 'zone' => 'EC', 'country' => 'EC', 'city' => 'Cuenca', 'url' => 'http://mirror.cedia.org.ec/mageia', ), + 8 => + array ( + 'zone' => 'EC', + 'country' => 'EC', + 'city' => 'Cuenca', + 'url' => 'https://mirror.cedia.org.ec/mageia', + ), ), ); ?> diff --git a/lib/news.php b/lib/news.php index 47fc46ac4..457ae2b12 100644 --- a/lib/news.php +++ b/lib/news.php @@ -235,7 +235,7 @@ function prepare_fresh_blog_post_titles($eng_planet_url, $eng_blog_url, $loc_pla // prepare fresh enough English blog posts if there's no English planet posts if (0 == count($fresh_eng_posts)) { $eng_blog_posts = get_feed($eng_blog_url . '?type=rss10', $req_quantity); - if (count($eng_blog_posts) > 1) { + if (count($eng_blog_posts) >= 1) { $eng_posts_title = _r('Blog'); $first_source = 4; foreach ($eng_blog_posts as $blog_post) { diff --git a/lib/simplepie/LICENSE.txt b/lib/simplepie/LICENSE.txt index a822a4bd9..6503e83c1 100644 --- a/lib/simplepie/LICENSE.txt +++ b/lib/simplepie/LICENSE.txt @@ -1,4 +1,4 @@ -Copyright (c) 2004-2007, Ryan Parman and Geoffrey Sneddon. +Copyright (c) 2004-2007, Ryan Parman and Sam Sneddon. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are diff --git a/lib/simplepie/autoloader.php b/lib/simplepie/autoloader.php index fd7690da2..bf34a7003 100644 --- a/lib/simplepie/autoloader.php +++ b/lib/simplepie/autoloader.php @@ -5,7 +5,7 @@ * A PHP-Based RSS and Atom Feed Framework. * Takes the hard work out of managing a complete RSS/Atom solution. * - * Copyright (c) 2004-2016, Ryan Parman, Geoffrey Sneddon, Ryan McCue, and contributors + * Copyright (c) 2004-2016, Ryan Parman, Sam Sneddon, Ryan McCue, and contributors * All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, are @@ -33,9 +33,9 @@ * POSSIBILITY OF SUCH DAMAGE. * * @package SimplePie - * @copyright 2004-2016 Ryan Parman, Geoffrey Sneddon, Ryan McCue + * @copyright 2004-2016 Ryan Parman, Sam Sneddon, Ryan McCue * @author Ryan Parman - * @author Geoffrey Sneddon + * @author Sam Sneddon * @author Ryan McCue * @link http://simplepie.org/ SimplePie * @license http://www.opensource.org/licenses/bsd-license.php BSD License @@ -58,6 +58,8 @@ if (!class_exists('SimplePie')) */ class SimplePie_Autoloader { + protected $path; + /** * Constructor */ diff --git a/lib/simplepie/library/SimplePie.php b/lib/simplepie/library/SimplePie.php index 78e724525..2ae78c359 100755 --- a/lib/simplepie/library/SimplePie.php +++ b/lib/simplepie/library/SimplePie.php @@ -5,7 +5,7 @@ * A PHP-Based RSS and Atom Feed Framework. * Takes the hard work out of managing a complete RSS/Atom solution. * - * Copyright (c) 2004-2017, Ryan Parman, Geoffrey Sneddon, Ryan McCue, and contributors + * Copyright (c) 2004-2017, Ryan Parman, Sam Sneddon, Ryan McCue, and contributors * All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, are @@ -33,10 +33,10 @@ * POSSIBILITY OF SUCH DAMAGE. * * @package SimplePie - * @version 1.5.2 - * @copyright 2004-2017 Ryan Parman, Geoffrey Sneddon, Ryan McCue + * @version 1.6.0 + * @copyright 2004-2017 Ryan Parman, Sam Sneddon, Ryan McCue * @author Ryan Parman - * @author Geoffrey Sneddon + * @author Sam Sneddon * @author Ryan McCue * @link http://simplepie.org/ SimplePie * @license http://www.opensource.org/licenses/bsd-license.php BSD License @@ -50,7 +50,7 @@ define('SIMPLEPIE_NAME', 'SimplePie'); /** * SimplePie Version */ -define('SIMPLEPIE_VERSION', '1.5.2'); +define('SIMPLEPIE_VERSION', '1.6.0'); /** * SimplePie Build @@ -425,6 +425,13 @@ class SimplePie public $error; /** + * @var int HTTP status code + * @see SimplePie::status_code() + * @access private + */ + public $status_code; + + /** * @var object Instance of SimplePie_Sanitize (or other class) * @see SimplePie::set_sanitize_class() * @access private @@ -644,6 +651,13 @@ class SimplePie public $strip_htmltags = array('base', 'blink', 'body', 'doctype', 'embed', 'font', 'form', 'frame', 'frameset', 'html', 'iframe', 'input', 'marquee', 'meta', 'noscript', 'object', 'param', 'script', 'style'); /** + * @var array Stores the default attributes to be renamed by rename_attributes(). + * @see SimplePie::rename_attributes() + * @access private + */ + public $rename_attributes = array(); + + /** * @var bool Should we throw exceptions, or use the old-style error property? * @access private */ @@ -665,9 +679,9 @@ class SimplePie */ public function __construct() { - if (version_compare(PHP_VERSION, '5.3', '<')) + if (version_compare(PHP_VERSION, '5.6', '<')) { - trigger_error('Please upgrade to PHP 5.3 or newer.'); + trigger_error('Please upgrade to PHP 5.6 or newer.'); die(); } @@ -706,7 +720,7 @@ class SimplePie */ public function __destruct() { - if ((version_compare(PHP_VERSION, '5.3', '<') || !gc_enabled()) && !ini_get('zend.ze1_compatibility_mode')) + if (!gc_enabled()) { if (!empty($this->data['items'])) { @@ -909,6 +923,39 @@ class SimplePie } /** + * Return the filename (i.e. hash, without path and without extension) of the file to cache a given URL. + * @param string $url The URL of the feed to be cached. + * @return string A filename (i.e. hash, without path and without extension). + */ + public function get_cache_filename($url) + { + // Append custom parameters to the URL to avoid cache pollution in case of multiple calls with different parameters. + $url .= $this->force_feed ? '#force_feed' : ''; + $options = array(); + if ($this->timeout != 10) + { + $options[CURLOPT_TIMEOUT] = $this->timeout; + } + if ($this->useragent !== SIMPLEPIE_USERAGENT) + { + $options[CURLOPT_USERAGENT] = $this->useragent; + } + if (!empty($this->curl_options)) + { + foreach ($this->curl_options as $k => $v) + { + $options[$k] = $v; + } + } + if (!empty($options)) + { + ksort($options); + $url .= '#' . urlencode(var_export($options, true)); + } + return call_user_func($this->cache_name_function, $url); + } + + /** * Set whether feed items should be sorted into reverse chronological order * * @param bool $enable Sort as reverse chronological order. @@ -1146,6 +1193,7 @@ class SimplePie $this->strip_attributes(false); $this->add_attributes(false); $this->set_image_handler(false); + $this->set_https_domains(array()); } } @@ -1182,6 +1230,15 @@ class SimplePie $this->sanitize->encode_instead_of_strip($enable); } + public function rename_attributes($attribs = '') + { + if ($attribs === '') + { + $attribs = $this->rename_attributes; + } + $this->sanitize->rename_attributes($attribs); + } + public function strip_attributes($attribs = '') { if ($attribs === '') @@ -1249,10 +1306,23 @@ class SimplePie } /** + * Set the list of domains for which to force HTTPS. + * @see SimplePie_Sanitize::set_https_domains() + * @param array List of HTTPS domains. Example array('biz', 'example.com', 'example.org', 'www.example.net'). + */ + public function set_https_domains($domains = array()) + { + if (is_array($domains)) + { + $this->sanitize->set_https_domains($domains); + } + } + + /** * Set the handler to enable the display of cached images. * - * @param str $page Web-accessible path to the handler_image.php file. - * @param str $qs The query string that the value should be passed to. + * @param string $page Web-accessible path to the handler_image.php file. + * @param string $qs The query string that the value should be passed to. */ public function set_image_handler($page = false, $qs = 'i') { @@ -1373,7 +1443,8 @@ class SimplePie // Decide whether to enable caching if ($this->cache && $parsed_feed_url['scheme'] !== '') { - $cache = $this->registry->call('Cache', 'get_handler', array($this->cache_location, call_user_func($this->cache_name_function, $this->feed_url), 'spc')); + $filename = $this->get_cache_filename($this->feed_url); + $cache = $this->registry->call('Cache', 'get_handler', array($this->cache_location, $filename, 'spc')); } // Fetch the data via SimplePie_File into $this->raw_data @@ -1513,7 +1584,7 @@ class SimplePie * Fetch the data via SimplePie_File * * If the data is already cached, attempt to fetch it from there instead - * @param SimplePie_Cache|false $cache Cache handler, or false to not load from the cache + * @param SimplePie_Cache_Base|false $cache Cache handler, or false to not load from the cache * @return array|true Returns true if the data was loaded from the cache, or an array of HTTP headers and sniffed type */ protected function fetch_data(&$cache) @@ -1576,6 +1647,7 @@ class SimplePie } $file = $this->registry->create('File', array($this->feed_url, $this->timeout/10, 5, $headers, $this->useragent, $this->force_fsockopen, $this->curl_options)); + $this->status_code = $file->status_code; if ($file->success) { @@ -1630,6 +1702,8 @@ class SimplePie $file = $this->registry->create('File', array($this->feed_url, $this->timeout, 5, $headers, $this->useragent, $this->force_fsockopen, $this->curl_options)); } } + $this->status_code = $file->status_code; + // If the file connection has an error, set SimplePie::error to that and quit if (!$file->success && !($file->method & SIMPLEPIE_FILE_SOURCE_REMOTE === 0 || ($file->status_code === 200 || $file->status_code > 206 && $file->status_code < 300))) { @@ -1712,8 +1786,8 @@ class SimplePie } $cache = $this->registry->call('Cache', 'get_handler', array($this->cache_location, call_user_func($this->cache_name_function, $file->url), 'spc')); } - $this->feed_url = $file->url; } + $this->feed_url = $file->url; $locate = null; } @@ -1727,7 +1801,7 @@ class SimplePie } /** - * Get the error message for the occured error + * Get the error message for the occurred error * * @return string|array Error message, or array of messages for multifeeds */ @@ -1737,6 +1811,16 @@ class SimplePie } /** + * Get the last HTTP status code + * + * @return int Status code + */ + public function status_code() + { + return $this->status_code; + } + + /** * Get the raw XML * * This is the same as the old `$feed->enable_xml_dump(true)`, but returns @@ -1911,7 +1995,8 @@ class SimplePie * * When the 'permanent' mode is disabled (default), * may or may not be different from the URL passed to {@see set_feed_url()}, - * depending on whether auto-discovery was used. + * depending on whether auto-discovery was used, and whether there were + * any redirects along the way. * * @since Preview Release (previously called `get_feed_url()` since SimplePie 0.8.) * @todo Support <itunes:new-feed-url> @@ -2130,7 +2215,7 @@ class SimplePie */ public function get_base($element = array()) { - if (!($this->get_type() & SIMPLEPIE_TYPE_RSS_SYNDICATION) && !empty($element['xml_base_explicit']) && isset($element['xml_base'])) + if (!empty($element['xml_base_explicit']) && isset($element['xml_base'])) { return $element['xml_base']; } @@ -2578,13 +2663,19 @@ class SimplePie } } - if (isset($this->data['headers']['link']) && - preg_match('/<([^>]+)>; rel='.preg_quote($rel).'/', - $this->data['headers']['link'], $match)) + if (isset($this->data['headers']['link'])) { - return array($match[1]); + $link_headers = $this->data['headers']['link']; + if (is_string($link_headers)) { + $link_headers = array($link_headers); + } + $matches = preg_filter('/<([^>]+)>; rel='.preg_quote($rel).'/', '$1', $link_headers); + if (!empty($matches)) { + return $matches; + } } - else if (isset($this->data['links'][$rel])) + + if (isset($this->data['links'][$rel])) { return $this->data['links'][$rel]; } @@ -3241,3 +3332,5 @@ class SimplePie } } } + +class_alias('SimplePie', 'SimplePie\SimplePie', false); diff --git a/lib/simplepie/library/SimplePie/Author.php b/lib/simplepie/library/SimplePie/Author.php index 14794cf27..3baadee62 100644 --- a/lib/simplepie/library/SimplePie/Author.php +++ b/lib/simplepie/library/SimplePie/Author.php @@ -5,7 +5,7 @@ * A PHP-Based RSS and Atom Feed Framework. * Takes the hard work out of managing a complete RSS/Atom solution. * - * Copyright (c) 2004-2016, Ryan Parman, Geoffrey Sneddon, Ryan McCue, and contributors + * Copyright (c) 2004-2016, Ryan Parman, Sam Sneddon, Ryan McCue, and contributors * All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, are @@ -33,9 +33,9 @@ * POSSIBILITY OF SUCH DAMAGE. * * @package SimplePie - * @copyright 2004-2016 Ryan Parman, Geoffrey Sneddon, Ryan McCue + * @copyright 2004-2016 Ryan Parman, Sam Sneddon, Ryan McCue * @author Ryan Parman - * @author Geoffrey Sneddon + * @author Sam Sneddon * @author Ryan McCue * @link http://simplepie.org/ SimplePie * @license http://www.opensource.org/licenses/bsd-license.php BSD License @@ -147,3 +147,5 @@ class SimplePie_Author return null; } } + +class_alias('SimplePie_Author', 'SimplePie\Author', false); diff --git a/lib/simplepie/library/SimplePie/Cache.php b/lib/simplepie/library/SimplePie/Cache.php index d98cc6511..88d811660 100644 --- a/lib/simplepie/library/SimplePie/Cache.php +++ b/lib/simplepie/library/SimplePie/Cache.php @@ -5,7 +5,7 @@ * A PHP-Based RSS and Atom Feed Framework. * Takes the hard work out of managing a complete RSS/Atom solution. * - * Copyright (c) 2004-2016, Ryan Parman, Geoffrey Sneddon, Ryan McCue, and contributors + * Copyright (c) 2004-2016, Ryan Parman, Sam Sneddon, Ryan McCue, and contributors * All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, are @@ -33,9 +33,9 @@ * POSSIBILITY OF SUCH DAMAGE. * * @package SimplePie - * @copyright 2004-2016 Ryan Parman, Geoffrey Sneddon, Ryan McCue + * @copyright 2004-2016 Ryan Parman, Sam Sneddon, Ryan McCue * @author Ryan Parman - * @author Geoffrey Sneddon + * @author Sam Sneddon * @author Ryan McCue * @link http://simplepie.org/ SimplePie * @license http://www.opensource.org/licenses/bsd-license.php BSD License @@ -132,3 +132,5 @@ class SimplePie_Cache return $params; } } + +class_alias('SimplePie_Cache', 'SimplePie\Cache', false); diff --git a/lib/simplepie/library/SimplePie/Cache/Base.php b/lib/simplepie/library/SimplePie/Cache/Base.php index 333fb05cf..29eb0594b 100644 --- a/lib/simplepie/library/SimplePie/Cache/Base.php +++ b/lib/simplepie/library/SimplePie/Cache/Base.php @@ -5,7 +5,7 @@ * A PHP-Based RSS and Atom Feed Framework. * Takes the hard work out of managing a complete RSS/Atom solution. * - * Copyright (c) 2004-2016, Ryan Parman, Geoffrey Sneddon, Ryan McCue, and contributors + * Copyright (c) 2004-2016, Ryan Parman, Sam Sneddon, Ryan McCue, and contributors * All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, are @@ -33,9 +33,9 @@ * POSSIBILITY OF SUCH DAMAGE. * * @package SimplePie - * @copyright 2004-2016 Ryan Parman, Geoffrey Sneddon, Ryan McCue + * @copyright 2004-2016 Ryan Parman, Sam Sneddon, Ryan McCue * @author Ryan Parman - * @author Geoffrey Sneddon + * @author Sam Sneddon * @author Ryan McCue * @link http://simplepie.org/ SimplePie * @license http://www.opensource.org/licenses/bsd-license.php BSD License @@ -111,3 +111,5 @@ interface SimplePie_Cache_Base */ public function unlink(); } + +class_alias('SimplePie_Cache_Base', 'SimplePie\Cache\Base', false); diff --git a/lib/simplepie/library/SimplePie/Cache/DB.php b/lib/simplepie/library/SimplePie/Cache/DB.php index 7e8f77532..3dca8e5db 100644 --- a/lib/simplepie/library/SimplePie/Cache/DB.php +++ b/lib/simplepie/library/SimplePie/Cache/DB.php @@ -5,7 +5,7 @@ * A PHP-Based RSS and Atom Feed Framework. * Takes the hard work out of managing a complete RSS/Atom solution. * - * Copyright (c) 2004-2016, Ryan Parman, Geoffrey Sneddon, Ryan McCue, and contributors + * Copyright (c) 2004-2016, Ryan Parman, Sam Sneddon, Ryan McCue, and contributors * All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, are @@ -33,9 +33,9 @@ * POSSIBILITY OF SUCH DAMAGE. * * @package SimplePie - * @copyright 2004-2016 Ryan Parman, Geoffrey Sneddon, Ryan McCue + * @copyright 2004-2016 Ryan Parman, Sam Sneddon, Ryan McCue * @author Ryan Parman - * @author Geoffrey Sneddon + * @author Sam Sneddon * @author Ryan McCue * @link http://simplepie.org/ SimplePie * @license http://www.opensource.org/licenses/bsd-license.php BSD License @@ -134,3 +134,5 @@ abstract class SimplePie_Cache_DB implements SimplePie_Cache_Base return array(serialize($data->data), $items_by_id); } } + +class_alias('SimplePie_Cache_DB', 'SimplePie\Cache\DB', false); diff --git a/lib/simplepie/library/SimplePie/Cache/File.php b/lib/simplepie/library/SimplePie/Cache/File.php index 6ba6c5f6e..db30e7a0f 100644 --- a/lib/simplepie/library/SimplePie/Cache/File.php +++ b/lib/simplepie/library/SimplePie/Cache/File.php @@ -5,7 +5,7 @@ * A PHP-Based RSS and Atom Feed Framework. * Takes the hard work out of managing a complete RSS/Atom solution. * - * Copyright (c) 2004-2016, Ryan Parman, Geoffrey Sneddon, Ryan McCue, and contributors + * Copyright (c) 2004-2016, Ryan Parman, Sam Sneddon, Ryan McCue, and contributors * All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, are @@ -33,9 +33,9 @@ * POSSIBILITY OF SUCH DAMAGE. * * @package SimplePie - * @copyright 2004-2016 Ryan Parman, Geoffrey Sneddon, Ryan McCue + * @copyright 2004-2016 Ryan Parman, Sam Sneddon, Ryan McCue * @author Ryan Parman - * @author Geoffrey Sneddon + * @author Sam Sneddon * @author Ryan McCue * @link http://simplepie.org/ SimplePie * @license http://www.opensource.org/licenses/bsd-license.php BSD License @@ -101,7 +101,7 @@ class SimplePie_Cache_File implements SimplePie_Cache_Base */ public function save($data) { - if (file_exists($this->name) && is_writeable($this->name) || file_exists($this->location) && is_writeable($this->location)) + if (file_exists($this->name) && is_writable($this->name) || file_exists($this->location) && is_writable($this->location)) { if ($data instanceof SimplePie) { @@ -162,3 +162,5 @@ class SimplePie_Cache_File implements SimplePie_Cache_Base return false; } } + +class_alias('SimplePie_Cache_File', 'SimplePie\Cache\File', false); diff --git a/lib/simplepie/library/SimplePie/Cache/Memcache.php b/lib/simplepie/library/SimplePie/Cache/Memcache.php index 5190eef93..2cc37f907 100644 --- a/lib/simplepie/library/SimplePie/Cache/Memcache.php +++ b/lib/simplepie/library/SimplePie/Cache/Memcache.php @@ -5,7 +5,7 @@ * A PHP-Based RSS and Atom Feed Framework. * Takes the hard work out of managing a complete RSS/Atom solution. * - * Copyright (c) 2004-2016, Ryan Parman, Geoffrey Sneddon, Ryan McCue, and contributors + * Copyright (c) 2004-2016, Ryan Parman, Sam Sneddon, Ryan McCue, and contributors * All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, are @@ -33,9 +33,9 @@ * POSSIBILITY OF SUCH DAMAGE. * * @package SimplePie - * @copyright 2004-2016 Ryan Parman, Geoffrey Sneddon, Ryan McCue + * @copyright 2004-2016 Ryan Parman, Sam Sneddon, Ryan McCue * @author Ryan Parman - * @author Geoffrey Sneddon + * @author Sam Sneddon * @author Ryan McCue * @link http://simplepie.org/ SimplePie * @license http://www.opensource.org/licenses/bsd-license.php BSD License @@ -178,3 +178,5 @@ class SimplePie_Cache_Memcache implements SimplePie_Cache_Base return $this->cache->delete($this->name, 0); } } + +class_alias('SimplePie_Cache_Memcache', 'SimplePie\Cache\Memcache', false); diff --git a/lib/simplepie/library/SimplePie/Cache/Memcached.php b/lib/simplepie/library/SimplePie/Cache/Memcached.php index 1f73b3890..32a53eb7b 100755 --- a/lib/simplepie/library/SimplePie/Cache/Memcached.php +++ b/lib/simplepie/library/SimplePie/Cache/Memcached.php @@ -5,7 +5,7 @@ * A PHP-Based RSS and Atom Feed Framework. * Takes the hard work out of managing a complete RSS/Atom solution. * - * Copyright (c) 2004-2016, Ryan Parman, Geoffrey Sneddon, Ryan McCue, and contributors + * Copyright (c) 2004-2016, Ryan Parman, Sam Sneddon, Ryan McCue, and contributors * All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, are @@ -33,9 +33,9 @@ * POSSIBILITY OF SUCH DAMAGE. * * @package SimplePie - * @copyright 2004-2016 Ryan Parman, Geoffrey Sneddon, Ryan McCue + * @copyright 2004-2016 Ryan Parman, Sam Sneddon, Ryan McCue * @author Ryan Parman - * @author Geoffrey Sneddon + * @author Sam Sneddon * @author Ryan McCue * @link http://simplepie.org/ SimplePie * @license http://www.opensource.org/licenses/bsd-license.php BSD License @@ -164,3 +164,5 @@ class SimplePie_Cache_Memcached implements SimplePie_Cache_Base return false; } } + +class_alias('SimplePie_Cache_Memcached', 'SimplePie\Cache\Memcached', false); diff --git a/lib/simplepie/library/SimplePie/Cache/MySQL.php b/lib/simplepie/library/SimplePie/Cache/MySQL.php index 061ed043a..d21e2b6e4 100644 --- a/lib/simplepie/library/SimplePie/Cache/MySQL.php +++ b/lib/simplepie/library/SimplePie/Cache/MySQL.php @@ -5,7 +5,7 @@ * A PHP-Based RSS and Atom Feed Framework. * Takes the hard work out of managing a complete RSS/Atom solution. * - * Copyright (c) 2004-2016, Ryan Parman, Geoffrey Sneddon, Ryan McCue, and contributors + * Copyright (c) 2004-2016, Ryan Parman, Sam Sneddon, Ryan McCue, and contributors * All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, are @@ -33,9 +33,9 @@ * POSSIBILITY OF SUCH DAMAGE. * * @package SimplePie - * @copyright 2004-2016 Ryan Parman, Geoffrey Sneddon, Ryan McCue + * @copyright 2004-2016 Ryan Parman, Sam Sneddon, Ryan McCue * @author Ryan Parman - * @author Geoffrey Sneddon + * @author Sam Sneddon * @author Ryan McCue * @link http://simplepie.org/ SimplePie * @license http://www.opensource.org/licenses/bsd-license.php BSD License @@ -278,7 +278,7 @@ class SimplePie_Cache_MySQL extends SimplePie_Cache_DB $query->bindValue(':data', serialize($data)); $query->bindValue(':time', time()); $query->bindValue(':feed', $this->id); - if ($this->execute()) + if ($query->execute()) { return true; } @@ -438,3 +438,5 @@ class SimplePie_Cache_MySQL extends SimplePie_Cache_DB return $query->execute() && $query2->execute(); } } + +class_alias('SimplePie_Cache_MySQL', 'SimplePie\Cache\MySQL', false); diff --git a/lib/simplepie/library/SimplePie/Cache/Redis.php b/lib/simplepie/library/SimplePie/Cache/Redis.php index dbc88e829..82d759b01 100644 --- a/lib/simplepie/library/SimplePie/Cache/Redis.php +++ b/lib/simplepie/library/SimplePie/Cache/Redis.php @@ -152,7 +152,7 @@ class SimplePie_Cache_Redis implements SimplePie_Cache_Base { if ($data !== false) { $return = $this->cache->set($this->name, $data); if ($this->options['expire']) { - return $this->cache->expire($this->name, $this->ttl); + return $this->cache->expire($this->name, $this->options['expire']); } return $return; } @@ -170,3 +170,5 @@ class SimplePie_Cache_Redis implements SimplePie_Cache_Base { } } + +class_alias('SimplePie_Cache_Redis', 'SimplePie\Cache\Redis', false); diff --git a/lib/simplepie/library/SimplePie/Caption.php b/lib/simplepie/library/SimplePie/Caption.php index 854857603..355ab52f3 100644 --- a/lib/simplepie/library/SimplePie/Caption.php +++ b/lib/simplepie/library/SimplePie/Caption.php @@ -5,7 +5,7 @@ * A PHP-Based RSS and Atom Feed Framework. * Takes the hard work out of managing a complete RSS/Atom solution. * - * Copyright (c) 2004-2016, Ryan Parman, Geoffrey Sneddon, Ryan McCue, and contributors + * Copyright (c) 2004-2016, Ryan Parman, Sam Sneddon, Ryan McCue, and contributors * All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, are @@ -33,9 +33,9 @@ * POSSIBILITY OF SUCH DAMAGE. * * @package SimplePie - * @copyright 2004-2016 Ryan Parman, Geoffrey Sneddon, Ryan McCue + * @copyright 2004-2016 Ryan Parman, Sam Sneddon, Ryan McCue * @author Ryan Parman - * @author Geoffrey Sneddon + * @author Sam Sneddon * @author Ryan McCue * @link http://simplepie.org/ SimplePie * @license http://www.opensource.org/licenses/bsd-license.php BSD License @@ -196,3 +196,5 @@ class SimplePie_Caption return null; } } + +class_alias('SimplePie_Caption', 'SimplePie\Caption', false); diff --git a/lib/simplepie/library/SimplePie/Category.php b/lib/simplepie/library/SimplePie/Category.php index df0f13f9a..02cb76482 100644 --- a/lib/simplepie/library/SimplePie/Category.php +++ b/lib/simplepie/library/SimplePie/Category.php @@ -5,7 +5,7 @@ * A PHP-Based RSS and Atom Feed Framework. * Takes the hard work out of managing a complete RSS/Atom solution. * - * Copyright (c) 2004-2016, Ryan Parman, Geoffrey Sneddon, Ryan McCue, and contributors + * Copyright (c) 2004-2016, Ryan Parman, Sam Sneddon, Ryan McCue, and contributors * All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, are @@ -33,9 +33,9 @@ * POSSIBILITY OF SUCH DAMAGE. * * @package SimplePie - * @copyright 2004-2016 Ryan Parman, Geoffrey Sneddon, Ryan McCue + * @copyright 2004-2016 Ryan Parman, Sam Sneddon, Ryan McCue * @author Ryan Parman - * @author Geoffrey Sneddon + * @author Sam Sneddon * @author Ryan McCue * @link http://simplepie.org/ SimplePie * @license http://www.opensource.org/licenses/bsd-license.php BSD License @@ -79,7 +79,7 @@ class SimplePie_Category /** * Category type - * + * * category for <category> * subject for <dc:subject> * @@ -161,3 +161,4 @@ class SimplePie_Category } } +class_alias('SimplePie_Category', 'SimplePie\Category', false); diff --git a/lib/simplepie/library/SimplePie/Content/Type/Sniffer.php b/lib/simplepie/library/SimplePie/Content/Type/Sniffer.php index b86dfa33c..b3a8cf378 100644 --- a/lib/simplepie/library/SimplePie/Content/Type/Sniffer.php +++ b/lib/simplepie/library/SimplePie/Content/Type/Sniffer.php @@ -5,7 +5,7 @@ * A PHP-Based RSS and Atom Feed Framework. * Takes the hard work out of managing a complete RSS/Atom solution. * - * Copyright (c) 2004-2016, Ryan Parman, Geoffrey Sneddon, Ryan McCue, and contributors + * Copyright (c) 2004-2016, Ryan Parman, Sam Sneddon, Ryan McCue, and contributors * All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, are @@ -33,9 +33,9 @@ * POSSIBILITY OF SUCH DAMAGE. * * @package SimplePie - * @copyright 2004-2016 Ryan Parman, Geoffrey Sneddon, Ryan McCue + * @copyright 2004-2016 Ryan Parman, Sam Sneddon, Ryan McCue * @author Ryan Parman - * @author Geoffrey Sneddon + * @author Sam Sneddon * @author Ryan McCue * @link http://simplepie.org/ SimplePie * @license http://www.opensource.org/licenses/bsd-license.php BSD License @@ -150,7 +150,7 @@ class SimplePie_Content_Type_Sniffer } elseif (preg_match('/[\x00-\x08\x0E-\x1A\x1C-\x1F]/', $this->file->body)) { - return 'application/octect-stream'; + return 'application/octet-stream'; } return 'text/plain'; @@ -316,3 +316,5 @@ class SimplePie_Content_Type_Sniffer return 'text/html'; } } + +class_alias('SimplePie_Content_Type_Sniffer', 'SimplePie\Content\Type\Sniffer', false); diff --git a/lib/simplepie/library/SimplePie/Copyright.php b/lib/simplepie/library/SimplePie/Copyright.php index a57f323e6..e043ced8b 100644 --- a/lib/simplepie/library/SimplePie/Copyright.php +++ b/lib/simplepie/library/SimplePie/Copyright.php @@ -5,7 +5,7 @@ * A PHP-Based RSS and Atom Feed Framework. * Takes the hard work out of managing a complete RSS/Atom solution. * - * Copyright (c) 2004-2016, Ryan Parman, Geoffrey Sneddon, Ryan McCue, and contributors + * Copyright (c) 2004-2016, Ryan Parman, Sam Sneddon, Ryan McCue, and contributors * All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, are @@ -33,9 +33,9 @@ * POSSIBILITY OF SUCH DAMAGE. * * @package SimplePie - * @copyright 2004-2016 Ryan Parman, Geoffrey Sneddon, Ryan McCue + * @copyright 2004-2016 Ryan Parman, Sam Sneddon, Ryan McCue * @author Ryan Parman - * @author Geoffrey Sneddon + * @author Sam Sneddon * @author Ryan McCue * @link http://simplepie.org/ SimplePie * @license http://www.opensource.org/licenses/bsd-license.php BSD License @@ -122,3 +122,5 @@ class SimplePie_Copyright return null; } } + +class_alias('SimplePie_Copyright', 'SimplePie\Copyright', false); diff --git a/lib/simplepie/library/SimplePie/Core.php b/lib/simplepie/library/SimplePie/Core.php index c856ba361..ffcca46f5 100644 --- a/lib/simplepie/library/SimplePie/Core.php +++ b/lib/simplepie/library/SimplePie/Core.php @@ -5,7 +5,7 @@ * A PHP-Based RSS and Atom Feed Framework. * Takes the hard work out of managing a complete RSS/Atom solution. * - * Copyright (c) 2004-2016, Ryan Parman, Geoffrey Sneddon, Ryan McCue, and contributors + * Copyright (c) 2004-2016, Ryan Parman, Sam Sneddon, Ryan McCue, and contributors * All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, are @@ -33,9 +33,9 @@ * POSSIBILITY OF SUCH DAMAGE. * * @package SimplePie - * @copyright 2004-2016 Ryan Parman, Geoffrey Sneddon, Ryan McCue + * @copyright 2004-2016 Ryan Parman, Sam Sneddon, Ryan McCue * @author Ryan Parman - * @author Geoffrey Sneddon + * @author Sam Sneddon * @author Ryan McCue * @link http://simplepie.org/ SimplePie * @license http://www.opensource.org/licenses/bsd-license.php BSD License diff --git a/lib/simplepie/library/SimplePie/Credit.php b/lib/simplepie/library/SimplePie/Credit.php index 064a1b864..347902e02 100644 --- a/lib/simplepie/library/SimplePie/Credit.php +++ b/lib/simplepie/library/SimplePie/Credit.php @@ -5,7 +5,7 @@ * A PHP-Based RSS and Atom Feed Framework. * Takes the hard work out of managing a complete RSS/Atom solution. * - * Copyright (c) 2004-2016, Ryan Parman, Geoffrey Sneddon, Ryan McCue, and contributors + * Copyright (c) 2004-2016, Ryan Parman, Sam Sneddon, Ryan McCue, and contributors * All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, are @@ -33,9 +33,9 @@ * POSSIBILITY OF SUCH DAMAGE. * * @package SimplePie - * @copyright 2004-2016 Ryan Parman, Geoffrey Sneddon, Ryan McCue + * @copyright 2004-2016 Ryan Parman, Sam Sneddon, Ryan McCue * @author Ryan Parman - * @author Geoffrey Sneddon + * @author Sam Sneddon * @author Ryan McCue * @link http://simplepie.org/ SimplePie * @license http://www.opensource.org/licenses/bsd-license.php BSD License @@ -146,3 +146,5 @@ class SimplePie_Credit return null; } } + +class_alias('SimplePie_Credit', 'SimplePie\Credit', false); diff --git a/lib/simplepie/library/SimplePie/Decode/HTML/Entities.php b/lib/simplepie/library/SimplePie/Decode/HTML/Entities.php index 773481a8c..a43c374b3 100644 --- a/lib/simplepie/library/SimplePie/Decode/HTML/Entities.php +++ b/lib/simplepie/library/SimplePie/Decode/HTML/Entities.php @@ -5,7 +5,7 @@ * A PHP-Based RSS and Atom Feed Framework. * Takes the hard work out of managing a complete RSS/Atom solution. * - * Copyright (c) 2004-2016, Ryan Parman, Geoffrey Sneddon, Ryan McCue, and contributors + * Copyright (c) 2004-2016, Ryan Parman, Sam Sneddon, Ryan McCue, and contributors * All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, are @@ -33,9 +33,9 @@ * POSSIBILITY OF SUCH DAMAGE. * * @package SimplePie - * @copyright 2004-2016 Ryan Parman, Geoffrey Sneddon, Ryan McCue + * @copyright 2004-2016 Ryan Parman, Sam Sneddon, Ryan McCue * @author Ryan Parman - * @author Geoffrey Sneddon + * @author Sam Sneddon * @author Ryan McCue * @link http://simplepie.org/ SimplePie * @license http://www.opensource.org/licenses/bsd-license.php BSD License diff --git a/lib/simplepie/library/SimplePie/Enclosure.php b/lib/simplepie/library/SimplePie/Enclosure.php index ddbbc3c92..71cdd7d45 100644 --- a/lib/simplepie/library/SimplePie/Enclosure.php +++ b/lib/simplepie/library/SimplePie/Enclosure.php @@ -5,7 +5,7 @@ * A PHP-Based RSS and Atom Feed Framework. * Takes the hard work out of managing a complete RSS/Atom solution. * - * Copyright (c) 2004-2016, Ryan Parman, Geoffrey Sneddon, Ryan McCue, and contributors + * Copyright (c) 2004-2016, Ryan Parman, Sam Sneddon, Ryan McCue, and contributors * All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, are @@ -33,9 +33,9 @@ * POSSIBILITY OF SUCH DAMAGE. * * @package SimplePie - * @copyright 2004-2016 Ryan Parman, Geoffrey Sneddon, Ryan McCue + * @copyright 2004-2016 Ryan Parman, Sam Sneddon, Ryan McCue * @author Ryan Parman - * @author Geoffrey Sneddon + * @author Sam Sneddon * @author Ryan McCue * @link http://simplepie.org/ SimplePie * @license http://www.opensource.org/licenses/bsd-license.php BSD License @@ -1152,7 +1152,12 @@ class SimplePie_Enclosure // If we encounter an unsupported mime-type, check the file extension and guess intelligently. if (!in_array($type, array_merge($types_flash, $types_fmedia, $types_quicktime, $types_wmedia, $types_mp3))) { - switch (strtolower($this->get_extension())) + $extension = $this->get_extension(); + if ($extension === null) { + return null; + } + + switch (strtolower($extension)) { // Audio mime-types case 'aac': @@ -1302,3 +1307,5 @@ class SimplePie_Enclosure return $type; } } + +class_alias('SimplePie_Enclosure', 'SimplePie\Enclosure', false); diff --git a/lib/simplepie/library/SimplePie/Exception.php b/lib/simplepie/library/SimplePie/Exception.php index 53c015e77..715cefc72 100644 --- a/lib/simplepie/library/SimplePie/Exception.php +++ b/lib/simplepie/library/SimplePie/Exception.php @@ -5,7 +5,7 @@ * A PHP-Based RSS and Atom Feed Framework. * Takes the hard work out of managing a complete RSS/Atom solution. * - * Copyright (c) 2004-2016, Ryan Parman, Geoffrey Sneddon, Ryan McCue, and contributors + * Copyright (c) 2004-2016, Ryan Parman, Sam Sneddon, Ryan McCue, and contributors * All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, are @@ -33,9 +33,9 @@ * POSSIBILITY OF SUCH DAMAGE. * * @package SimplePie - * @copyright 2004-2016 Ryan Parman, Geoffrey Sneddon, Ryan McCue + * @copyright 2004-2016 Ryan Parman, Sam Sneddon, Ryan McCue * @author Ryan Parman - * @author Geoffrey Sneddon + * @author Sam Sneddon * @author Ryan McCue * @link http://simplepie.org/ SimplePie * @license http://www.opensource.org/licenses/bsd-license.php BSD License @@ -48,4 +48,6 @@ */ class SimplePie_Exception extends Exception { -}
\ No newline at end of file +} + +class_alias('SimplePie_Exception', 'SimplePie\Exception', false); diff --git a/lib/simplepie/library/SimplePie/File.php b/lib/simplepie/library/SimplePie/File.php index c73e0fbc9..7f894fb59 100644 --- a/lib/simplepie/library/SimplePie/File.php +++ b/lib/simplepie/library/SimplePie/File.php @@ -5,7 +5,7 @@ * A PHP-Based RSS and Atom Feed Framework. * Takes the hard work out of managing a complete RSS/Atom solution. * - * Copyright (c) 2004-2016, Ryan Parman, Geoffrey Sneddon, Ryan McCue, and contributors + * Copyright (c) 2004-2016, Ryan Parman, Sam Sneddon, Ryan McCue, and contributors * All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, are @@ -33,9 +33,9 @@ * POSSIBILITY OF SUCH DAMAGE. * * @package SimplePie - * @copyright 2004-2016 Ryan Parman, Geoffrey Sneddon, Ryan McCue + * @copyright 2004-2016 Ryan Parman, Sam Sneddon, Ryan McCue * @author Ryan Parman - * @author Geoffrey Sneddon + * @author Sam Sneddon * @author Ryan McCue * @link http://simplepie.org/ SimplePie * @license http://www.opensource.org/licenses/bsd-license.php BSD License @@ -106,14 +106,9 @@ class SimplePie_File curl_setopt($fp, CURLOPT_FAILONERROR, 1); curl_setopt($fp, CURLOPT_TIMEOUT, $timeout); curl_setopt($fp, CURLOPT_CONNECTTIMEOUT, $timeout); - curl_setopt($fp, CURLOPT_REFERER, $url); + curl_setopt($fp, CURLOPT_REFERER, SimplePie_Misc::url_remove_credentials($url)); curl_setopt($fp, CURLOPT_USERAGENT, $useragent); curl_setopt($fp, CURLOPT_HTTPHEADER, $headers2); - if (!ini_get('open_basedir') && !ini_get('safe_mode') && version_compare(SimplePie_Misc::get_curl_version(), '7.15.2', '>=')) - { - curl_setopt($fp, CURLOPT_FOLLOWLOCATION, 1); - curl_setopt($fp, CURLOPT_MAXREDIRS, $redirects); - } foreach ($curl_options as $curl_param => $curl_value) { curl_setopt($fp, $curl_param, $curl_value); } @@ -124,6 +119,7 @@ class SimplePie_File curl_setopt($fp, CURLOPT_ENCODING, 'none'); $this->headers = curl_exec($fp); } + $this->status_code = curl_getinfo($fp, CURLINFO_HTTP_CODE); if (curl_errno($fp)) { $this->error = 'cURL error ' . curl_errno($fp) . ': ' . curl_error($fp); @@ -148,7 +144,7 @@ class SimplePie_File $this->redirects++; $location = SimplePie_Misc::absolutize_url($this->headers['location'], $url); $previousStatusCode = $this->status_code; - $this->__construct($location, $timeout, $redirects, $headers, $useragent, $force_fsockopen); + $this->__construct($location, $timeout, $redirects, $headers, $useragent, $force_fsockopen, $curl_options); $this->permanent_url = ($previousStatusCode == 301) ? $location : $url; return; } @@ -233,7 +229,7 @@ class SimplePie_File $this->redirects++; $location = SimplePie_Misc::absolutize_url($this->headers['location'], $url); $previousStatusCode = $this->status_code; - $this->__construct($location, $timeout, $redirects, $headers, $useragent, $force_fsockopen); + $this->__construct($location, $timeout, $redirects, $headers, $useragent, $force_fsockopen, $curl_options); $this->permanent_url = ($previousStatusCode == 301) ? $location : $url; return; } @@ -303,3 +299,5 @@ class SimplePie_File } } } + +class_alias('SimplePie_File', 'SimplePie\File', false); diff --git a/lib/simplepie/library/SimplePie/HTTP/Parser.php b/lib/simplepie/library/SimplePie/HTTP/Parser.php index 7d6188dd1..b0f0f4a8b 100644 --- a/lib/simplepie/library/SimplePie/HTTP/Parser.php +++ b/lib/simplepie/library/SimplePie/HTTP/Parser.php @@ -5,7 +5,7 @@ * A PHP-Based RSS and Atom Feed Framework. * Takes the hard work out of managing a complete RSS/Atom solution. * - * Copyright (c) 2004-2016, Ryan Parman, Geoffrey Sneddon, Ryan McCue, and contributors + * Copyright (c) 2004-2016, Ryan Parman, Sam Sneddon, Ryan McCue, and contributors * All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, are @@ -33,9 +33,9 @@ * POSSIBILITY OF SUCH DAMAGE. * * @package SimplePie - * @copyright 2004-2016 Ryan Parman, Geoffrey Sneddon, Ryan McCue + * @copyright 2004-2016 Ryan Parman, Sam Sneddon, Ryan McCue * @author Ryan Parman - * @author Geoffrey Sneddon + * @author Sam Sneddon * @author Ryan McCue * @link http://simplepie.org/ SimplePie * @license http://www.opensource.org/licenses/bsd-license.php BSD License @@ -507,12 +507,16 @@ class SimplePie_HTTP_Parser { $data = explode("\r\n\r\n", $headers, $count); $data = array_pop($data); - if (false !== stripos($data, "HTTP/1.0 200 Connection established\r\n\r\n")) { - $data = str_ireplace("HTTP/1.0 200 Connection established\r\n\r\n", '', $data); + if (false !== stripos($data, "HTTP/1.0 200 Connection established\r\n")) { + $exploded = explode("\r\n\r\n", $data, 2); + $data = end($exploded); } - if (false !== stripos($data, "HTTP/1.1 200 Connection established\r\n\r\n")) { - $data = str_ireplace("HTTP/1.1 200 Connection established\r\n\r\n", '', $data); + if (false !== stripos($data, "HTTP/1.1 200 Connection established\r\n")) { + $exploded = explode("\r\n\r\n", $data, 2); + $data = end($exploded); } return $data; } } + +class_alias('SimplePie_HTTP_Parser', 'SimplePie\HTTP\Parser', false); diff --git a/lib/simplepie/library/SimplePie/IRI.php b/lib/simplepie/library/SimplePie/IRI.php index ffba232b1..6cd27ddba 100644 --- a/lib/simplepie/library/SimplePie/IRI.php +++ b/lib/simplepie/library/SimplePie/IRI.php @@ -5,7 +5,7 @@ * A PHP-Based RSS and Atom Feed Framework. * Takes the hard work out of managing a complete RSS/Atom solution. * - * Copyright (c) 2004-2016, Ryan Parman, Geoffrey Sneddon, Ryan McCue, and contributors + * Copyright (c) 2004-2016, Ryan Parman, Sam Sneddon, Ryan McCue, and contributors * All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, are @@ -33,9 +33,9 @@ * POSSIBILITY OF SUCH DAMAGE. * * @package SimplePie - * @copyright 2004-2016 Ryan Parman, Geoffrey Sneddon, Ryan McCue + * @copyright 2004-2016 Ryan Parman, Sam Sneddon, Ryan McCue * @author Ryan Parman - * @author Geoffrey Sneddon + * @author Sam Sneddon * @author Ryan McCue * @link http://simplepie.org/ SimplePie * @license http://www.opensource.org/licenses/bsd-license.php BSD License @@ -46,10 +46,10 @@ * * @package SimplePie * @subpackage HTTP - * @author Geoffrey Sneddon + * @author Sam Sneddon * @author Steve Minutillo * @author Ryan McCue - * @copyright 2007-2012 Geoffrey Sneddon, Steve Minutillo, Ryan McCue + * @copyright 2007-2012 Sam Sneddon, Steve Minutillo, Ryan McCue * @license http://www.opensource.org/licenses/bsd-license.php */ class SimplePie_IRI @@ -1234,3 +1234,5 @@ class SimplePie_IRI return $iauthority; } } + +class_alias('SimplePie_IRI', 'SimplePie\IRI', false); diff --git a/lib/simplepie/library/SimplePie/Item.php b/lib/simplepie/library/SimplePie/Item.php index 9b9c1f5db..02f158bfc 100644 --- a/lib/simplepie/library/SimplePie/Item.php +++ b/lib/simplepie/library/SimplePie/Item.php @@ -5,7 +5,7 @@ * A PHP-Based RSS and Atom Feed Framework. * Takes the hard work out of managing a complete RSS/Atom solution. * - * Copyright (c) 2004-2016, Ryan Parman, Geoffrey Sneddon, Ryan McCue, and contributors + * Copyright (c) 2004-2016, Ryan Parman, Sam Sneddon, Ryan McCue, and contributors * All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, are @@ -33,9 +33,9 @@ * POSSIBILITY OF SUCH DAMAGE. * * @package SimplePie - * @copyright 2004-2016 Ryan Parman, Geoffrey Sneddon, Ryan McCue + * @copyright 2004-2016 Ryan Parman, Sam Sneddon, Ryan McCue * @author Ryan Parman - * @author Geoffrey Sneddon + * @author Sam Sneddon * @author Ryan McCue * @link http://simplepie.org/ SimplePie * @license http://www.opensource.org/licenses/bsd-license.php BSD License @@ -121,7 +121,7 @@ class SimplePie_Item */ public function __destruct() { - if ((version_compare(PHP_VERSION, '5.3', '<') || !gc_enabled()) && !ini_get('zend.ze1_compatibility_mode')) + if (!gc_enabled()) { unset($this->feed); } @@ -958,7 +958,7 @@ class SimplePie_Item public function get_link($key = 0, $rel = 'alternate') { $links = $this->get_links($rel); - if ($links[$key] !== null) + if ($links && $links[$key] !== null) { return $links[$key]; } @@ -1803,7 +1803,7 @@ class SimplePie_Item } if (isset($content['attribs']['']['fileSize'])) { - $length = ceil($content['attribs']['']['fileSize']); + $length = intval($content['attribs']['']['fileSize']); } if (isset($content['attribs']['']['medium'])) { @@ -2425,7 +2425,7 @@ class SimplePie_Item } if (isset($content['attribs']['']['fileSize'])) { - $length = ceil($content['attribs']['']['fileSize']); + $length = intval($content['attribs']['']['fileSize']); } if (isset($content['attribs']['']['medium'])) { @@ -2790,7 +2790,7 @@ class SimplePie_Item } if (isset($link['attribs']['']['length'])) { - $length = ceil($link['attribs']['']['length']); + $length = intval($link['attribs']['']['length']); } if (isset($link['attribs']['']['title'])) { @@ -2833,7 +2833,7 @@ class SimplePie_Item } if (isset($link['attribs']['']['length'])) { - $length = ceil($link['attribs']['']['length']); + $length = intval($link['attribs']['']['length']); } // Since we don't have group or content for these, we'll just pass the '*_parent' variables directly to the constructor @@ -2862,13 +2862,14 @@ class SimplePie_Item $width = null; $url = $this->sanitize($enclosure[0]['attribs']['']['url'], SIMPLEPIE_CONSTRUCT_IRI, $this->get_base($enclosure[0])); + $url = $this->feed->sanitize->https_url($url); if (isset($enclosure[0]['attribs']['']['type'])) { $type = $this->sanitize($enclosure[0]['attribs']['']['type'], SIMPLEPIE_CONSTRUCT_TEXT); } if (isset($enclosure[0]['attribs']['']['length'])) { - $length = ceil($enclosure[0]['attribs']['']['length']); + $length = intval($enclosure[0]['attribs']['']['length']); } // Since we don't have group or content for these, we'll just pass the '*_parent' variables directly to the constructor @@ -2964,3 +2965,5 @@ class SimplePie_Item return null; } } + +class_alias('SimplePie_Item', 'SimplePie\Item', false); diff --git a/lib/simplepie/library/SimplePie/Locator.php b/lib/simplepie/library/SimplePie/Locator.php index 3876a2da6..12961dd3d 100644 --- a/lib/simplepie/library/SimplePie/Locator.php +++ b/lib/simplepie/library/SimplePie/Locator.php @@ -5,7 +5,7 @@ * A PHP-Based RSS and Atom Feed Framework. * Takes the hard work out of managing a complete RSS/Atom solution. * - * Copyright (c) 2004-2016, Ryan Parman, Geoffrey Sneddon, Ryan McCue, and contributors + * Copyright (c) 2004-2016, Ryan Parman, Sam Sneddon, Ryan McCue, and contributors * All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, are @@ -33,9 +33,9 @@ * POSSIBILITY OF SUCH DAMAGE. * * @package SimplePie - * @copyright 2004-2016 Ryan Parman, Geoffrey Sneddon, Ryan McCue + * @copyright 2004-2016 Ryan Parman, Sam Sneddon, Ryan McCue * @author Ryan Parman - * @author Geoffrey Sneddon + * @author Sam Sneddon * @author Ryan McCue * @link http://simplepie.org/ SimplePie * @license http://www.opensource.org/licenses/bsd-license.php BSD License @@ -64,6 +64,7 @@ class SimplePie_Locator var $max_checked_feeds = 10; var $force_fsockopen = false; var $curl_options = array(); + var $dom; protected $registry; public function __construct(SimplePie_File $file, $timeout = 10, $useragent = null, $max_checked_feeds = 10, $force_fsockopen = false, $curl_options = array()) @@ -75,12 +76,19 @@ class SimplePie_Locator $this->force_fsockopen = $force_fsockopen; $this->curl_options = $curl_options; - if (class_exists('DOMDocument')) + if (class_exists('DOMDocument') && $this->file->body != '') { $this->dom = new DOMDocument(); set_error_handler(array('SimplePie_Misc', 'silence_errors')); - $this->dom->loadHTML($this->file->body); + try + { + $this->dom->loadHTML($this->file->body); + } + catch (Throwable $ex) + { + $this->dom = null; + } restore_error_handler(); } else @@ -94,7 +102,7 @@ class SimplePie_Locator $this->registry = $registry; } - public function find($type = SIMPLEPIE_LOCATOR_ALL, &$working) + public function find($type = SIMPLEPIE_LOCATOR_ALL, &$working = null) { if ($this->is_feed($this->file)) { @@ -402,7 +410,7 @@ class SimplePie_Locator { break; } - if (preg_match('/(rss|rdf|atom|xml)/i', $value)) + if (preg_match('/(feed|rss|rdf|atom|xml)/i', $value)) { $this->checked_feeds++; $headers = array( @@ -422,3 +430,5 @@ class SimplePie_Locator return null; } } + +class_alias('SimplePie_Locator', 'SimplePie\Locator', false); diff --git a/lib/simplepie/library/SimplePie/Misc.php b/lib/simplepie/library/SimplePie/Misc.php index 2a2ecc575..4318573ba 100644 --- a/lib/simplepie/library/SimplePie/Misc.php +++ b/lib/simplepie/library/SimplePie/Misc.php @@ -5,7 +5,7 @@ * A PHP-Based RSS and Atom Feed Framework. * Takes the hard work out of managing a complete RSS/Atom solution. * - * Copyright (c) 2004-2016, Ryan Parman, Geoffrey Sneddon, Ryan McCue, and contributors + * Copyright (c) 2004-2016, Ryan Parman, Sam Sneddon, Ryan McCue, and contributors * All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, are @@ -33,9 +33,9 @@ * POSSIBILITY OF SUCH DAMAGE. * * @package SimplePie - * @copyright 2004-2016 Ryan Parman, Geoffrey Sneddon, Ryan McCue + * @copyright 2004-2016 Ryan Parman, Sam Sneddon, Ryan McCue * @author Ryan Parman - * @author Geoffrey Sneddon + * @author Sam Sneddon * @author Ryan McCue * @link http://simplepie.org/ SimplePie * @license http://www.opensource.org/licenses/bsd-license.php BSD License @@ -364,11 +364,12 @@ class SimplePie_Misc } // Check that the encoding is supported - if (@mb_convert_encoding("\x80", 'UTF-16BE', $input) === "\x00\x80") + if (!in_array($input, mb_list_encodings())) { return false; } - if (!in_array($input, mb_list_encodings())) + + if (@mb_convert_encoding("\x80", 'UTF-16BE', $input) === "\x00\x80") { return false; } @@ -2259,4 +2260,16 @@ function embed_wmedia(width, height, link) { { // No-op } + + /** + * Sanitize a URL by removing HTTP credentials. + * @param string $url the URL to sanitize. + * @return string the same URL without HTTP credentials. + */ + public static function url_remove_credentials($url) + { + return preg_replace('#^(https?://)[^/:@]+:[^/:@]+@#i', '$1', $url); + } } + +class_alias('SimplePie_Misc', 'SimplePie\Misc', false); diff --git a/lib/simplepie/library/SimplePie/Net/IPv6.php b/lib/simplepie/library/SimplePie/Net/IPv6.php index a054e8be5..c7e466a54 100644 --- a/lib/simplepie/library/SimplePie/Net/IPv6.php +++ b/lib/simplepie/library/SimplePie/Net/IPv6.php @@ -5,7 +5,7 @@ * A PHP-Based RSS and Atom Feed Framework. * Takes the hard work out of managing a complete RSS/Atom solution. * - * Copyright (c) 2004-2016, Ryan Parman, Geoffrey Sneddon, Ryan McCue, and contributors + * Copyright (c) 2004-2016, Ryan Parman, Sam Sneddon, Ryan McCue, and contributors * All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, are @@ -33,9 +33,9 @@ * POSSIBILITY OF SUCH DAMAGE. * * @package SimplePie - * @copyright 2004-2016 Ryan Parman, Geoffrey Sneddon, Ryan McCue + * @copyright 2004-2016 Ryan Parman, Sam Sneddon, Ryan McCue * @author Ryan Parman - * @author Geoffrey Sneddon + * @author Sam Sneddon * @author Ryan McCue * @link http://simplepie.org/ SimplePie * @license http://www.opensource.org/licenses/bsd-license.php BSD License @@ -53,7 +53,7 @@ * @author Alexander Merz <alexander.merz@web.de> * @author elfrink at introweb dot nl * @author Josh Peck <jmp at joshpeck dot org> - * @author Geoffrey Sneddon <geoffers@gmail.com> + * @author Sam Sneddon <geoffers@gmail.com> */ class SimplePie_Net_IPv6 { @@ -267,3 +267,5 @@ class SimplePie_Net_IPv6 return self::check_ipv6($ip); } } + +class_alias('SimplePie_Net_IPv6', 'SimplePie\Net\IPv6', false); diff --git a/lib/simplepie/library/SimplePie/Parse/Date.php b/lib/simplepie/library/SimplePie/Parse/Date.php index b29274c64..fe7e3ea49 100644 --- a/lib/simplepie/library/SimplePie/Parse/Date.php +++ b/lib/simplepie/library/SimplePie/Parse/Date.php @@ -5,7 +5,7 @@ * A PHP-Based RSS and Atom Feed Framework. * Takes the hard work out of managing a complete RSS/Atom solution. * - * Copyright (c) 2004-2016, Ryan Parman, Geoffrey Sneddon, Ryan McCue, and contributors + * Copyright (c) 2004-2016, Ryan Parman, Sam Sneddon, Ryan McCue, and contributors * All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, are @@ -33,9 +33,9 @@ * POSSIBILITY OF SUCH DAMAGE. * * @package SimplePie - * @copyright 2004-2016 Ryan Parman, Geoffrey Sneddon, Ryan McCue + * @copyright 2004-2016 Ryan Parman, Sam Sneddon, Ryan McCue * @author Ryan Parman - * @author Geoffrey Sneddon + * @author Sam Sneddon * @author Ryan McCue * @link http://simplepie.org/ SimplePie * @license http://www.opensource.org/licenses/bsd-license.php BSD License @@ -98,12 +98,20 @@ class SimplePie_Parse_Date 'dimanche' => 7, // German 'montag' => 1, + 'mo' => 1, 'dienstag' => 2, + 'di' => 2, 'mittwoch' => 3, + 'mi' => 3, 'donnerstag' => 4, + 'do' => 4, 'freitag' => 5, + 'fr' => 5, 'samstag' => 6, + 'sa' => 6, 'sonnabend' => 6, + // AFAIK no short form for sonnabend + 'so' => 7, 'sonntag' => 7, // Italian 'lunedì' => 1, @@ -145,6 +153,14 @@ class SimplePie_Parse_Date 'Παρ' => 5, 'Σαβ' => 6, 'Κυρ' => 7, + // Russian + 'Пн.' => 1, + 'Вт.' => 2, + 'Ср.' => 3, + 'Чт.' => 4, + 'Пт.' => 5, + 'Сб.' => 6, + 'Вс.' => 7, ); /** @@ -207,17 +223,28 @@ class SimplePie_Parse_Date 'décembre' => 12, // German 'januar' => 1, + 'jan' => 1, 'februar' => 2, + 'feb' => 2, 'märz' => 3, + 'mär' => 3, 'april' => 4, - 'mai' => 5, + 'apr' => 4, + 'mai' => 5, // no short form for may 'juni' => 6, + 'jun' => 6, 'juli' => 7, + 'jul' => 7, 'august' => 8, + 'aug' => 8, 'september' => 9, + 'sep' => 9, 'oktober' => 10, + 'okt' => 10, 'november' => 11, + 'nov' => 11, 'dezember' => 12, + 'dez' => 12, // Italian 'gennaio' => 1, 'febbraio' => 2, @@ -289,7 +316,33 @@ class SimplePie_Parse_Date 'Σεπ' => 9, 'Οκτ' => 10, 'Νοέ' => 11, - 'Δεκ' => 12, + 'Δεκ' => 12, + // Russian + 'Янв' => 1, + 'января' => 1, + 'Фев' => 2, + 'февраля' => 2, + 'Мар' => 3, + 'марта' => 3, + 'Апр' => 4, + 'апреля' => 4, + 'Май' => 5, + 'мая' => 5, + 'Июн' => 6, + 'июня' => 6, + 'Июл' => 7, + 'июля' => 7, + 'Авг' => 8, + 'августа' => 8, + 'Сен' => 9, + 'сентября' => 9, + 'Окт' => 10, + 'октября' => 10, + 'Ноя' => 11, + 'ноября' => 11, + 'Дек' => 12, + 'декабря' => 12, + ); /** @@ -541,8 +594,8 @@ class SimplePie_Parse_Date */ public function __construct() { - $this->day_pcre = '(' . implode(array_keys($this->day), '|') . ')'; - $this->month_pcre = '(' . implode(array_keys($this->month), '|') . ')'; + $this->day_pcre = '(' . implode('|', array_keys($this->day)) . ')'; + $this->month_pcre = '(' . implode('|', array_keys($this->month)) . ')'; static $cache; if (!isset($cache[get_class($this)])) @@ -690,7 +743,7 @@ class SimplePie_Parse_Date } // Convert the number of seconds to an integer, taking decimals into account - $second = round((int)$match[6] + (int)$match[7] / pow(10, strlen($match[7]))); + $second = round((int)$match[6] + (int)$match[7] / (10 ** strlen($match[7]))); return gmmktime($match[4], $match[5], $second, $match[2], $match[3], $match[1]) - $timezone; } @@ -970,3 +1023,5 @@ class SimplePie_Parse_Date return $strtotime; } } + +class_alias('SimplePie_Parse_Date', 'SimplePie\Parse\Date', false); diff --git a/lib/simplepie/library/SimplePie/Parser.php b/lib/simplepie/library/SimplePie/Parser.php index 3cef2287d..65f32d72a 100644 --- a/lib/simplepie/library/SimplePie/Parser.php +++ b/lib/simplepie/library/SimplePie/Parser.php @@ -5,7 +5,7 @@ * A PHP-Based RSS and Atom Feed Framework. * Takes the hard work out of managing a complete RSS/Atom solution. * - * Copyright (c) 2004-2016, Ryan Parman, Geoffrey Sneddon, Ryan McCue, and contributors + * Copyright (c) 2004-2016, Ryan Parman, Sam Sneddon, Ryan McCue, and contributors * All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, are @@ -33,9 +33,9 @@ * POSSIBILITY OF SUCH DAMAGE. * * @package SimplePie - * @copyright 2004-2016 Ryan Parman, Geoffrey Sneddon, Ryan McCue + * @copyright 2004-2016 Ryan Parman, Sam Sneddon, Ryan McCue * @author Ryan Parman - * @author Geoffrey Sneddon + * @author Sam Sneddon * @author Ryan McCue * @link http://simplepie.org/ SimplePie * @license http://www.opensource.org/licenses/bsd-license.php BSD License @@ -164,12 +164,30 @@ class SimplePie_Parser xml_set_element_handler($xml, 'tag_open', 'tag_close'); // Parse! - if (!xml_parse($xml, $data, true)) + $wrapper = @is_writable(sys_get_temp_dir()) ? 'php://temp' : 'php://memory'; + if (($stream = fopen($wrapper, 'r+')) && + fwrite($stream, $data) && + rewind($stream)) + { + //Parse by chunks not to use too much memory + do + { + $stream_data = fread($stream, 1048576); + if (!xml_parse($xml, $stream_data === false ? '' : $stream_data, feof($stream))) + { + $this->error_code = xml_get_error_code($xml); + $this->error_string = xml_error_string($this->error_code); + $return = false; + break; + } + } while (!feof($stream)); + fclose($stream); + } + else { - $this->error_code = xml_get_error_code($xml); - $this->error_string = xml_error_string($this->error_code); $return = false; } + $this->current_line = xml_get_current_line_number($xml); $this->current_column = xml_get_current_column_number($xml); $this->current_byte = xml_get_current_byte_index($xml); @@ -659,3 +677,5 @@ class SimplePie_Parser return '<!DOCTYPE html [ <!ENTITY nbsp " "> <!ENTITY iexcl "¡"> <!ENTITY cent "¢"> <!ENTITY pound "£"> <!ENTITY curren "¤"> <!ENTITY yen "¥"> <!ENTITY brvbar "¦"> <!ENTITY sect "§"> <!ENTITY uml "¨"> <!ENTITY copy "©"> <!ENTITY ordf "ª"> <!ENTITY laquo "«"> <!ENTITY not "¬"> <!ENTITY shy "­"> <!ENTITY reg "®"> <!ENTITY macr "¯"> <!ENTITY deg "°"> <!ENTITY plusmn "±"> <!ENTITY sup2 "²"> <!ENTITY sup3 "³"> <!ENTITY acute "´"> <!ENTITY micro "µ"> <!ENTITY para "¶"> <!ENTITY middot "·"> <!ENTITY cedil "¸"> <!ENTITY sup1 "¹"> <!ENTITY ordm "º"> <!ENTITY raquo "»"> <!ENTITY frac14 "¼"> <!ENTITY frac12 "½"> <!ENTITY frac34 "¾"> <!ENTITY iquest "¿"> <!ENTITY Agrave "À"> <!ENTITY Aacute "Á"> <!ENTITY Acirc "Â"> <!ENTITY Atilde "Ã"> <!ENTITY Auml "Ä"> <!ENTITY Aring "Å"> <!ENTITY AElig "Æ"> <!ENTITY Ccedil "Ç"> <!ENTITY Egrave "È"> <!ENTITY Eacute "É"> <!ENTITY Ecirc "Ê"> <!ENTITY Euml "Ë"> <!ENTITY Igrave "Ì"> <!ENTITY Iacute "Í"> <!ENTITY Icirc "Î"> <!ENTITY Iuml "Ï"> <!ENTITY ETH "Ð"> <!ENTITY Ntilde "Ñ"> <!ENTITY Ograve "Ò"> <!ENTITY Oacute "Ó"> <!ENTITY Ocirc "Ô"> <!ENTITY Otilde "Õ"> <!ENTITY Ouml "Ö"> <!ENTITY times "×"> <!ENTITY Oslash "Ø"> <!ENTITY Ugrave "Ù"> <!ENTITY Uacute "Ú"> <!ENTITY Ucirc "Û"> <!ENTITY Uuml "Ü"> <!ENTITY Yacute "Ý"> <!ENTITY THORN "Þ"> <!ENTITY szlig "ß"> <!ENTITY agrave "à"> <!ENTITY aacute "á"> <!ENTITY acirc "â"> <!ENTITY atilde "ã"> <!ENTITY auml "ä"> <!ENTITY aring "å"> <!ENTITY aelig "æ"> <!ENTITY ccedil "ç"> <!ENTITY egrave "è"> <!ENTITY eacute "é"> <!ENTITY ecirc "ê"> <!ENTITY euml "ë"> <!ENTITY igrave "ì"> <!ENTITY iacute "í"> <!ENTITY icirc "î"> <!ENTITY iuml "ï"> <!ENTITY eth "ð"> <!ENTITY ntilde "ñ"> <!ENTITY ograve "ò"> <!ENTITY oacute "ó"> <!ENTITY ocirc "ô"> <!ENTITY otilde "õ"> <!ENTITY ouml "ö"> <!ENTITY divide "÷"> <!ENTITY oslash "ø"> <!ENTITY ugrave "ù"> <!ENTITY uacute "ú"> <!ENTITY ucirc "û"> <!ENTITY uuml "ü"> <!ENTITY yacute "ý"> <!ENTITY thorn "þ"> <!ENTITY yuml "ÿ"> <!ENTITY OElig "Œ"> <!ENTITY oelig "œ"> <!ENTITY Scaron "Š"> <!ENTITY scaron "š"> <!ENTITY Yuml "Ÿ"> <!ENTITY fnof "ƒ"> <!ENTITY circ "ˆ"> <!ENTITY tilde "˜"> <!ENTITY Alpha "Α"> <!ENTITY Beta "Β"> <!ENTITY Gamma "Γ"> <!ENTITY Epsilon "Ε"> <!ENTITY Zeta "Ζ"> <!ENTITY Eta "Η"> <!ENTITY Theta "Θ"> <!ENTITY Iota "Ι"> <!ENTITY Kappa "Κ"> <!ENTITY Lambda "Λ"> <!ENTITY Mu "Μ"> <!ENTITY Nu "Ν"> <!ENTITY Xi "Ξ"> <!ENTITY Omicron "Ο"> <!ENTITY Pi "Π"> <!ENTITY Rho "Ρ"> <!ENTITY Sigma "Σ"> <!ENTITY Tau "Τ"> <!ENTITY Upsilon "Υ"> <!ENTITY Phi "Φ"> <!ENTITY Chi "Χ"> <!ENTITY Psi "Ψ"> <!ENTITY Omega "Ω"> <!ENTITY alpha "α"> <!ENTITY beta "β"> <!ENTITY gamma "γ"> <!ENTITY delta "δ"> <!ENTITY epsilon "ε"> <!ENTITY zeta "ζ"> <!ENTITY eta "η"> <!ENTITY theta "θ"> <!ENTITY iota "ι"> <!ENTITY kappa "κ"> <!ENTITY lambda "λ"> <!ENTITY mu "μ"> <!ENTITY nu "ν"> <!ENTITY xi "ξ"> <!ENTITY omicron "ο"> <!ENTITY pi "π"> <!ENTITY rho "ρ"> <!ENTITY sigmaf "ς"> <!ENTITY sigma "σ"> <!ENTITY tau "τ"> <!ENTITY upsilon "υ"> <!ENTITY phi "φ"> <!ENTITY chi "χ"> <!ENTITY psi "ψ"> <!ENTITY omega "ω"> <!ENTITY thetasym "ϑ"> <!ENTITY upsih "ϒ"> <!ENTITY piv "ϖ"> <!ENTITY ensp " "> <!ENTITY emsp " "> <!ENTITY thinsp " "> <!ENTITY zwnj "‌"> <!ENTITY zwj "‍"> <!ENTITY lrm "‎"> <!ENTITY rlm "‏"> <!ENTITY ndash "–"> <!ENTITY mdash "—"> <!ENTITY lsquo "‘"> <!ENTITY rsquo "’"> <!ENTITY sbquo "‚"> <!ENTITY ldquo "“"> <!ENTITY rdquo "”"> <!ENTITY bdquo "„"> <!ENTITY dagger "†"> <!ENTITY Dagger "‡"> <!ENTITY bull "•"> <!ENTITY hellip "…"> <!ENTITY permil "‰"> <!ENTITY prime "′"> <!ENTITY Prime "″"> <!ENTITY lsaquo "‹"> <!ENTITY rsaquo "›"> <!ENTITY oline "‾"> <!ENTITY frasl "⁄"> <!ENTITY euro "€"> <!ENTITY image "ℑ"> <!ENTITY weierp "℘"> <!ENTITY real "ℜ"> <!ENTITY trade "™"> <!ENTITY alefsym "ℵ"> <!ENTITY larr "←"> <!ENTITY uarr "↑"> <!ENTITY rarr "→"> <!ENTITY darr "↓"> <!ENTITY harr "↔"> <!ENTITY crarr "↵"> <!ENTITY lArr "⇐"> <!ENTITY uArr "⇑"> <!ENTITY rArr "⇒"> <!ENTITY dArr "⇓"> <!ENTITY hArr "⇔"> <!ENTITY forall "∀"> <!ENTITY part "∂"> <!ENTITY exist "∃"> <!ENTITY empty "∅"> <!ENTITY nabla "∇"> <!ENTITY isin "∈"> <!ENTITY notin "∉"> <!ENTITY ni "∋"> <!ENTITY prod "∏"> <!ENTITY sum "∑"> <!ENTITY minus "−"> <!ENTITY lowast "∗"> <!ENTITY radic "√"> <!ENTITY prop "∝"> <!ENTITY infin "∞"> <!ENTITY ang "∠"> <!ENTITY and "∧"> <!ENTITY or "∨"> <!ENTITY cap "∩"> <!ENTITY cup "∪"> <!ENTITY int "∫"> <!ENTITY there4 "∴"> <!ENTITY sim "∼"> <!ENTITY cong "≅"> <!ENTITY asymp "≈"> <!ENTITY ne "≠"> <!ENTITY equiv "≡"> <!ENTITY le "≤"> <!ENTITY ge "≥"> <!ENTITY sub "⊂"> <!ENTITY sup "⊃"> <!ENTITY nsub "⊄"> <!ENTITY sube "⊆"> <!ENTITY supe "⊇"> <!ENTITY oplus "⊕"> <!ENTITY otimes "⊗"> <!ENTITY perp "⊥"> <!ENTITY sdot "⋅"> <!ENTITY lceil "⌈"> <!ENTITY rceil "⌉"> <!ENTITY lfloor "⌊"> <!ENTITY rfloor "⌋"> <!ENTITY lang "〈"> <!ENTITY rang "〉"> <!ENTITY loz "◊"> <!ENTITY spades "♠"> <!ENTITY clubs "♣"> <!ENTITY hearts "♥"> <!ENTITY diams "♦"> ]>'; } } + +class_alias('SimplePie_Parser', 'SimplePie\Parser', false); diff --git a/lib/simplepie/library/SimplePie/Rating.php b/lib/simplepie/library/SimplePie/Rating.php index 108dd22bf..eae6718a7 100644 --- a/lib/simplepie/library/SimplePie/Rating.php +++ b/lib/simplepie/library/SimplePie/Rating.php @@ -5,7 +5,7 @@ * A PHP-Based RSS and Atom Feed Framework. * Takes the hard work out of managing a complete RSS/Atom solution. * - * Copyright (c) 2004-2016, Ryan Parman, Geoffrey Sneddon, Ryan McCue, and contributors + * Copyright (c) 2004-2016, Ryan Parman, Sam Sneddon, Ryan McCue, and contributors * All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, are @@ -33,9 +33,9 @@ * POSSIBILITY OF SUCH DAMAGE. * * @package SimplePie - * @copyright 2004-2016 Ryan Parman, Geoffrey Sneddon, Ryan McCue + * @copyright 2004-2016 Ryan Parman, Sam Sneddon, Ryan McCue * @author Ryan Parman - * @author Geoffrey Sneddon + * @author Sam Sneddon * @author Ryan McCue * @link http://simplepie.org/ SimplePie * @license http://www.opensource.org/licenses/bsd-license.php BSD License @@ -122,3 +122,5 @@ class SimplePie_Rating return null; } } + +class_alias('SimplePie_Rating', 'SimplePie\Rating', false); diff --git a/lib/simplepie/library/SimplePie/Registry.php b/lib/simplepie/library/SimplePie/Registry.php index e0909bb74..2486f3c69 100755 --- a/lib/simplepie/library/SimplePie/Registry.php +++ b/lib/simplepie/library/SimplePie/Registry.php @@ -5,7 +5,7 @@ * A PHP-Based RSS and Atom Feed Framework. * Takes the hard work out of managing a complete RSS/Atom solution. * - * Copyright (c) 2004-2016, Ryan Parman, Geoffrey Sneddon, Ryan McCue, and contributors + * Copyright (c) 2004-2016, Ryan Parman, Sam Sneddon, Ryan McCue, and contributors * All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, are @@ -33,9 +33,9 @@ * POSSIBILITY OF SUCH DAMAGE. * * @package SimplePie - * @copyright 2004-2016 Ryan Parman, Geoffrey Sneddon, Ryan McCue + * @copyright 2004-2016 Ryan Parman, Sam Sneddon, Ryan McCue * @author Ryan Parman - * @author Geoffrey Sneddon + * @author Sam Sneddon * @author Ryan McCue * @link http://simplepie.org/ SimplePie * @license http://www.opensource.org/licenses/bsd-license.php BSD License @@ -208,7 +208,8 @@ class SimplePie_Registry { case 'Cache': // For backwards compatibility with old non-static - // Cache::create() methods + // Cache::create() methods in PHP < 8.0. + // No longer supported as of PHP 8.0. if ($method === 'get_handler') { $result = @call_user_func_array(array($class, 'create'), $parameters); @@ -222,3 +223,5 @@ class SimplePie_Registry return $result; } } + +class_alias('SimplePie_Registry', 'SimplePie\Registry', false); diff --git a/lib/simplepie/library/SimplePie/Restriction.php b/lib/simplepie/library/SimplePie/Restriction.php index 803d84fde..0a168bbbe 100644 --- a/lib/simplepie/library/SimplePie/Restriction.php +++ b/lib/simplepie/library/SimplePie/Restriction.php @@ -5,7 +5,7 @@ * A PHP-Based RSS and Atom Feed Framework. * Takes the hard work out of managing a complete RSS/Atom solution. * - * Copyright (c) 2004-2016, Ryan Parman, Geoffrey Sneddon, Ryan McCue, and contributors + * Copyright (c) 2004-2016, Ryan Parman, Sam Sneddon, Ryan McCue, and contributors * All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, are @@ -33,9 +33,9 @@ * POSSIBILITY OF SUCH DAMAGE. * * @package SimplePie - * @copyright 2004-2016 Ryan Parman, Geoffrey Sneddon, Ryan McCue + * @copyright 2004-2016 Ryan Parman, Sam Sneddon, Ryan McCue * @author Ryan Parman - * @author Geoffrey Sneddon + * @author Sam Sneddon * @author Ryan McCue * @link http://simplepie.org/ SimplePie * @license http://www.opensource.org/licenses/bsd-license.php BSD License @@ -146,3 +146,5 @@ class SimplePie_Restriction return null; } } + +class_alias('SimplePie_Restriction', 'SimplePie\Restriction', false); diff --git a/lib/simplepie/library/SimplePie/Sanitize.php b/lib/simplepie/library/SimplePie/Sanitize.php index 40b066266..1f202ecc0 100644 --- a/lib/simplepie/library/SimplePie/Sanitize.php +++ b/lib/simplepie/library/SimplePie/Sanitize.php @@ -5,7 +5,7 @@ * A PHP-Based RSS and Atom Feed Framework. * Takes the hard work out of managing a complete RSS/Atom solution. * - * Copyright (c) 2004-2016, Ryan Parman, Geoffrey Sneddon, Ryan McCue, and contributors + * Copyright (c) 2004-2016, Ryan Parman, Sam Sneddon, Ryan McCue, and contributors * All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, are @@ -33,9 +33,9 @@ * POSSIBILITY OF SUCH DAMAGE. * * @package SimplePie - * @copyright 2004-2016 Ryan Parman, Geoffrey Sneddon, Ryan McCue + * @copyright 2004-2016 Ryan Parman, Sam Sneddon, Ryan McCue * @author Ryan Parman - * @author Geoffrey Sneddon + * @author Sam Sneddon * @author Ryan McCue * @link http://simplepie.org/ SimplePie * @license http://www.opensource.org/licenses/bsd-license.php BSD License @@ -61,6 +61,7 @@ class SimplePie_Sanitize var $strip_htmltags = array('base', 'blink', 'body', 'doctype', 'embed', 'font', 'form', 'frame', 'frameset', 'html', 'iframe', 'input', 'marquee', 'meta', 'noscript', 'object', 'param', 'script', 'style'); var $encode_instead_of_strip = false; var $strip_attributes = array('bgsound', 'expr', 'id', 'style', 'onclick', 'onerror', 'onfinish', 'onmouseover', 'onmouseout', 'onfocus', 'onblur', 'lowsrc', 'dynsrc'); + var $rename_attributes = array(); var $add_attributes = array('audio' => array('preload' => 'none'), 'iframe' => array('sandbox' => 'allow-scripts allow-same-origin'), 'video' => array('preload' => 'none')); var $strip_comments = false; var $output_encoding = 'UTF-8'; @@ -71,6 +72,15 @@ class SimplePie_Sanitize var $useragent = ''; var $force_fsockopen = false; var $replace_url_attributes = null; + var $registry; + + /** + * List of domains for which to force HTTPS. + * @see SimplePie_Sanitize::set_https_domains() + * Array is a tree split at DNS levels. Example: + * array('biz' => true, 'com' => array('example' => true), 'net' => array('example' => array('www' => true))) + */ + var $https_domains = array(); public function __construct() { @@ -160,6 +170,25 @@ class SimplePie_Sanitize $this->encode_instead_of_strip = (bool) $encode; } + public function rename_attributes($attribs = array()) + { + if ($attribs) + { + if (is_array($attribs)) + { + $this->rename_attributes = $attribs; + } + else + { + $this->rename_attributes = explode(',', $attribs); + } + } + else + { + $this->rename_attributes = false; + } + } + public function strip_attributes($attribs = array('bgsound', 'expr', 'id', 'style', 'onclick', 'onerror', 'onfinish', 'onmouseover', 'onmouseout', 'onfocus', 'onblur', 'lowsrc', 'dynsrc')) { if ($attribs) @@ -212,9 +241,9 @@ class SimplePie_Sanitize * Set element/attribute key/value pairs of HTML attributes * containing URLs that need to be resolved relative to the feed * - * Defaults to |a|@href, |area|@href, |blockquote|@cite, |del|@cite, - * |form|@action, |img|@longdesc, |img|@src, |input|@src, |ins|@cite, - * |q|@cite + * Defaults to |a|@href, |area|@href, |audio|@src, |blockquote|@cite, + * |del|@cite, |form|@action, |img|@longdesc, |img|@src, |input|@src, + * |ins|@cite, |q|@cite, |source|@src, |video|@src * * @since 1.0 * @param array|null $element_attribute Element/attribute key/value pairs, null for default @@ -226,6 +255,7 @@ class SimplePie_Sanitize $element_attribute = array( 'a' => 'href', 'area' => 'href', + 'audio' => 'src', 'blockquote' => 'cite', 'del' => 'cite', 'form' => 'action', @@ -235,12 +265,79 @@ class SimplePie_Sanitize ), 'input' => 'src', 'ins' => 'cite', - 'q' => 'cite' + 'q' => 'cite', + 'source' => 'src', + 'video' => array( + 'poster', + 'src' + ) ); } $this->replace_url_attributes = (array) $element_attribute; } + /** + * Set the list of domains for which to force HTTPS. + * @see SimplePie_Misc::https_url() + * Example array('biz', 'example.com', 'example.org', 'www.example.net'); + */ + public function set_https_domains($domains) + { + $this->https_domains = array(); + foreach ($domains as $domain) + { + $domain = trim($domain, ". \t\n\r\0\x0B"); + $segments = array_reverse(explode('.', $domain)); + $node =& $this->https_domains; + foreach ($segments as $segment) + {//Build a tree + if ($node === true) + { + break; + } + if (!isset($node[$segment])) + { + $node[$segment] = array(); + } + $node =& $node[$segment]; + } + $node = true; + } + } + + /** + * Check if the domain is in the list of forced HTTPS. + */ + protected function is_https_domain($domain) + { + $domain = trim($domain, '. '); + $segments = array_reverse(explode('.', $domain)); + $node =& $this->https_domains; + foreach ($segments as $segment) + {//Explore the tree + if (isset($node[$segment])) + { + $node =& $node[$segment]; + } + else + { + break; + } + } + return $node === true; + } + + /** + * Force HTTPS for selected Web sites. + */ + public function https_url($url) + { + return (strtolower(substr($url, 0, 7)) === 'http://') && + $this->is_https_domain(parse_url($url, PHP_URL_HOST)) ? + substr_replace($url, 's', 4, 0) : //Add the 's' to HTTPS + $url; + } + public function sanitize($data, $type, $base = '') { $data = trim($data); @@ -303,6 +400,14 @@ class SimplePie_Sanitize } } + if ($this->rename_attributes) + { + foreach ($this->rename_attributes as $attrib) + { + $this->rename_attr($attrib, $xpath); + } + } + if ($this->strip_attributes) { foreach ($this->strip_attributes as $attrib) @@ -365,14 +470,7 @@ class SimplePie_Sanitize // Get content node $div = $document->getElementsByTagName('body')->item(0)->firstChild; // Finally, convert to a HTML string - if (version_compare(PHP_VERSION, '5.3.6', '>=')) - { - $data = trim($document->saveHTML($div)); - } - else - { - $data = trim($document->saveXML($div)); - } + $data = trim($document->saveHTML($div)); if ($this->remove_div) { @@ -383,6 +481,8 @@ class SimplePie_Sanitize { $data = preg_replace('/^<div' . SIMPLEPIE_PCRE_XML_ATTRIBUTE . '>/', '<div>', $data); } + + $data = str_replace('</source>', '', $data); } if ($type & SIMPLEPIE_CONSTRUCT_IRI) @@ -450,6 +550,7 @@ class SimplePie_Sanitize $value = $this->registry->call('Misc', 'absolutize_url', array($element->getAttribute($attribute), $this->base)); if ($value !== false) { + $value = $this->https_url($value); $element->setAttribute($attribute, $value); } } @@ -577,6 +678,17 @@ class SimplePie_Sanitize } } + protected function rename_attr($attrib, $xpath) + { + $elements = $xpath->query('//*[@' . $attrib . ']'); + + foreach ($elements as $element) + { + $element->setAttribute('data-sanitized-' . $attrib, $element->getAttribute($attrib)); + $element->removeAttribute($attrib); + } + } + protected function add_attr($tag, $valuePairs, $document) { $elements = $document->getElementsByTagName($tag); @@ -589,3 +701,5 @@ class SimplePie_Sanitize } } } + +class_alias('SimplePie_Sanitize', 'SimplePie\Sanitize', false); diff --git a/lib/simplepie/library/SimplePie/Source.php b/lib/simplepie/library/SimplePie/Source.php index 8fac13ef7..9e7ddf04d 100644 --- a/lib/simplepie/library/SimplePie/Source.php +++ b/lib/simplepie/library/SimplePie/Source.php @@ -5,7 +5,7 @@ * A PHP-Based RSS and Atom Feed Framework. * Takes the hard work out of managing a complete RSS/Atom solution. * - * Copyright (c) 2004-2016, Ryan Parman, Geoffrey Sneddon, Ryan McCue, and contributors + * Copyright (c) 2004-2016, Ryan Parman, Sam Sneddon, Ryan McCue, and contributors * All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, are @@ -33,9 +33,9 @@ * POSSIBILITY OF SUCH DAMAGE. * * @package SimplePie - * @copyright 2004-2016 Ryan Parman, Geoffrey Sneddon, Ryan McCue + * @copyright 2004-2016 Ryan Parman, Sam Sneddon, Ryan McCue * @author Ryan Parman - * @author Geoffrey Sneddon + * @author Sam Sneddon * @author Ryan McCue * @link http://simplepie.org/ SimplePie * @license http://www.opensource.org/licenses/bsd-license.php BSD License @@ -575,3 +575,5 @@ class SimplePie_Source return null; } } + +class_alias('SimplePie_Source', 'SimplePie\Source', false); diff --git a/lib/simplepie/library/SimplePie/XML/Declaration/Parser.php b/lib/simplepie/library/SimplePie/XML/Declaration/Parser.php index 18ca1b79b..9ac088704 100644 --- a/lib/simplepie/library/SimplePie/XML/Declaration/Parser.php +++ b/lib/simplepie/library/SimplePie/XML/Declaration/Parser.php @@ -5,7 +5,7 @@ * A PHP-Based RSS and Atom Feed Framework. * Takes the hard work out of managing a complete RSS/Atom solution. * - * Copyright (c) 2004-2016, Ryan Parman, Geoffrey Sneddon, Ryan McCue, and contributors + * Copyright (c) 2004-2016, Ryan Parman, Sam Sneddon, Ryan McCue, and contributors * All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, are @@ -33,9 +33,9 @@ * POSSIBILITY OF SUCH DAMAGE. * * @package SimplePie - * @copyright 2004-2016 Ryan Parman, Geoffrey Sneddon, Ryan McCue + * @copyright 2004-2016 Ryan Parman, Sam Sneddon, Ryan McCue * @author Ryan Parman - * @author Geoffrey Sneddon + * @author Sam Sneddon * @author Ryan McCue * @link http://simplepie.org/ SimplePie * @license http://www.opensource.org/licenses/bsd-license.php BSD License @@ -357,3 +357,5 @@ class SimplePie_XML_Declaration_Parser } } } + +class_alias('SimplePie_XML_Declaration_Parser', 'SimplePie\XML\Declaration\Parser', false); diff --git a/lib/simplepie/library/SimplePie/gzdecode.php b/lib/simplepie/library/SimplePie/gzdecode.php index f4aeafa28..030a230d0 100644 --- a/lib/simplepie/library/SimplePie/gzdecode.php +++ b/lib/simplepie/library/SimplePie/gzdecode.php @@ -5,7 +5,7 @@ * A PHP-Based RSS and Atom Feed Framework. * Takes the hard work out of managing a complete RSS/Atom solution. * - * Copyright (c) 2004-2016, Ryan Parman, Geoffrey Sneddon, Ryan McCue, and contributors + * Copyright (c) 2004-2016, Ryan Parman, Sam Sneddon, Ryan McCue, and contributors * All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, are @@ -33,9 +33,9 @@ * POSSIBILITY OF SUCH DAMAGE. * * @package SimplePie - * @copyright 2004-2016 Ryan Parman, Geoffrey Sneddon, Ryan McCue + * @copyright 2004-2016 Ryan Parman, Sam Sneddon, Ryan McCue * @author Ryan Parman - * @author Geoffrey Sneddon + * @author Sam Sneddon * @author Ryan McCue * @link http://simplepie.org/ SimplePie * @license http://www.opensource.org/licenses/bsd-license.php BSD License @@ -364,3 +364,5 @@ class SimplePie_gzdecode return false; } } + +class_alias('SimplePie_gzdecode', 'SimplePie\Gzdecode', false); |