http://www.mediawiki.org/wiki/Special:Code/MediaWiki/60651

Revision: 60651
Author:   siebrand
Date:     2010-01-05 09:34:42 +0000 (Tue, 05 Jan 2010)

Log Message:
-----------
Follow-up r60650: run stylize.php and remove trailing whitespace

Modified Paths:
--------------
    trunk/phase3/languages/LanguageConverter.php

Modified: trunk/phase3/languages/LanguageConverter.php
===================================================================
--- trunk/phase3/languages/LanguageConverter.php        2010-01-05 09:07:12 UTC 
(rev 60650)
+++ trunk/phase3/languages/LanguageConverter.php        2010-01-05 09:34:42 UTC 
(rev 60651)
@@ -173,7 +173,7 @@
                }
 
                // get language variant preference from logged in users
-               // Don't call this on stub objects because that causes infinite 
+               // Don't call this on stub objects because that causes infinite
                // recursion during initialisation
                if ( $fromUser && $wgUser->isLoggedIn() )  {
                        $this->mPreferredVariant = $wgUser->getOption( 
'variant' );
@@ -197,7 +197,7 @@
                        if ( $fromHeader && $acceptLanguage ) {
                                // explode by comma
                                $result = explode( ',', strtolower( 
$acceptLanguage ) );
-                               
+
                                $languages = array();
 
                                foreach ( $result as $elem ) {
@@ -242,7 +242,7 @@
                }
                return $this->mMainLanguageCode;
        }
-       
+
        /**
         * Caption convert, base on preg_replace_callback.
         *
@@ -318,11 +318,11 @@
 
                $ret = $this->translate( $m[0], $toVariant );
                $mstart = $m[1] + strlen( $m[0] );
-               
+
                // enable convertsion of '<img alt="xxxx" ... '
                // or '<span title="xxxx" ... '
                $captionpattern  = '/\s(title|alt)\s*=\s*"([\s\S]*?)"/';
-               
+
                $trtext = '';
                $trtextmark = "\0";
                $notrtext = array();
@@ -425,12 +425,12 @@
                                        $ret[$variant] .= $this->translate( 
$marked[1], $variant );
                                }
                        }
-                       
+
                }
 
                return $ret;
        }
-       
+
        /**
         * Prepare manual conversion table.
         * @private
@@ -491,7 +491,7 @@
 
                return $text;
        }
-       
+
        /**
         * Convert namespace.
         * @param string $title the title included namespace
@@ -517,7 +517,7 @@
         */
        function preConvertTitle( $text, $variant ) {
                $this->mTitleOriginal = $text;
-               
+
                $text = $this->convertNamespace( $text, $variant );
                $this->mTitleDisplay = $this->convert( $text );
        }
@@ -647,7 +647,7 @@
                $ns = NS_MAIN;
 
                if ( $disableLinkConversion ||
-                        ( !$ignoreOtherCond && 
+                        ( !$ignoreOtherCond &&
                           ( $isredir == 'no'
                                 || $action == 'edit'
                                 || $action == 'submit'
@@ -750,7 +750,7 @@
 
                        $this->postLoadTables();
                        $this->mTables[self::CACHE_VERSION_KEY] = true;
-                       
+
                        $wgMemc->set( $this->mCacheKey, $this->mTables, 43200 );
                        wfProfileOut( __METHOD__ . '-recache' );
                }
@@ -851,7 +851,7 @@
                $ret = array();
                foreach ( $blocks as $block ) {
                        $mappings = explode( $this->mMarkup['end'], $block, 2 );
-                       $stripped = str_replace( array( "'", '"', '*', '#' ), 
'', 
+                       $stripped = str_replace( array( "'", '"', '*', '#' ), 
'',
                                                                         
$mappings[0] );
                        $table = explode( ';', $stripped );
                        foreach ( $table as $t ) {
@@ -930,7 +930,7 @@
                return true;
        }
 
-       /** 
+       /**
         * Armour rendered math against conversion.
         * Wrap math into rawoutput -{R| math }- syntax.
         * @public
@@ -951,7 +951,7 @@
  */
 class ConverterRule {
        var $mText; // original text in -{text}-
-       var $mConverter; // LanguageConverter object 
+       var $mConverter; // LanguageConverter object
        var $mManualCodeError = '<strong class="error">code error!</strong>';
        var $mRuleDisplay = '';
        var $mRuleTitle = false;
@@ -966,7 +966,7 @@
         * Constructor
         *
         * @param string $text the text between -{ and }-
-        * @param object $converter a  LanguageConverter object 
+        * @param object $converter a  LanguageConverter object
         * @access public
         */
        function __construct( $text, $converter ) {
@@ -998,7 +998,7 @@
                }
                return false;
        }
-       
+
        /**
         * Parse flags with syntax -{FLAG| ... }-
         * @private
@@ -1075,7 +1075,7 @@
                $this->mRules = $rules;
                $this->mFlags = $flags;
        }
-       
+
        /**
         * Generate conversion table.
         * @private
@@ -1175,7 +1175,7 @@
 
                if ( count( $bidtable ) + count( $unidtable ) == 0 ) {
                        return $this->mRules;
-               } elseif ( $doConvert ) { // the text converted 
+               } elseif ( $doConvert ) { // the text converted
                        // display current variant in bidirectional array
                        $disp = $this->getTextInBidtable( $variant );
                        // or display current variant in fallbacks
@@ -1222,7 +1222,7 @@
                                fill in the missing variants, if any,
                                with fallbacks */
                        if ( !array_key_exists( $v, $bidtable ) ) {
-                               $variantFallbacks = 
+                               $variantFallbacks =
                                        $this->mConverter->getVariantFallbacks( 
$v );
                                $vf = $this->getTextInBidtable( 
$variantFallbacks );
                                if ( $vf ) {
@@ -1232,11 +1232,11 @@
 
                        if ( array_key_exists( $v, $bidtable ) ) {
                                foreach ( $vmarked as $vo ) {
-                                       // use syntax: 
-{A|zh:WordZh;zh-tw:WordTw}- 
-                                       // or -{H|zh:WordZh;zh-tw:WordTw}- 
+                                       // use syntax: 
-{A|zh:WordZh;zh-tw:WordTw}-
+                                       // or -{H|zh:WordZh;zh-tw:WordTw}-
                                        // or -{-|zh:WordZh;zh-tw:WordTw}-
                                        // to introduce a custom mapping between
-                                       // words WordZh and WordTw in the whole 
text 
+                                       // words WordZh and WordTw in the whole 
text
                                        if ( $manLevel[$v] == 'bidirectional' ) 
{
                                                
$this->mConvTable[$v][$bidtable[$vo]] = $bidtable[$v];
                                        }
@@ -1271,7 +1271,7 @@
 
                // convert to specified variant
                // syntax: -{zh-hans;zh-hant[;...]|<text to convert>}-
-               if ( count( array_diff( $flags, $variants ) ) == 0 
+               if ( count( array_diff( $flags, $variants ) ) == 0
                         and count( $flags ) != 0 ) {
                        // check if current variant in flags
                        if ( in_array( $variant, $flags ) ) {
@@ -1297,7 +1297,7 @@
                }
 
                if ( !in_array( 'R', $flags ) || !in_array( 'N', $flags ) ) {
-                       // decode => HTML entities modified by 
Sanitizer::removeHTMLtags 
+                       // decode => HTML entities modified by 
Sanitizer::removeHTMLtags
                        $this->mRules = str_replace( '=&gt;', '=>', 
$this->mRules );
 
                        $this->parseRules();
@@ -1321,7 +1321,7 @@
                        $this->mRuleDisplay = $rules;
                } elseif ( in_array( 'N', $flags ) ) {
                        // proces N flag: output current variant name
-                       $this->mRuleDisplay = 
+                       $this->mRuleDisplay =
                                $this->mConverter->mVariantNames[ trim( $rules 
) ];
                } elseif ( in_array( 'D', $flags ) ) {
                        // proces D flag: output rules description
@@ -1347,10 +1347,10 @@
                if ( in_array( '+', $flags ) ) {
                        $this->mRulesAction = 'add';
                }
-               
+
                $this->generateConvTable();
        }
-       
+
        /**
         * @public
         */



_______________________________________________
MediaWiki-CVS mailing list
MediaWiki-CVS@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to