replacing some calls from deprecated global functions to new modularized functions
authorAlexandre Emsenhuber <ialex@users.mediawiki.org>
Wed, 5 Mar 2008 11:58:44 +0000 (11:58 +0000)
committerAlexandre Emsenhuber <ialex@users.mediawiki.org>
Wed, 5 Mar 2008 11:58:44 +0000 (11:58 +0000)
includes/HttpFunctions.php
maintenance/FiveUpgrade.inc
maintenance/dumpInterwiki.inc
maintenance/rebuildInterwiki.inc

index 6ea3abd..9ab7447 100644 (file)
@@ -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);
index 9a882bc..62574f1 100644 (file)
@@ -702,7 +702,7 @@ END;
                        'major'  => '',
                        'minor'  => '' );
 
-               $magic =& wfGetMimeMagic();
+               $magic = MimeMagic::singleton();
                $mime = $magic->guessMimeType( $filename, true );
                list( $info['major'], $info['minor'] ) = explode( '/', $mime );
 
index 9af6ccc..438ab8b 100644 (file)
@@ -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 ) {
index a14f889..4daabc3 100644 (file)
@@ -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 ) {