aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/Downloads.php3
-rw-r--r--tools/update-mirrors-list.php8
2 files changed, 9 insertions, 2 deletions
diff --git a/lib/Downloads.php b/lib/Downloads.php
index 7d8026aa2..aef1dd185 100644
--- a/lib/Downloads.php
+++ b/lib/Downloads.php
@@ -96,9 +96,8 @@ class Downloads
*
* @return array
*/
- public static function get_all_mirrors()
+ public static function get_all_mirrors($prod = true)
{
- $prod = true;
$cache_file = realpath(__DIR__ . '/cached.list.php');
if ($prod) {
diff --git a/tools/update-mirrors-list.php b/tools/update-mirrors-list.php
new file mode 100644
index 000000000..d9be85226
--- /dev/null
+++ b/tools/update-mirrors-list.php
@@ -0,0 +1,8 @@
+<?php
+/**
+ * Run this to update lib/cached.list.php mirrors list from mirrors.mageia.org/api
+ *
+*/
+
+require __DIR__ . '/../lib/Downloads.php';
+Downloads::get_all_mirrors(false); \ No newline at end of file