Revert r69841, r69882, r69892, r69896, r69910 in phase3/maintenance/language because...
authorSiebrand Mazeland <siebrand@users.mediawiki.org>
Mon, 26 Jul 2010 20:29:55 +0000 (20:29 +0000)
committerSiebrand Mazeland <siebrand@users.mediawiki.org>
Mon, 26 Jul 2010 20:29:55 +0000 (20:29 +0000)
This prevented message updates by Raymond from translatewiki.net.

Reported issues:
* Warning: in_array() expects parameter 2 to be array, null given in maintenance\language\languages.inc on line 173
* Warning: in_array() expects parameter 2 to be array, null given in maintenance\language\languages.inc on line 175
* Warning: in_array(): Wrong datatype for second argument in phase3\maintenance\language\languages.inc on line 175

maintenance/language/StatOutputs.php
maintenance/language/checkLanguage.inc
maintenance/language/diffLanguage.php
maintenance/language/dumpMessages.php
maintenance/language/languages.inc
maintenance/language/writeMessagesArray.inc

index c1d6101..7d69bf7 100644 (file)
@@ -31,6 +31,7 @@ class statsOutput {
 /** Outputs WikiText */
 class wikiStatsOutput extends statsOutput {
        function heading() {
+               global $IP;
                $version = SpecialVersion::getVersion( 'nodb' );
                echo "'''Statistics are based on:''' <code>" . $version . "</code>\n\n";
                echo "'''Note:''' These statistics can be generated by running <code>php maintenance/language/transstat.php</code>.\n\n";
@@ -66,7 +67,7 @@ class wikiStatsOutput extends statsOutput {
                $blue = '00';
                $color = $red . $green . $blue;
 
-               $percent = parent::formatPercent( $subset, $total, $revert, $accuracy );
+               $percent = statsOutput::formatPercent( $subset, $total, $revert, $accuracy );
                return 'bgcolor="#' . $color . '"|' . $percent;
        }
 }
index 13fbdae..765c2b7 100644 (file)
@@ -383,7 +383,7 @@ ENDS;
         * @return The checks results as wiki text.
         */
        function outputWiki() {
-               global $wgContLang;
+               global $wgContLang, $IP;
                $detailText = '';
                $rows[] = '! Language !! Code !! Total !! ' . implode( ' !! ', array_diff( $this->checks, $this->nonMessageChecks() ) );
                foreach ( $this->results as $code => $results ) {
index 45357b6..4ead2ce 100644 (file)
@@ -75,6 +75,7 @@ function getMediawikiMessages( $languageCode = 'En' ) {
 
        $foo = "wgAllMessages$languageCode";
        global $$foo;
+       global $wgSkinNamesEn; // potentially unused global declaration?
 
        // it might already be loaded in LocalSettings.php
        if ( !isset( $$foo ) ) {
index 9c69ba0..c83e719 100644 (file)
@@ -31,7 +31,6 @@ class DumpMessages extends Maintenance {
        }
        
        public function execute() {
-               global $wgVersion;
                $messages = array();
                foreach ( array_keys( Language::getMessagesFor( 'en' ) ) as $key ) {
                        $messages[$key] = wfMsg( $key );
index 47373a2..9846429 100644 (file)
@@ -32,9 +32,6 @@ class languages {
         */
        function __construct( $exif = true ) {
                require( dirname(__FILE__) . '/messageTypes.inc' );
-
-               global $wgIgnoredMessages, $wgOptionalMessages, $wgEXIFMessages;
-
                $this->mIgnoredMessages = $wgIgnoredMessages;
                if ( $exif ) {
                        $this->mOptionalMessages = array_merge( $wgOptionalMessages );
index 4e64dcb..e3a48ab 100644 (file)
@@ -80,8 +80,6 @@ class MessageWriter {
                # Load messages
                $dir = $prefix ? $prefix : dirname( __FILE__ );
 
-               global $wgMessageStructure, $wgBlockComments, $wgIgnoredMessages, $wgOptionalMessages;
-
                require( $dir . '/messages.inc' );
                self::$messageStructure = $wgMessageStructure;
                self::$blockComments = $wgBlockComments;