From: Alexandre Emsenhuber Date: Wed, 5 Mar 2008 11:58:44 +0000 (+0000) Subject: replacing some calls from deprecated global functions to new modularized functions X-Git-Tag: 1.31.0-rc.0~49247 X-Git-Url: http://git.cyclocoop.org/%24action?a=commitdiff_plain;h=7ac76358c3317ec9aaf9fb4cc95ce65fa1e376ca;p=lhc%2Fweb%2Fwiklou.git replacing some calls from deprecated global functions to new modularized functions --- diff --git a/includes/HttpFunctions.php b/includes/HttpFunctions.php index 6ea3abd0d4..9ab7447a2f 100644 --- a/includes/HttpFunctions.php +++ b/includes/HttpFunctions.php @@ -24,7 +24,7 @@ class Http { # 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); diff --git a/maintenance/FiveUpgrade.inc b/maintenance/FiveUpgrade.inc index 9a882bc60a..62574f1834 100644 --- a/maintenance/FiveUpgrade.inc +++ b/maintenance/FiveUpgrade.inc @@ -702,7 +702,7 @@ END; 'major' => '', 'minor' => '' ); - $magic =& wfGetMimeMagic(); + $magic = MimeMagic::singleton(); $mime = $magic->guessMimeType( $filename, true ); list( $info['major'], $info['minor'] ) = explode( '/', $mime ); diff --git a/maintenance/dumpInterwiki.inc b/maintenance/dumpInterwiki.inc index 9af6ccc58a..438ab8bd19 100644 --- a/maintenance/dumpInterwiki.inc +++ b/maintenance/dumpInterwiki.inc @@ -16,7 +16,7 @@ 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; @@ -92,7 +92,7 @@ function getRebuildInterwikiDump() { } # 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 ) { diff --git a/maintenance/rebuildInterwiki.inc b/maintenance/rebuildInterwiki.inc index a14f889799..4daabc3f1d 100644 --- a/maintenance/rebuildInterwiki.inc +++ b/maintenance/rebuildInterwiki.inc @@ -16,7 +16,7 @@ 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; @@ -98,7 +98,7 @@ function makeInterwikiSQL( $destDir ) { } # 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 ) {