X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2FimportImages.inc;h=0f69f6680d18b201c33c7a767ea31d6256cdce55;hb=e4854a1f0057ac344e2b5c6656ac186fcd8dc3fa;hp=b803e3dae47fd649640352223e9df7c482007359;hpb=ab2d63b53ed29c44e4917125555af3dc2eb9964e;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/importImages.inc b/maintenance/importImages.inc index b803e3dae4..0f69f6680d 100644 --- a/maintenance/importImages.inc +++ b/maintenance/importImages.inc @@ -117,7 +117,7 @@ function findAuxFile( $file, $auxExtension, $maxStrip = 1 ) { function getFileCommentFromSourceWiki( $wiki_host, $file ) { $url = $wiki_host . '/api.php?action=query&format=xml&titles=File:' . rawurlencode( $file ) . '&prop=imageinfo&&iiprop=comment'; - $body = Http::get( $url ); + $body = Http::get( $url, array(), __METHOD__ ); if ( preg_match( '##', $body, $matches ) == 0 ) { return false; } @@ -128,11 +128,10 @@ 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 = Http::get( $url ); + $body = Http::get( $url, array(), __METHOD__ ); if ( preg_match( '##', $body, $matches ) == 0 ) { return false; } return html_entity_decode( $matches[1] ); } -