# Use curl if available
if ( function_exists( 'curl_init' ) ) {
$c = curl_init( $url );
- if ( wfIsLocalURL( $url ) ) {
+ if ( self::isLocalURL( $url ) ) {
curl_setopt( $c, CURLOPT_PROXY, 'localhost:80' );
} else if ($wgHTTPProxy) {
curl_setopt($c, CURLOPT_PROXY, $wgHTTPProxy);
'major' => '',
'minor' => '' );
- $magic =& wfGetMimeMagic();
+ $magic = MimeMagic::singleton();
$mime = $magic->guessMimeType( $filename, true );
list( $info['major'], $info['minor'] ) = explode( '/', $mime );
class Site {
var $suffix, $lateral, $url;
- function Site( $s, $l, $u ) {
+ function __construct( $s, $l, $u ) {
$this->suffix = $s;
$this->lateral = $l;
$this->url = $u;
}
# Extract the intermap from meta
- $intermap = wfGetHTTP( 'http://meta.wikimedia.org/w/index.php?title=Interwiki_map&action=raw', 30 );
+ $intermap = Http::get( 'http://meta.wikimedia.org/w/index.php?title=Interwiki_map&action=raw', 30 );
$lines = array_map( 'trim', explode( "\n", trim( $intermap ) ) );
if ( !$lines || count( $lines ) < 2 ) {
class Site {
var $suffix, $lateral, $url;
- function Site( $s, $l, $u ) {
+ function __construct( $s, $l, $u ) {
$this->suffix = $s;
$this->lateral = $l;
$this->url = $u;
}
# Extract the intermap from meta
- $intermap = wfGetHTTP( 'http://meta.wikimedia.org/w/index.php?title=Interwiki_map&action=raw', 30 );
+ $intermap = Http::get( 'http://meta.wikimedia.org/w/index.php?title=Interwiki_map&action=raw', 30 );
$lines = array_map( 'trim', explode( "\n", trim( $intermap ) ) );
if ( !$lines || count( $lines ) < 2 ) {