Index: trunk/extensions/SpamBlacklist/SpamBlacklist_body.php |
— | — | @@ -161,7 +161,7 @@ |
162 | 162 | |
163 | 163 | if ( !is_string( $httpText ) || ( !$warning && !mt_rand( 0, $this->warningChance ) ) ) { |
164 | 164 | wfDebugLog( 'SpamBlacklist', "Loading spam blacklist from $fileName\n" ); |
165 | | - $httpText = $this->getHTTP( $fileName ); |
| 165 | + $httpText = Http::get( $fileName ); |
166 | 166 | if( $httpText === false ) { |
167 | 167 | wfDebugLog( 'SpamBlacklist', "Error loading blacklist from $fileName\n" ); |
168 | 168 | } |
— | — | @@ -324,22 +324,6 @@ |
325 | 325 | return strval( $text ); |
326 | 326 | } |
327 | 327 | |
328 | | - function getHTTP( $url ) { |
329 | | - // Use wfGetHTTP from MW 1.5 if it is available |
330 | | - global $IP; |
331 | | - include_once( "$IP/includes/HttpFunctions.php" ); |
332 | | - wfSuppressWarnings(); |
333 | | - if ( function_exists( 'wfGetHTTP' ) ) { |
334 | | - $text = wfGetHTTP( $url ); |
335 | | - } else { |
336 | | - $url_fopen = ini_set( 'allow_url_fopen', 1 ); |
337 | | - $text = file_get_contents( $url ); |
338 | | - ini_set( 'allow_url_fopen', $url_fopen ); |
339 | | - } |
340 | | - wfRestoreWarnings(); |
341 | | - return $text; |
342 | | - } |
343 | | - |
344 | 328 | /** |
345 | 329 | * Confirm that a local blacklist page being saved is valid, |
346 | 330 | * and toss back a warning to the user if it isn't. |