r37016 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r37015‎ | r37016 | r37017 >
Date:02:22, 4 July 2008
Author:demon
Status:old
Tags:
Comment:
Use Http::get() rather than wfGetHttp() [which is otherwise unused and could stand removal)
Modified paths:
  • /trunk/extensions/DoubleWiki/DoubleWiki.php (modified) (history)
  • /trunk/extensions/LuceneSearch/LuceneSearch_body.php (modified) (history)
  • /trunk/extensions/SpamBlacklist/SpamBlacklist_body.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SpamBlacklist/SpamBlacklist_body.php
@@ -330,12 +330,9 @@
331331 }
332332
333333 function getHTTP( $url ) {
334 - // Use wfGetHTTP from MW 1.5 if it is available
335 - global $IP;
336 - include_once( "$IP/includes/HttpFunctions.php" );
337334 wfSuppressWarnings();
338 - if ( function_exists( 'wfGetHTTP' ) ) {
339 - $text = wfGetHTTP( $url );
 335+ if ( function_exists( 'Http::get' ) ) {
 336+ $text = Http::get( $url );
340337 } else {
341338 $url_fopen = ini_set( 'allow_url_fopen', 1 );
342339 $text = file_get_contents( $url );
Index: trunk/extensions/LuceneSearch/LuceneSearch_body.php
@@ -798,7 +798,7 @@
799799 wfDebug( "Fetching search data from $searchUrl\n" );
800800 wfSuppressWarnings();
801801 wfProfileIn( $fname.'-contact-'.$host );
802 - $data = wfGetHTTP( $searchUrl );
 802+ $data = Http::get( $searchUrl );
803803 wfProfileOut( $fname.'-contact-'.$host );
804804 wfRestoreWarnings();
805805
Index: trunk/extensions/DoubleWiki/DoubleWiki.php
@@ -54,7 +54,7 @@
5555 $myLanguage = $wgLang->getLanguageName( $wgContLanguageCode );
5656
5757 $sep = ( in_string( '?', $url ) ) ? '&' : '?';
58 - $translation = wfGetHttp( $url.$sep.'action=render' );
 58+ $translation = Http::get( $url.$sep.'action=render' );
5959 if ( $translation !== null ) {
6060 #first find all links that have no 'class' parameter.
6161 #these links are local so we add '?match=xx' to their url,

Follow-up revisions

RevisionCommit summaryAuthorDate
r37066Partial revert of r37016 (attempt to swap out old compat wfGetHTTP() with Htt...brion20:55, 4 July 2008

Status & tagging log