https://www.mediawiki.org/wiki/Special:Code/MediaWiki/113157

Revision: 113157
Author:   reedy
Date:     2012-03-06 17:36:43 +0000 (Tue, 06 Mar 2012)
Log Message:
-----------
MFT r112563, r112566, r112838, r112872, r112873, r112988, r113001, r113024, 
r113039, r113046, r113099

Modified Paths:
--------------
    branches/REL1_19/phase3/includes/Block.php
    branches/REL1_19/phase3/includes/DefaultSettings.php
    branches/REL1_19/phase3/includes/cache/MessageCache.php
    branches/REL1_19/phase3/includes/filerepo/backend/FileBackend.php
    branches/REL1_19/phase3/includes/parser/Parser.php
    branches/REL1_19/phase3/includes/specials/SpecialRecentchanges.php
    branches/REL1_19/phase3/includes/specials/SpecialUserlogin.php
    branches/REL1_19/phase3/languages/messages/MessagesSa.php
    branches/REL1_19/phase3/maintenance/parse.php
    branches/REL1_19/phase3/tests/phpunit/includes/BlockTest.php
    branches/REL1_19/phase3/tests/phpunit/includes/TitlePermissionTest.php

Property Changed:
----------------
    branches/REL1_19/phase3/
    branches/REL1_19/phase3/includes/
    branches/REL1_19/phase3/includes/cache/MessageCache.php
    branches/REL1_19/phase3/includes/specials/
    branches/REL1_19/phase3/languages/


Property changes on: branches/REL1_19/phase3
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/JSTesting:100352-107913
/branches/REL1_15/phase3:51646
/branches/REL1_17/phase3:81445,81448
/branches/new-installer/phase3:43664-66004
/branches/sqlite:58211-58321
/branches/wmf/1.18wmf1:97508,111667
/trunk/phase3:111002,111029,111034,111062,111067,111076,111085,111128,111144,111251,111380,111427,111478,111571,111574,111580,111597,111658,111673,111695,111697,111809,111832,111983,112021,112034,112037,112045-112046,112049,112061,112066,112079,112128,112152,112169-112170,112172-112173,112179,112184,112290,112313,112347,112374,112383-112384,112400,112408,112451,112456,112474,112526,112533-112534,112538,112567,112700,112750,112855,113085
   + /branches/JSTesting:100352-107913
/branches/REL1_15/phase3:51646
/branches/REL1_17/phase3:81445,81448
/branches/new-installer/phase3:43664-66004
/branches/sqlite:58211-58321
/branches/wmf/1.18wmf1:97508,111667
/trunk/phase3:111002,111029,111034,111062,111067,111076,111085,111128,111144,111251,111380,111427,111478,111571,111574,111580,111597,111658,111673,111695,111697,111809,111832,111983,112021,112034,112037,112045-112046,112049,112061,112066,112079,112128,112152,112169-112170,112172-112173,112179,112184,112290,112313,112347,112374,112383-112384,112400,112408,112451,112456,112474,112526,112533-112534,112538,112563,112566-112567,112700,112750,112838,112855,112872-112873,112988,113001,113024,113039,113046,113085,113099


Property changes on: branches/REL1_19/phase3/includes
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/JSTesting/includes:100352-107913
/branches/REL1_15/phase3/includes:51646
/branches/new-installer/phase3/includes:43664-66004
/branches/sqlite/includes:58211-58321
/branches/wmf/1.18wmf1/includes:97508,111667
/branches/wmf-deployment/includes:53381
/trunk/phase3/includes:111029,111034,111067,111085,111128,111144,111251,111380,111427,111571,111574,111597,111658,111673,111695,111697,111809,111832,111983,112021,112034,112037,112045-112046,112049,112061,112066,112079,112128,112152,112184,112290,112313,112347,112374,112383,112408,112451,112456,112474,112526,112533-112534,112538,112567,112700,112750,112855
   + /branches/JSTesting/includes:100352-107913
/branches/REL1_15/phase3/includes:51646
/branches/new-installer/phase3/includes:43664-66004
/branches/sqlite/includes:58211-58321
/branches/wmf/1.18wmf1/includes:97508,111667
/branches/wmf-deployment/includes:53381
/trunk/phase3/includes:111029,111034,111067,111085,111128,111144,111251,111380,111427,111571,111574,111597,111658,111673,111695,111697,111809,111832,111983,112021,112034,112037,112045-112046,112049,112061,112066,112079,112128,112152,112184,112290,112313,112347,112374,112383,112408,112451,112456,112474,112526,112533-112534,112538,112563,112566-112567,112700,112750,112838,112855,112872-112873,112988,113001,113024,113039,113046,113099

Modified: branches/REL1_19/phase3/includes/Block.php
===================================================================
--- branches/REL1_19/phase3/includes/Block.php  2012-03-06 17:35:46 UTC (rev 
113156)
+++ branches/REL1_19/phase3/includes/Block.php  2012-03-06 17:36:43 UTC (rev 
113157)
@@ -71,6 +71,9 @@
                }
 
                $this->setTarget( $address );
+               if ( $this->target instanceof User && $user ) {
+                       $this->target->setId( $user ); // needed for foreign 
users
+               }
                if ( $by ) { // local user
                        $this->setBlocker( User::newFromID( $by ) );
                } else { // foreign user

Modified: branches/REL1_19/phase3/includes/DefaultSettings.php
===================================================================
--- branches/REL1_19/phase3/includes/DefaultSettings.php        2012-03-06 
17:35:46 UTC (rev 113156)
+++ branches/REL1_19/phase3/includes/DefaultSettings.php        2012-03-06 
17:36:43 UTC (rev 113157)
@@ -2176,6 +2176,17 @@
  */
 $wgLocalTZoffset = null;
 
+/**
+ * If set to true, this will roll back a few bug fixes introduced in 1.19,
+ * emulating the 1.18 behaviour, to avoid introducing bug 34832. In 1.19,
+ * language variant conversion is disabled in interface messages. Setting this
+ * to true re-enables it.
+ *
+ * This variable should be removed (implicitly false) in 1.20 or earlier.
+ */
+$wgBug34832TransitionalRollback = true;
+
+
 /** @} */ # End of language/charset settings
 
 /*************************************************************************//**

Modified: branches/REL1_19/phase3/includes/cache/MessageCache.php
===================================================================
--- branches/REL1_19/phase3/includes/cache/MessageCache.php     2012-03-06 
17:35:46 UTC (rev 113156)
+++ branches/REL1_19/phase3/includes/cache/MessageCache.php     2012-03-06 
17:36:43 UTC (rev 113157)
@@ -833,14 +833,9 @@
 
                $parser = $this->getParser();
                $popts = $this->getParserOptions();
+               $popts->setInterfaceMessage( $interface );
+               $popts->setTargetLanguage( $language );
 
-               if ( $interface ) {
-                       $popts->setInterfaceMessage( true );
-               }
-               if ( $language !== null ) {
-                       $popts->setTargetLanguage( $language );
-               }
-
                wfProfileIn( __METHOD__ );
                if ( !$title || !$title instanceof Title ) {
                        global $wgTitle;


Property changes on: branches/REL1_19/phase3/includes/cache/MessageCache.php
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/JSTesting/includes/cache/MessageCache.php:100352-107913
/branches/REL1_15/phase3/includes/cache/MessageCache.php:51646
/branches/new-installer/phase3/includes/cache/MessageCache.php:43664-66004
/branches/sqlite/includes/cache/MessageCache.php:58211-58321
/branches/wmf/1.17wmf1/includes/MessageCache.php:82361
/branches/wmf/1.18wmf1/includes/cache/MessageCache.php:97508
/branches/wmf-deployment/includes/cache/MessageCache.php:53381
   + /branches/JSTesting/includes/cache/MessageCache.php:100352-107913
/branches/REL1_15/phase3/includes/cache/MessageCache.php:51646
/branches/new-installer/phase3/includes/cache/MessageCache.php:43664-66004
/branches/sqlite/includes/cache/MessageCache.php:58211-58321
/branches/wmf/1.17wmf1/includes/MessageCache.php:82361
/branches/wmf/1.18wmf1/includes/cache/MessageCache.php:97508
/branches/wmf-deployment/includes/cache/MessageCache.php:53381
/trunk/phase3/includes/cache/MessageCache.php:112872-112873,112988,113001,113024,113039,113046,113099

Modified: branches/REL1_19/phase3/includes/filerepo/backend/FileBackend.php
===================================================================
--- branches/REL1_19/phase3/includes/filerepo/backend/FileBackend.php   
2012-03-06 17:35:46 UTC (rev 113156)
+++ branches/REL1_19/phase3/includes/filerepo/backend/FileBackend.php   
2012-03-06 17:36:43 UTC (rev 113157)
@@ -51,6 +51,7 @@
         * $config includes:
         *     'name'        : The unique name of this backend.
         *                     This should consist of alphanumberic, '-', and 
'_' characters.
+        *                     This name should not be changed after use.
         *     'wikiId'      : Prefix to container names that is unique to this 
wiki.
         *                     This should consist of alphanumberic, '-', and 
'_' characters.
         *     'lockManager' : Registered name of a file lock manager to use.
@@ -61,6 +62,9 @@
         */
        public function __construct( array $config ) {
                $this->name = $config['name'];
+               if ( !preg_match( '!^[a-zA-Z0-9-_]{1,255}$!', $this->name ) ) {
+                       throw new MWException( "Backend name `{$this->name}` is 
invalid." );
+               }
                $this->wikiId = isset( $config['wikiId'] )
                        ? $config['wikiId']
                        : wfWikiID(); // e.g. "my_wiki-en_"

Modified: branches/REL1_19/phase3/includes/parser/Parser.php
===================================================================
--- branches/REL1_19/phase3/includes/parser/Parser.php  2012-03-06 17:35:46 UTC 
(rev 113156)
+++ branches/REL1_19/phase3/includes/parser/Parser.php  2012-03-06 17:36:43 UTC 
(rev 113157)
@@ -370,13 +370,16 @@
                 */
                if ( !( $wgDisableLangConversion
                                || isset( 
$this->mDoubleUnderscores['nocontentconvert'] )
-                               || $this->mTitle->isConversionTable()
-                               || $this->mOptions->getInterfaceMessage() ) ) {
-
-                       # The position of the convert() call should not be 
changed. it
-                       # assumes that the links are all replaced and the only 
thing left
-                       # is the <nowiki> mark.
-                       $text = $this->getFunctionLang()->convert( $text );
+                               || $this->mTitle->isConversionTable() ) )
+               {
+                       # Run convert unconditionally in 1.18-compatible mode
+                       global $wgBug34832TransitionalRollback;
+                       if ( $wgBug34832TransitionalRollback || 
!$this->mOptions->getInterfaceMessage() ) {
+                               # The position of the convert() call should not 
be changed. it
+                               # assumes that the links are all replaced and 
the only thing left
+                               # is the <nowiki> mark.
+                               $text = $this->getConverterLanguage()->convert( 
$text );
+                       }
                }
 
                /**
@@ -392,11 +395,11 @@
                                || isset( 
$this->mDoubleUnderscores['notitleconvert'] )
                                || $this->mOutput->getDisplayTitle() !== false 
) )
                {
-                       $convruletitle = 
$this->getFunctionLang()->getConvRuleTitle();
+                       $convruletitle = 
$this->getConverterLanguage()->getConvRuleTitle();
                        if ( $convruletitle ) {
                                $this->mOutput->setTitleText( $convruletitle );
                        } else {
-                               $titleText = 
$this->getFunctionLang()->convertTitle( $title );
+                               $titleText = 
$this->getConverterLanguage()->convertTitle( $title );
                                $this->mOutput->setTitleText( $titleText );
                        }
                }
@@ -692,9 +695,18 @@
        }
 
        /**
+        * Get a language object for use in parser functions such as 
{{FORMATNUM:}}
         * @return Language
         */
        function getFunctionLang() {
+               return $this->getTargetLanguage();
+       }
+
+       /**
+        * Get the target language for the content being parsed. This is 
usually the 
+        * language that the content is in. 
+        */
+       function getTargetLanguage() {
                $target = $this->mOptions->getTargetLanguage();
                if ( $target !== null ) {
                        return $target;
@@ -707,6 +719,18 @@
        }
 
        /**
+        * Get the language object for language conversion
+        */
+       function getConverterLanguage() {
+               global $wgBug34832TransitionalRollback, $wgContLang;
+               if ( $wgBug34832TransitionalRollback ) {
+                       return $wgContLang;
+               } else {
+                       return $this->getTargetLanguage();
+               }
+       }
+
+       /**
         * Get a User object either from $this->mUser, if set, or from the
         * ParserOptions object otherwise
         *
@@ -1225,7 +1249,8 @@
                $text = $this->maybeMakeExternalImage( $url );
                if ( $text === false ) {
                        # Not an image, make a link
-                       $text = Linker::makeExternalLink( $url, 
$this->getFunctionLang()->markNoConversion($url), true, 'free',
+                       $text = Linker::makeExternalLink( $url, 
+                               
$this->getConverterLanguage()->markNoConversion($url), true, 'free',
                                $this->getExternalLinkAttribs( $url ) );
                        # Register it in the output object...
                        # Replace unnecessary URL escape codes with their 
equivalent characters
@@ -1489,7 +1514,7 @@
                        # No link text, e.g. [http://domain.tld/some.link]
                        if ( $text == '' ) {
                                # Autonumber
-                               $langObj = $this->getFunctionLang();
+                               $langObj = $this->getTargetLanguage();
                                $text = '[' . $langObj->formatNum( 
++$this->mAutonumber ) . ']';
                                $linktype = 'autonumber';
                        } else {
@@ -1498,7 +1523,7 @@
                                list( $dtrail, $trail ) = Linker::splitTrail( 
$trail );
                        }
 
-                       $text = $this->getFunctionLang()->markNoConversion( 
$text );
+                       $text = 
$this->getConverterLanguage()->markNoConversion( $text );
 
                        $url = Sanitizer::cleanUrl( $url );
 
@@ -1678,7 +1703,7 @@
                $line = $a->current(); # Workaround for broken 
ArrayIterator::next() that returns "void"
                $s = substr( $s, 1 );
 
-               $useLinkPrefixExtension = 
$this->getFunctionLang()->linkPrefixExtension();
+               $useLinkPrefixExtension = 
$this->getTargetLanguage()->linkPrefixExtension();
                $e2 = null;
                if ( $useLinkPrefixExtension ) {
                        # Match the end of a line for a word that's not 
followed by whitespace,
@@ -1704,8 +1729,9 @@
                        $prefix = '';
                }
 
-               if ( $this->getFunctionLang()->hasVariants() ) {
-                       $selflink = 
$this->getFunctionLang()->autoConvertToAllVariants( 
$this->mTitle->getPrefixedText() );
+               if ( $this->getConverterLanguage()->hasVariants() ) {
+                       $selflink = 
$this->getConverterLanguage()->autoConvertToAllVariants( 
+                               $this->mTitle->getPrefixedText() );
                } else {
                        $selflink = array( $this->mTitle->getPrefixedText() );
                }
@@ -1923,7 +1949,7 @@
                                        }
                                        $sortkey = 
Sanitizer::decodeCharReferences( $sortkey );
                                        $sortkey = str_replace( "\n", '', 
$sortkey );
-                                       $sortkey = 
$this->getFunctionLang()->convertCategoryKey( $sortkey );
+                                       $sortkey = 
$this->getConverterLanguage()->convertCategoryKey( $sortkey );
                                        $this->mOutput->addCategory( 
$nt->getDBkey(), $sortkey );
 
                                        /**
@@ -3022,7 +3048,7 @@
         * @private
         */
        function braceSubstitution( $piece, $frame ) {
-               global $wgNonincludableNamespaces;
+               global $wgNonincludableNamespaces, $wgContLang;
                wfProfileIn( __METHOD__ );
                wfProfileIn( __METHOD__.'-setup' );
 
@@ -3125,7 +3151,7 @@
                                        $function = 
$this->mFunctionSynonyms[1][$function];
                                } else {
                                        # Case insensitive functions
-                                       $function = 
$this->getFunctionLang()->lc( $function );
+                                       $function = $wgContLang->lc( $function 
);
                                        if ( isset( 
$this->mFunctionSynonyms[0][$function] ) ) {
                                                $function = 
$this->mFunctionSynonyms[0][$function];
                                        } else {
@@ -3201,8 +3227,8 @@
                        if ( $title ) {
                                $titleText = $title->getPrefixedText();
                                # Check for language variants if the template 
is not found
-                               if ( $this->getFunctionLang()->hasVariants() && 
$title->getArticleID() == 0 ) {
-                                       
$this->getFunctionLang()->findVariantLink( $part1, $title, true );
+                               if ( 
$this->getConverterLanguage()->hasVariants() && $title->getArticleID() == 0 ) {
+                                       
$this->getConverterLanguage()->findVariantLink( $part1, $title, true );
                                }
                                # Do recursion depth check
                                $limit = $this->mOptions->getMaxTemplateDepth();
@@ -4033,7 +4059,7 @@
                                        if ( $dot ) {
                                                $numbering .= '.';
                                        }
-                                       $numbering .= 
$this->getFunctionLang()->formatNum( $sublevelCount[$i] );
+                                       $numbering .= 
$this->getTargetLanguage()->formatNum( $sublevelCount[$i] );
                                        $dot = 1;
                                }
                        }


Property changes on: branches/REL1_19/phase3/includes/specials
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/JSTesting/includes/specials:100352-107913
/branches/REL1_15/phase3/includes/specials:51646
/branches/sqlite/includes/specials:58211-58321
/branches/wmf-deployment/includes/specials:53381,56967
/trunk/phase3/includes/specials:111085,111128,111144,111251
   + /branches/JSTesting/includes/specials:100352-107913
/branches/REL1_15/phase3/includes/specials:51646
/branches/sqlite/includes/specials:58211-58321
/branches/wmf-deployment/includes/specials:53381,56967
/trunk/phase3/includes/specials:111085,111128,111144,111251,112872-112873,112988,113001,113024,113039,113046,113099

Modified: branches/REL1_19/phase3/includes/specials/SpecialRecentchanges.php
===================================================================
--- branches/REL1_19/phase3/includes/specials/SpecialRecentchanges.php  
2012-03-06 17:35:46 UTC (rev 113156)
+++ branches/REL1_19/phase3/includes/specials/SpecialRecentchanges.php  
2012-03-06 17:36:43 UTC (rev 113157)
@@ -633,10 +633,13 @@
        function setTopText( FormOptions $opts ) {
                global $wgContLang;
                $this->getOutput()->addWikiText(
-               Html::rawElement( 'p',
-                       array( 'lang' => $wgContLang->getCode(), 'dir' => 
$wgContLang->getDir() ),
-                       "\n" . wfMsgForContentNoTrans( 'recentchangestext' ) . 
"\n"
-               ), false );
+                       Html::rawElement( 'p',
+                               array( 'lang' => $wgContLang->getCode(), 'dir' 
=> $wgContLang->getDir() ),
+                               "\n" . wfMsgForContentNoTrans( 
'recentchangestext' ) . "\n"
+                       ), 
+                       /* $lineStart */ false,
+                       /* $interface */ false
+               );
        }
 
        /**

Modified: branches/REL1_19/phase3/includes/specials/SpecialUserlogin.php
===================================================================
--- branches/REL1_19/phase3/includes/specials/SpecialUserlogin.php      
2012-03-06 17:35:46 UTC (rev 113156)
+++ branches/REL1_19/phase3/includes/specials/SpecialUserlogin.php      
2012-03-06 17:36:43 UTC (rev 113157)
@@ -797,7 +797,7 @@
        function resetLoginForm( $error ) {
                $this->getOutput()->addHTML( Xml::element('p', array( 'class' 
=> 'error' ), $error ) );
                $reset = new SpecialChangePassword();
-               $reset->setContext( $this );
+               $reset->setContext( $this->getContext() );
                $reset->execute( null );
        }
 


Property changes on: branches/REL1_19/phase3/languages
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/JSTesting/languages:100352-107913
/branches/REL1_15/phase3/languages:51646
/branches/REL1_17/phase3/languages:81445,81448
/branches/new-installer/phase3/languages:43664-66004
/branches/nikola/phase3/languages:85224,85239,85308
/branches/sqlite/languages:58211-58321
/trunk/phase3/languages:112049,112061,112066,112079,112128
   + /branches/JSTesting/languages:100352-107913
/branches/REL1_15/phase3/languages:51646
/branches/REL1_17/phase3/languages:81445,81448
/branches/new-installer/phase3/languages:43664-66004
/branches/nikola/phase3/languages:85224,85239,85308
/branches/sqlite/languages:58211-58321
/trunk/phase3/languages:112049,112061,112066,112079,112128,113039,113046,113099

Modified: branches/REL1_19/phase3/languages/messages/MessagesSa.php
===================================================================
--- branches/REL1_19/phase3/languages/messages/MessagesSa.php   2012-03-06 
17:35:46 UTC (rev 113156)
+++ branches/REL1_19/phase3/languages/messages/MessagesSa.php   2012-03-06 
17:36:43 UTC (rev 113157)
@@ -536,7 +536,6 @@
 'versionrequiredtext' => 'एतत्पृष्ठं प्रयोक्तुं मीडियाविकि इत्येतस्य $1तमा 
आवृत्तिः आवश्यकी। पश्यतु [[Special:Version|आवृत्ति-सूचिका]]',
 
 'ok'                      => 'अस्तु',
-'pagetitle'               => '',
 'retrievedfrom'           => '"$1" इत्यस्माद् उद्धृतम्',
 'youhavenewmessages'      => 'भवदर्थम् $1 सन्ति। ($2).',
 'newmessageslink'         => 'नूतनाः सन्देशाः',

Modified: branches/REL1_19/phase3/maintenance/parse.php
===================================================================
--- branches/REL1_19/phase3/maintenance/parse.php       2012-03-06 17:35:46 UTC 
(rev 113156)
+++ branches/REL1_19/phase3/maintenance/parse.php       2012-03-06 17:36:43 UTC 
(rev 113157)
@@ -14,8 +14,8 @@
  *
  * Example2:
  * @code
- * $ echo "'''bold'''" > /tmp/foo
- * $ php parse.php --file /tmp/foo
+ * $ echo "'''bold'''" > /tmp/foo.txt
+ * $ php parse.php /tmp/foo.txt
  * <p><b>bold</b>
  * </p>$
  * @endcode
@@ -37,10 +37,10 @@
        protected $parser;
 
        public function __construct() {
+               parent::__construct();
                $this->mDescription = "Parse a given wikitext";
                $this->addOption( 'title', 'Title name for the given wikitext 
(Default: \'CLIParser\')', false, true );
-               $this->addOption( 'file', 'File containing wikitext (Default: 
stdin)', false, true );
-               parent::__construct();
+               $this->addArg( 'file', 'File containing wikitext (Default: 
stdin)', false );
        }
 
        public function execute() {
@@ -57,13 +57,19 @@
        }
 
        /**
-        * Get wikitext from --file or from STDIN
+        * Get wikitext from a the file passed as argument or STDIN
         * @return string Wikitext
         */
        protected function Wikitext() {
-               return file_get_contents(
-                       $this->getOption( 'file', 'php://stdin' )
-               );
+
+               $php_stdin  = 'php://stdin';
+               $input_file = $this->getArg( 0, $php_stdin );
+
+               if( $input_file === $php_stdin ) {
+                       $this->error( basename(__FILE__) .": warning: reading 
wikitext from STDIN\n" );
+               }
+
+               return file_get_contents( $input_file );
        }
 
        protected function initParser() {

Modified: branches/REL1_19/phase3/tests/phpunit/includes/BlockTest.php
===================================================================
--- branches/REL1_19/phase3/tests/phpunit/includes/BlockTest.php        
2012-03-06 17:35:46 UTC (rev 113156)
+++ branches/REL1_19/phase3/tests/phpunit/includes/BlockTest.php        
2012-03-06 17:36:43 UTC (rev 113157)
@@ -35,7 +35,7 @@
                        $oldBlock->delete();
                }
 
-               $this->block = new Block( 'UTBlockee', 1, 0,
+               $this->block = new Block( 'UTBlockee', $user->getID(), 0,
                        'Parce que', 0, false, time() + 100500
                );
                $this->madeAt = wfTimestamp( TS_MW );

Modified: branches/REL1_19/phase3/tests/phpunit/includes/TitlePermissionTest.php
===================================================================
--- branches/REL1_19/phase3/tests/phpunit/includes/TitlePermissionTest.php      
2012-03-06 17:35:46 UTC (rev 113156)
+++ branches/REL1_19/phase3/tests/phpunit/includes/TitlePermissionTest.php      
2012-03-06 17:36:43 UTC (rev 113157)
@@ -629,7 +629,7 @@
                $prev = time();
                $now = time() + 120;
                $this->user->mBlockedby = $this->user->getId();
-               $this->user->mBlock = new Block( '127.0.8.1', 
$this->user->getId(), $this->user->getId(),
+               $this->user->mBlock = new Block( '127.0.8.1', 0, 
$this->user->getId(),
                                                                                
'no reason given', $prev + 3600, 1, 0 );
                $this->user->mBlock->mTimestamp = 0;
                $this->assertEquals( array( array( 'autoblockedtext',
@@ -646,7 +646,7 @@
                global $wgLocalTZoffset;
                $wgLocalTZoffset = -60;
                $this->user->mBlockedby = $this->user->getName();
-               $this->user->mBlock = new Block( '127.0.8.1', 2, 1, 'no reason 
given', $now, 0, 10 );
+               $this->user->mBlock = new Block( '127.0.8.1', 0, 1, 'no reason 
given', $now, 0, 10 );
                $this->assertEquals( array( array( 'blockedtext',
                        '[[User:Useruser|Useruser]]', 'no reason given', 
'127.0.0.1',
                        'Useruser', null, '23:00, 31 December 1969', 
'127.0.8.1',


_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to