aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorfilip <filip.komar@gmail.com>2026-01-10 23:22:59 +0100
committerfilip <filip.komar@gmail.com>2026-01-10 23:22:59 +0100
commit829bbf2c777572f10f98ce3f28aa86e337f6a2fd (patch)
treeeda63f6ee3fb6f5383c7271ca1b0859ede463c76 /lib
parent5c01e29476d6954e888f899c577c8dde521b33ac (diff)
downloadwww-829bbf2c777572f10f98ce3f28aa86e337f6a2fd.tar
www-829bbf2c777572f10f98ce3f28aa86e337f6a2fd.tar.gz
www-829bbf2c777572f10f98ce3f28aa86e337f6a2fd.tar.bz2
www-829bbf2c777572f10f98ce3f28aa86e337f6a2fd.tar.xz
www-829bbf2c777572f10f98ce3f28aa86e337f6a2fd.zip
update for mga10 and fix helper for DL cache lists
Diffstat (limited to 'lib')
-rw-r--r--lib/Downloads.php18
1 files changed, 9 insertions, 9 deletions
diff --git a/lib/Downloads.php b/lib/Downloads.php
index 69a0e38ad..989930608 100644
--- a/lib/Downloads.php
+++ b/lib/Downloads.php
@@ -29,7 +29,7 @@ class Downloads
{
if ($ua == '')
return array(
- 'arch' => 'i586',
+ 'arch' => 'i686',
'system' => 'unknown',
'locale' => 'en',
'browser' => null
@@ -54,7 +54,7 @@ class Downloads
$locale = $r;
}
- $arch = 'i586';
+ $arch = 'i686';
if (strpos($ua, 'x86_64') !== false)
$arch = 'x86_64';
@@ -155,7 +155,7 @@ class Downloads
require $cache_file;
} else {
- $data = file('http://mirrors.mageia.org/api/mageia.9.i586.list');
+ $data = file('http://mirrors.mageia.org/api/mageia.10.i686.list');
$mirrors = array();
$num_up = 0;
$num_dn = 0;
@@ -170,9 +170,9 @@ class Downloads
}
$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';
+ $common_patern = '/distrib/10/i686';
+ //~ $common_patern = '/distrib/cauldron/i686';
// 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*';
@@ -239,10 +239,10 @@ class Downloads
if ($documentation) {
$test_file = $item['url'].'/doc/mga8/date.txt';
} else if ($mirrorlist) {
- $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
+ $test_file = $item['url'].'/distrib/10/x86_64/media/core/updates/repodata/repomd.xml'; // when changing, please change $common_patern too
+ $test_file = $item['url'].'/distrib/10/x86_64/media/core/release/x11-apps-1.0.0-21.mga10.noarch.rpm'; // when changing, please change $common_patern too
} else {
- $test_file = $item['url'].'/iso/9/torrents/Mageia-9-Live-Xfce-i586.torrent';
+ $test_file = $item['url'].'/iso/10/Mageia-10-alpha1-x86_64/DATE.txt';
}
if (false === @file_get_contents($test_file)) {
$num_dn++;
@@ -287,7 +287,7 @@ class Downloads
var_export($faults);
echo ";\n";
}
- echo "\nRemove char ' at each value on both arrays for cities and countries above : replace '_r(\" with just _r( and also behind \")', with \"),\n";
+ echo "\nRemove char ' at each value on both arrays for cities and countries above : replace \"'_r(\" with just \"_r(\" and also behind \")\", with \"),\"\n";
echo "and update arrays in file /en/downloads/get/lib.php with that.\n";
}
return $mirrors;