From 39e034626e05bba748b2d2ac59ee83716b58a7eb Mon Sep 17 00:00:00 2001 From: Platonides Date: Sun, 7 Feb 2010 18:39:26 +0000 Subject: [PATCH] file_get_contents -> Http::get per ^demon --- maintenance/importImages.inc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/maintenance/importImages.inc b/maintenance/importImages.inc index 0f335ee277..7bb50eb874 100644 --- a/maintenance/importImages.inc +++ b/maintenance/importImages.inc @@ -92,7 +92,7 @@ function findAuxFile( $file, $auxExtension, $maxStrip = 1 ) { # FIXME: Access the api in a saner way and performing just one query (preferably batching files too). function getFileCommentFromSourceWiki($wiki_host, $file) { $url = $wiki_host . '/api.php?action=query&format=xml&titles=File:' . rawurlencode( $file ) . '&prop=imageinfo&&iiprop=comment'; - $body = file_get_contents($url); + $body = Http::get($url); if (preg_match('##', $body, $matches) == 0) { return false; } @@ -102,7 +102,7 @@ function getFileCommentFromSourceWiki($wiki_host, $file) { function getFileUserFromSourceWiki($wiki_host, $file) { $url = $wiki_host . '/api.php?action=query&format=xml&titles=File:' . rawurlencode( $file ) . '&prop=imageinfo&&iiprop=user'; - $body = file_get_contents($url); + $body = Http::get($url); if (preg_match('##', $body, $matches) == 0) { return false; } -- 2.20.1