Fix #1 for r70970: Make UploadFromUrlTestSuite initialize a User instead of StubUser
authorChad Horohoe <demon@users.mediawiki.org>
Fri, 13 Aug 2010 14:36:59 +0000 (14:36 +0000)
committerChad Horohoe <demon@users.mediawiki.org>
Fri, 13 Aug 2010 14:36:59 +0000 (14:36 +0000)
includes/specials/SpecialVersion.php
languages/messages/MessagesEn.php
maintenance/language/messages.inc
maintenance/tests/UploadFromUrlTestSuite.php

index cca95a0..3c6ef10 100644 (file)
@@ -70,33 +70,22 @@ class SpecialVersion extends SpecialPage {
         * @return string
         */
        private static function getMediaWikiCredits() {
+               global $wgLang;
+
+               $authorList = array( 'Magnus Manske', 'Brion Vibber', 'Lee Daniel Crocker',
+                       'Tim Starling', 'Erik Möller', 'Gabriel Wicke', 'Ævar Arnfjörð Bjarmason',
+                       'Niklas Laxström', 'Domas Mituzas', 'Rob Church', 'Yuri Astrakhan',
+                       'Aryeh Gregor', 'Aaron Schulz', 'Andrew Garrett', 'Raimond Spekking',
+                       'Alexandre Emsenhuber', 'Siebrand Mazeland', 'Chad Horohoe', 'others'
+               );
                $ret = Xml::element( 'h2', array( 'id' => 'mw-version-license' ), wfMsg( 'version-license' ) );
 
                // This text is always left-to-right.
-               $ret .= '<div dir="ltr">';
+               $ret .= '<div>';
                $ret .= "__NOTOC__
-               This wiki is powered by '''[http://www.mediawiki.org/ MediaWiki]''',
-               copyright © 2001-2010 Magnus Manske, Brion Vibber, Lee Daniel Crocker,
-               Tim Starling, Erik Möller, Gabriel Wicke, Ævar Arnfjörð Bjarmason,
-               Niklas Laxström, Domas Mituzas, Rob Church, Yuri Astrakhan, Aryeh Gregor,
-               Aaron Schulz, Andrew Garrett, Raimond Spekking, Alexandre Emsenhuber,
-               Siebrand Mazeland, Chad Horohoe and others.
-
-               MediaWiki is free software; you can redistribute it and/or modify
-               it under the terms of the GNU General Public License as published by
-               the Free Software Foundation; either version 2 of the License, or
-               (at your option) any later version.
-
-               MediaWiki is distributed in the hope that it will be useful,
-               but WITHOUT ANY WARRANTY; without even the implied warranty of
-               MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-               GNU General Public License for more details.
-
-               You should have received [{{SERVER}}{{SCRIPTPATH}}/COPYING a copy of the GNU General Public License]
-               along with this program; if not, write to the Free Software
-               Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
-               or [http://www.gnu.org/licenses/old-licenses/gpl-2.0.html read it online].
-               ";
+               " . wfMsg( 'version-poweredby-credits', date( 'Y' ),
+                               $wgLang->listToText( $authorList ) ) . "\n
+               " . wfMsg( 'version-license-info' );
                $ret .= '</div>';
 
                return str_replace( "\t\t", '', $ret ) . "\n";
index 674972a..5359c77 100644 (file)
@@ -4242,6 +4242,22 @@ You can also [[Special:Watchlist/edit|use the standard editor]].',
 'version-version'                  => '(Version $1)',
 'version-svn-revision'             => '(r$2)', # only translate this message to other languages if you have to change it
 'version-license'                  => 'License',
+'version-poweredby-credits'        => "This wiki is powered by '''[http://www.mediawiki.org/ MediaWiki]''', copyright © 2001-$1 $2.", // $1 is the current year, $2 is the list of authors
+'version-license-info'             => "MediaWiki is free software; you can redistribute it and/or modify
+               it under the terms of the GNU General Public License as published by
+               the Free Software Foundation; either version 2 of the License, or
+               (at your option) any later version.
+
+               MediaWiki is distributed in the hope that it will be useful,
+               but WITHOUT ANY WARRANTY; without even the implied warranty of
+               MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+               GNU General Public License for more details.
+
+               You should have received [{{SERVER}}{{SCRIPTPATH}}/COPYING a copy of the GNU General Public License]
+               along with this program; if not, write to the Free Software
+               Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
+               or [http://www.gnu.org/licenses/old-licenses/gpl-2.0.html read it online].
+               ",
 'version-software'                 => 'Installed software',
 'version-software-product'         => 'Product',
 'version-software-version'         => 'Version',
index ee8cfed..ab7e69b 100644 (file)
@@ -3137,6 +3137,8 @@ $wgMessageStructure = array(
                'version-version',
                'version-svn-revision',
                'version-license',
+               'version-poweredby-credits',
+               'version-license-info',
                'version-software',
                'version-software-product',
                'version-software-version',
index 06bd997..a439fd9 100644 (file)
@@ -46,7 +46,7 @@ class UploadFromUrlTestSuite extends PHPUnit_Framework_TestSuite
                $parserMemc =& wfGetParserCacheStorage();
 
                //$wgContLang = new StubContLang;
-               $wgUser = new StubUser;
+               $wgUser = new User;
                $wgLang = new StubUserLang;
                $wgOut = new StubObject( 'wgOut', 'OutputPage' );
                $wgParser = new StubObject( 'wgParser', $wgParserConf['class'], array( $wgParserConf ) );