Index: trunk/phase3/maintenance/importImages.inc |
— | — | @@ -92,7 +92,7 @@ |
93 | 93 | # FIXME: Access the api in a saner way and performing just one query (preferably batching files too). |
94 | 94 | function getFileCommentFromSourceWiki($wiki_host, $file) { |
95 | 95 | $url = $wiki_host . '/api.php?action=query&format=xml&titles=File:' . rawurlencode( $file ) . '&prop=imageinfo&&iiprop=comment'; |
96 | | - $body = file_get_contents($url); |
| 96 | + $body = Http::get($url); |
97 | 97 | if (preg_match('#<ii comment="([^"]*)" />#', $body, $matches) == 0) { |
98 | 98 | return false; |
99 | 99 | } |
— | — | @@ -102,7 +102,7 @@ |
103 | 103 | |
104 | 104 | function getFileUserFromSourceWiki($wiki_host, $file) { |
105 | 105 | $url = $wiki_host . '/api.php?action=query&format=xml&titles=File:' . rawurlencode( $file ) . '&prop=imageinfo&&iiprop=user'; |
106 | | - $body = file_get_contents($url); |
| 106 | + $body = Http::get($url); |
107 | 107 | if (preg_match('#<ii user="([^"]*)" />#', $body, $matches) == 0) { |
108 | 108 | return false; |
109 | 109 | } |