summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Evans <grknight@gentoo.org>2019-11-27 09:35:05 -0500
committerBrian Evans <grknight@gentoo.org>2019-11-27 09:35:05 -0500
commit39a3689ad0d2eb04cffe8465311dfc412e013567 (patch)
tree8766b6af5ed7e32156691fa1b9d3f51f42a73c4c /GentooPackages/GentooPackages.php
parentCreate symlinks to all the MLEB extensions for ease of installation (diff)
downloadextensions-39a3689ad0d2eb04cffe8465311dfc412e013567.tar.gz
extensions-39a3689ad0d2eb04cffe8465311dfc412e013567.tar.bz2
extensions-39a3689ad0d2eb04cffe8465311dfc412e013567.zip
Future proof GentooPackages with Http:: being deprecated
Signed-off-by: Brian Evans <grknight@gentoo.org>
Diffstat (limited to 'GentooPackages/GentooPackages.php')
-rw-r--r--GentooPackages/GentooPackages.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/GentooPackages/GentooPackages.php b/GentooPackages/GentooPackages.php
index 3f38dd46..fe73bda4 100644
--- a/GentooPackages/GentooPackages.php
+++ b/GentooPackages/GentooPackages.php
@@ -13,7 +13,11 @@ class GentooPackages {
}
static function fetchOrError($atom, $type) {
- $json_str = Http::get("https://packages.gentoo.org/packages/${atom}.json");
+ global $wgVersion;
+ if(version_compare( $wgVersion, '1.33', '<=' ))
+ $json_str = Http::get("https://packages.gentoo.org/packages/${atom}.json");
+ else
+ $json_str = \MediaWiki\Http\HttpRequestFactory::get("https://packages.gentoo.org/packages/${atom}.json");
if ($json_str === false) {
return '<div class="alert alert-danger">Cannot load package information. Is the atom <em>' . htmlspecialchars($atom) . '</em> correct?</div>';