Merge "Simplify the logic to decide whether to show "variant" and "noconvertlink...
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Fri, 26 Apr 2013 15:12:38 +0000 (15:12 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Fri, 26 Apr 2013 15:12:38 +0000 (15:12 +0000)
213 files changed:
.gitignore
RELEASE-NOTES-1.22
includes/AjaxDispatcher.php
includes/Article.php
includes/Autopromote.php
includes/Block.php
includes/Collation.php
includes/EditPage.php
includes/FormOptions.php
includes/GlobalFunctions.php
includes/HTMLForm.php
includes/HttpFunctions.php
includes/Import.php
includes/MimeMagic.php
includes/PoolCounter.php
includes/RecentChange.php
includes/SkinLegacy.php
includes/SkinTemplate.php
includes/Title.php
includes/Wiki.php
includes/WikiPage.php
includes/api/ApiBase.php
includes/api/ApiEditPage.php
includes/api/ApiFormatXml.php
includes/api/ApiMain.php
includes/api/ApiPageSet.php
includes/api/ApiQueryBlocks.php
includes/api/ApiQueryDeletedrevs.php
includes/api/ApiQueryLogEvents.php
includes/api/ApiQueryRecentChanges.php
includes/api/ApiQueryRevisions.php
includes/api/ApiQueryUserContributions.php
includes/api/ApiQueryWatchlist.php
includes/api/ApiUpload.php
includes/db/Database.php
includes/db/DatabaseMssql.php
includes/db/DatabaseOracle.php
includes/db/DatabasePostgres.php
includes/diff/DairikiDiff.php
includes/filerepo/file/LocalFile.php
includes/installer/Installer.i18n.php
includes/installer/LocalSettingsGenerator.php
includes/installer/MysqlInstaller.php
includes/job/JobQueueDB.php
includes/logging/LogFormatter.php
includes/logging/LogPage.php
includes/media/BitmapMetadataHandler.php
includes/media/Exif.php
includes/media/FormatMetadata.php
includes/media/IPTC.php
includes/media/SVGMetadataExtractor.php
includes/media/XMP.php
includes/parser/CoreParserFunctions.php
includes/parser/DateFormatter.php
includes/parser/Parser.php
includes/search/SearchEngine.php
includes/search/SearchMySQL.php
includes/specials/SpecialUnblock.php
includes/specials/SpecialUpload.php
includes/specials/SpecialUserlogin.php
includes/specials/SpecialVersion.php
includes/specials/SpecialWatchlist.php
includes/templates/UsercreateVForm.php
languages/Language.php
languages/classes/LanguageKk.php
languages/messages/MessagesBa.php
languages/messages/MessagesBn.php
languages/messages/MessagesDa.php
languages/messages/MessagesDe.php
languages/messages/MessagesDiq.php
languages/messages/MessagesEn.php
languages/messages/MessagesEo.php
languages/messages/MessagesFr.php
languages/messages/MessagesHsb.php
languages/messages/MessagesIt.php
languages/messages/MessagesKiu.php
languages/messages/MessagesMk.php
languages/messages/MessagesMl.php
languages/messages/MessagesPms.php
languages/messages/MessagesQqq.php
languages/messages/MessagesRoa_tara.php
languages/messages/MessagesUk.php
languages/messages/MessagesVi.php
maintenance/backup.inc
maintenance/backupPrefetch.inc
maintenance/backupTextPass.inc
maintenance/getConfiguration.php
maintenance/language/checkLanguage.inc
maintenance/language/messageTypes.inc
maintenance/language/messages.inc
maintenance/mwdocgen.php
maintenance/oracle/tables.sql
maintenance/storage/checkStorage.php
skins/Vector.php
tests/RunSeleniumTests.php
tests/parser/parserTests.txt
tests/phpunit/MediaWikiPHPUnitCommand.php
tests/phpunit/MediaWikiTestCase.php
tests/phpunit/bootstrap.php
tests/phpunit/includes/ArticleTablesTest.php
tests/phpunit/includes/BlockTest.php
tests/phpunit/includes/CdbTest.php
tests/phpunit/includes/CollationTest.php
tests/phpunit/includes/DiffHistoryBlobTest.php
tests/phpunit/includes/FormOptionsInitializationTest.php
tests/phpunit/includes/GlobalFunctions/GlobalTest.php
tests/phpunit/includes/GlobalFunctions/GlobalWithDBTest.php
tests/phpunit/includes/GlobalFunctions/wfAssembleUrlTest.php
tests/phpunit/includes/GlobalFunctions/wfBaseConvertTest.php
tests/phpunit/includes/GlobalFunctions/wfExpandUrlTest.php
tests/phpunit/includes/GlobalFunctions/wfGetCallerTest.php
tests/phpunit/includes/GlobalFunctions/wfShorthandToIntegerTest.php
tests/phpunit/includes/GlobalFunctions/wfTimestampTest.php
tests/phpunit/includes/HooksTest.php
tests/phpunit/includes/HtmlTest.php
tests/phpunit/includes/HttpTest.php
tests/phpunit/includes/LanguageConverterTest.php
tests/phpunit/includes/LinksUpdateTest.php
tests/phpunit/includes/MWFunctionTest.php
tests/phpunit/includes/MWNamespaceTest.php
tests/phpunit/includes/PathRouterTest.php
tests/phpunit/includes/PreferencesTest.php
tests/phpunit/includes/Providers.php
tests/phpunit/includes/RecentChangeTest.php
tests/phpunit/includes/RequestContextTest.php
tests/phpunit/includes/ResourceLoaderTest.php
tests/phpunit/includes/RevisionStorageTest_ContentHandlerUseDB.php
tests/phpunit/includes/RevisionTest.php
tests/phpunit/includes/SanitizerTest.php
tests/phpunit/includes/SiteConfigurationTest.php
tests/phpunit/includes/StringUtilsTest.php
tests/phpunit/includes/TemplateCategoriesTest.php
tests/phpunit/includes/TestUser.php
tests/phpunit/includes/TimestampTest.php
tests/phpunit/includes/TitleMethodsTest.php
tests/phpunit/includes/TitlePermissionTest.php
tests/phpunit/includes/TitleTest.php
tests/phpunit/includes/WikiPageTest.php
tests/phpunit/includes/WikiPageTest_ContentHandlerUseDB.php
tests/phpunit/includes/api/ApiAccountCreationTest.php
tests/phpunit/includes/api/ApiBlockTest.php
tests/phpunit/includes/api/ApiEditPageTest.php
tests/phpunit/includes/api/ApiOptionsTest.php
tests/phpunit/includes/api/ApiParseTest.php
tests/phpunit/includes/api/ApiPurgeTest.php
tests/phpunit/includes/api/ApiTestCase.php
tests/phpunit/includes/api/ApiTestCaseUpload.php
tests/phpunit/includes/api/ApiUploadTest.php
tests/phpunit/includes/api/ApiWatchTest.php
tests/phpunit/includes/api/RandomImageGenerator.php
tests/phpunit/includes/api/format/ApiFormatPhpTest.php
tests/phpunit/includes/api/query/ApiQueryContinueTestBase.php
tests/phpunit/includes/api/query/ApiQueryTest.php
tests/phpunit/includes/api/query/ApiQueryTestBase.php
tests/phpunit/includes/cache/ProcessCacheLRUTest.php
tests/phpunit/includes/content/ContentHandlerTest.php
tests/phpunit/includes/content/CssContentTest.php
tests/phpunit/includes/content/JavaScriptContentTest.php
tests/phpunit/includes/content/TextContentTest.php
tests/phpunit/includes/content/WikitextContentHandlerTest.php
tests/phpunit/includes/db/DatabaseSQLTest.php
tests/phpunit/includes/db/DatabaseSqliteTest.php
tests/phpunit/includes/db/DatabaseTestHelper.php
tests/phpunit/includes/db/ORMRowTest.php
tests/phpunit/includes/db/ORMTableTest.php
tests/phpunit/includes/db/TestORMRowTest.php
tests/phpunit/includes/filebackend/FileBackendTest.php
tests/phpunit/includes/filerepo/FileRepoTest.php
tests/phpunit/includes/filerepo/StoreBatchTest.php
tests/phpunit/includes/jobqueue/JobQueueTest.php
tests/phpunit/includes/json/FormatJsonTest.php
tests/phpunit/includes/libs/GenericArrayObjectTest.php
tests/phpunit/includes/media/BitmapMetadataHandlerTest.php
tests/phpunit/includes/media/ExifTest.php
tests/phpunit/includes/media/IPTCTest.php
tests/phpunit/includes/media/PNGMetadataExtractorTest.php
tests/phpunit/includes/media/SVGMetadataExtractorTest.php
tests/phpunit/includes/media/XMPTest.php
tests/phpunit/includes/media/XMPValidateTest.php
tests/phpunit/includes/objectcache/BagOStuffTest.php
tests/phpunit/includes/parser/MediaWikiParserTest.php
tests/phpunit/includes/parser/NewParserTest.php
tests/phpunit/includes/parser/ParserMethodsTest.php
tests/phpunit/includes/parser/ParserPreloadTest.php
tests/phpunit/includes/search/SearchEngineTest.php
tests/phpunit/includes/search/SearchUpdateTest.php
tests/phpunit/includes/site/MediaWikiSiteTest.php
tests/phpunit/includes/site/SiteListTest.php
tests/phpunit/includes/site/SiteSQLStoreTest.php
tests/phpunit/includes/site/SiteTest.php
tests/phpunit/includes/site/TestSites.php
tests/phpunit/includes/specials/SpecialRecentchangesTest.php
tests/phpunit/includes/specials/SpecialSearchTest.php
tests/phpunit/includes/upload/UploadFromUrlTest.php
tests/phpunit/includes/upload/UploadTest.php
tests/phpunit/languages/LanguageClassesTestCase.php
tests/phpunit/languages/LanguageTest.php
tests/phpunit/languages/LanguageTrTest.php
tests/phpunit/languages/utils/CLDRPluralRuleEvaluatorTest.php
tests/phpunit/maintenance/DumpTestCase.php
tests/phpunit/maintenance/MaintenanceTest.php
tests/phpunit/maintenance/backupPrefetchTest.php
tests/phpunit/maintenance/backupTextPassTest.php
tests/phpunit/maintenance/backup_LogTest.php
tests/phpunit/maintenance/backup_PageTest.php
tests/phpunit/maintenance/fetchTextTest.php
tests/phpunit/maintenance/getSlaveServerTest.php
tests/phpunit/phpunit.php
tests/phpunit/resources/ResourcesTest.php
tests/phpunit/skins/SideBarTest.php
tests/phpunit/suites/UploadFromUrlTestSuite.php
tests/selenium/suites/AddContentToNewPageTestCase.php
tests/testHelpers.inc

index ca87d93..dbe20fc 100644 (file)
@@ -7,6 +7,8 @@
 # Editors
 *.kate-swp
 *~
+\#*#
+.#*
 .*.swp
 .project
 cscope.files
index ade430f..eda1e7c 100644 (file)
@@ -72,6 +72,7 @@ production.
   longer be), and will no longer choke on booleans.
 * action=opensearch no longer silently ignores the format parameter.
 * action=opensearch now supports format=jsonfm.
+* list=usercontribs&ucprop=ids will now include the parent revision id.
 
 === Languages updated in 1.22===
 
index b00cf30..e22fe20 100644 (file)
@@ -63,7 +63,7 @@ class AjaxDispatcher {
                        $this->mode = "post";
                }
 
-               switch( $this->mode ) {
+               switch ( $this->mode ) {
                        case 'get':
                                $this->func_name = isset( $_GET["rs"] ) ? $_GET["rs"] : '';
                                if ( ! empty( $_GET["rsargs"] ) ) {
index 1354a48..87b94ae 100644 (file)
@@ -160,7 +160,7 @@ class Article implements Page {
                $page = null;
                wfRunHooks( 'ArticleFromTitle', array( &$title, &$page ) );
                if ( !$page ) {
-                       switch( $title->getNamespace() ) {
+                       switch ( $title->getNamespace() ) {
                                case NS_FILE:
                                        $page = new ImagePage( $title );
                                        break;
@@ -609,7 +609,7 @@ class Article implements Page {
                $this->mParserOutput = false;
 
                while ( !$outputDone && ++$pass ) {
-                       switch( $pass ) {
+                       switch ( $pass ) {
                                case 1:
                                        wfRunHooks( 'ArticleViewHeader', array( &$this, &$outputDone, &$useParserCache ) );
                                        break;
@@ -1100,7 +1100,7 @@ class Article implements Page {
                        $user = User::newFromName( $rootPart, false /* allow IP users*/ );
                        $ip = User::isIP( $rootPart );
 
-                       if ( !($user && $user->isLoggedIn()) && !$ip ) { # User does not exist
+                       if ( !( $user && $user->isLoggedIn() ) && !$ip ) { # User does not exist
                                $outputPage->wrapWikiMsg( "<div class=\"mw-userpage-userdoesnotexist error\">\n\$1\n</div>",
                                        array( 'userpage-userdoesnotexist-view', wfEscapeWikiText( $rootPart ) ) );
                        } elseif ( $user->isBlocked() ) { # Show log extract if the user is currently blocked
index 604b924..ec9dcf5 100644 (file)
@@ -165,7 +165,7 @@ class Autopromote {
                        return false;
                }
 
-               switch( $cond[0] ) {
+               switch ( $cond[0] ) {
                        case APCOND_EMAILCONFIRMED:
                                if ( Sanitizer::validateEmail( $user->getEmail() ) ) {
                                        if ( $wgEmailAuthentication ) {
index eab1754..47ddc7d 100644 (file)
@@ -249,7 +249,7 @@ class Block {
                # passed by some callers (bug 29116)
                if ( $vagueTarget != '' ) {
                        list( $target, $type ) = self::parseTarget( $vagueTarget );
-                       switch( $type ) {
+                       switch ( $type ) {
                                case self::TYPE_USER:
                                        # Slightly weird, but who are we to argue?
                                        $conds['ipb_address'][] = (string)$target;
@@ -511,7 +511,7 @@ class Block {
         * @return Array
         */
        protected function getDatabaseArray( $db = null ) {
-               if( !$db ) {
+               if ( !$db ) {
                        $db = wfGetDB( DB_SLAVE );
                }
                $expiry = $db->encodeExpiry( $this->mExpiry );
@@ -795,7 +795,7 @@ class Block {
         * @return String IP in Hex form
         */
        public function getRangeStart() {
-               switch( $this->type ) {
+               switch ( $this->type ) {
                        case self::TYPE_USER:
                                return '';
                        case self::TYPE_IP:
@@ -814,7 +814,7 @@ class Block {
         * @return String IP in Hex form
         */
        public function getRangeEnd() {
-               switch( $this->type ) {
+               switch ( $this->type ) {
                        case self::TYPE_USER:
                                return '';
                        case self::TYPE_IP:
@@ -911,7 +911,7 @@ class Block {
         * @return Bool
         */
        public function prevents( $action, $x = null ) {
-               switch( $action ) {
+               switch ( $action ) {
                        case 'edit':
                                # For now... <evil laugh>
                                return true;
@@ -1173,7 +1173,7 @@ class Block {
         * @param Array $block Array of blocks
         * @return Block|null the "best" block from the list
         */
-       public static function chooseBlock( array $blocks, array $ipChain  ) {
+       public static function chooseBlock( array $blocks, array $ipChain ) {
                if ( !count( $blocks ) ) {
                        return null;
                } elseif ( count( $blocks ) == 1 ) {
index 215659e..ed8a031 100644 (file)
@@ -40,7 +40,7 @@ abstract class Collation {
         * @return Collation
         */
        static function factory( $collationName ) {
-               switch( $collationName ) {
+               switch ( $collationName ) {
                        case 'uppercase':
                                return new UppercaseCollation;
                        case 'identity':
@@ -349,15 +349,15 @@ class IcuCollation extends Collation {
                $cacheEntry = $cache->get( $cacheKey );
 
                if ( $cacheEntry && isset( $cacheEntry['version'] )
-                       && $cacheEntry['version'] == self::FIRST_LETTER_VERSION ) 
-               {
+                       && $cacheEntry['version'] == self::FIRST_LETTER_VERSION
+               {
                        $this->firstLetterData = $cacheEntry;
                        return $this->firstLetterData;
                }
 
                // Generate data from serialized data file
 
-               if ( isset ( self::$tailoringFirstLetters[$this->locale] ) ) {
+               if ( isset( self::$tailoringFirstLetters[$this->locale] ) ) {
                        $letters = wfGetPrecompiledData( "first-letters-root.ser" );
                        // Append additional characters
                        $letters = array_merge( $letters, self::$tailoringFirstLetters[$this->locale] );
index ae35f3e..c97431a 100644 (file)
@@ -1220,7 +1220,7 @@ class EditPage {
 
                        case self::AS_SUCCESS_NEW_ARTICLE:
                                $query = $resultDetails['redirect'] ? 'redirect=no' : '';
-                               $anchor = isset ( $resultDetails['sectionanchor'] ) ? $resultDetails['sectionanchor'] : '';
+                               $anchor = isset( $resultDetails['sectionanchor'] ) ? $resultDetails['sectionanchor'] : '';
                                $wgOut->redirect( $this->mTitle->getFullURL( $query ) . $anchor );
                                return false;
 
index 0a5cb68..530b094 100644 (file)
@@ -290,7 +290,7 @@ class FormOptions implements ArrayAccess {
                        $default = $this->options[$name]['default'];
                        $type = $this->options[$name]['type'];
 
-                       switch( $type ) {
+                       switch ( $type ) {
                                case self::BOOL:
                                        $value = $r->getBool( $name, $default );
                                        break;
index 458ab54..320a57d 100644 (file)
@@ -2736,22 +2736,12 @@ function wfEscapeShellArg() {
 }
 
 /**
- * Execute a shell command, with time and memory limits mirrored from the PHP
- * configuration if supported.
- * @param string $cmd Command line, properly escaped for shell.
- * @param &$retval null|Mixed optional, will receive the program's exit code.
- *                 (non-zero is usually failure)
- * @param array $environ optional environment variables which should be
- *                 added to the executed command environment.
- * @param array $limits optional array with limits(filesize, memory, time, walltime)
- *                 this overwrites the global wgShellMax* limits.
- * @return string collected stdout as a string (trailing newlines stripped)
+ * Check if wfShellExec() is effectively disabled via php.ini config
+ * @return bool|string False or one of (safemode,disabled)
+ * @since 1.22
  */
-function wfShellExec( $cmd, &$retval = null, $environ = array(), $limits = array() ) {
-       global $IP, $wgMaxShellMemory, $wgMaxShellFileSize, $wgMaxShellTime,
-               $wgMaxShellWallClockTime, $wgShellCgroup;
-
-       static $disabled;
+function wfShellExecDisabled() {
+       static $disabled = null;
        if ( is_null( $disabled ) ) {
                $disabled = false;
                if ( wfIniGetBool( 'safe_mode' ) ) {
@@ -2767,6 +2757,26 @@ function wfShellExec( $cmd, &$retval = null, $environ = array(), $limits = array
                        }
                }
        }
+       return $disabled;
+}
+
+/**
+ * Execute a shell command, with time and memory limits mirrored from the PHP
+ * configuration if supported.
+ * @param string $cmd Command line, properly escaped for shell.
+ * @param &$retval null|Mixed optional, will receive the program's exit code.
+ *                 (non-zero is usually failure)
+ * @param array $environ optional environment variables which should be
+ *                 added to the executed command environment.
+ * @param array $limits optional array with limits(filesize, memory, time, walltime)
+ *                 this overwrites the global wgShellMax* limits.
+ * @return string collected stdout as a string (trailing newlines stripped)
+ */
+function wfShellExec( $cmd, &$retval = null, $environ = array(), $limits = array() ) {
+       global $IP, $wgMaxShellMemory, $wgMaxShellFileSize, $wgMaxShellTime,
+               $wgMaxShellWallClockTime, $wgShellCgroup;
+
+       $disabled = wfShellExecDisabled();
        if ( $disabled ) {
                $retval = 1;
                return $disabled == 'safemode' ?
@@ -3750,7 +3760,7 @@ function wfShorthandToInteger( $string = '' ) {
        }
        $last = $string[strlen( $string ) - 1];
        $val = intval( $string );
-       switch( $last ) {
+       switch ( $last ) {
                case 'g':
                case 'G':
                        $val *= 1024;
index 2d0cefc..c08206d 100644 (file)
@@ -83,9 +83,8 @@
  * $form = new HTMLForm( $someFields );
  * $form->setMethod( 'get' )
  *      ->setWrapperLegendMsg( 'message-key' )
- *      ->suppressReset()
  *      ->prepareForm()
- *      ->displayForm();
+ *      ->displayForm( '' );
  * @endcode
  * Note that you will have prepareForm and displayForm at the end. Other
  * methods call done after that would simply not be part of the form :(
index 28daf91..2da368c 100644 (file)
@@ -280,7 +280,7 @@ class MWHttpRequest {
                                ' Http::$httpEngine is set to "curl"' );
                }
 
-               switch( Http::$httpEngine ) {
+               switch ( Http::$httpEngine ) {
                        case 'curl':
                                return new CurlHttpRequest( $url, $options );
                        case 'php':
index 8220287..bf5a3fb 100644 (file)
@@ -381,7 +381,7 @@ class WikiImporter {
                }
                $buffer = "";
                while ( $this->reader->read() ) {
-                       switch( $this->reader->nodeType ) {
+                       switch ( $this->reader->nodeType ) {
                        case XmlReader::TEXT:
                        case XmlReader::SIGNIFICANT_WHITESPACE:
                                $buffer .= $this->reader->value;
@@ -424,7 +424,7 @@ class WikiImporter {
                        $lookup = array();
 
                        foreach ( $xmlReaderConstants as $name ) {
-                               $lookup[constant("XmlReader::$name")] = $name;
+                               $lookup[constant( "XmlReader::$name" )] = $name;
                        }
                }
 
@@ -1002,7 +1002,7 @@ class XMLReader2 extends XMLReader {
                }
                $buffer = "";
                while ( $this->read() ) {
-                       switch( $this->nodeType ) {
+                       switch ( $this->nodeType ) {
                        case XmlReader::TEXT:
                        case XmlReader::SIGNIFICANT_WHITESPACE:
                                $buffer .= $this->value;
@@ -1657,7 +1657,7 @@ class ImportStreamSource {
                        return Status::newFatal( 'importnofile' );
                }
                if ( !empty( $upload['error'] ) ) {
-                       switch( $upload['error'] ) {
+                       switch ( $upload['error'] ) {
                                case 1: # The uploaded file exceeds the upload_max_filesize directive in php.ini.
                                        return Status::newFatal( 'importuploaderrorsize' );
                                case 2: # The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form.
index 24d803b..44fafca 100644 (file)
@@ -642,7 +642,7 @@ class MimeMagic {
                }
 
                /* Look for WebP */
-               if ( strncmp( $head, "RIFF", 4 ) == 0 && strncmp( substr( $head, 8, 8), "WEBPVP8 ", 8 ) == 0 ) {
+               if ( strncmp( $head, "RIFF", 4 ) == 0 && strncmp( substr( $head, 8, 8 ), "WEBPVP8 ", 8 ) == 0 ) {
                        wfDebug( __METHOD__ . ": recognized file as image/webp\n" );
                        return "image/webp";
                }
@@ -815,12 +815,12 @@ class MimeMagic {
                        }
                        wfDebug( __METHOD__ . ": detected an Open Packaging Conventions archive: $mime\n" );
                } elseif ( substr( $header, 0, 8 ) == "\xd0\xcf\x11\xe0\xa1\xb1\x1a\xe1" &&
-                               ($headerpos = strpos( $tail, "PK\x03\x04" ) ) !== false &&
+                               ( $headerpos = strpos( $tail, "PK\x03\x04" ) ) !== false &&
                                preg_match( $openxmlRegex, substr( $tail, $headerpos + 30 ) ) ) {
                        if ( substr( $header, 512, 4 ) == "\xEC\xA5\xC1\x00" ) {
                                $mime = "application/msword";
                        }
-                       switch( substr( $header, 512, 6 ) ) {
+                       switch ( substr( $header, 512, 6 ) ) {
                                case "\xEC\xA5\xC1\x00\x0E\x00":
                                case "\xEC\xA5\xC1\x00\x1C\x00":
                                case "\xEC\xA5\xC1\x00\x43\x00":
@@ -876,9 +876,8 @@ class MimeMagic {
 
                $m = null;
                if ( $wgMimeDetectorCommand ) {
-                       // @todo FIXME: Use wfShellExec
-                       $fn = wfEscapeShellArg( $file );
-                       $m = `$wgMimeDetectorCommand $fn`;
+                       $args = wfEscapeShellArg( $file );
+                       $m = wfShellExec( "$wgMimeDetectorCommand $args" );
                } elseif ( function_exists( "finfo_open" ) && function_exists( "finfo_file" ) ) {
 
                        # This required the fileinfo extension by PECL,
index 38c6f04..2dac938 100644 (file)
@@ -190,9 +190,19 @@ abstract class PoolCounterWork {
        }
 
        /**
-        * Get the result of the work (whatever it is), or false.
+        * Get the result of the work (whatever it is), or the result of the error() function.
+        * This returns the result of the first applicable method that returns a non-false value,
+        * where the methods are checked in the following order:
+        *   - a) doWork()       : Applies if the work is exclusive or no another process
+        *                         is doing it, and on the condition that either this process
+        *                         successfully entered the pool or the pool counter is down.
+        *   - b) doCachedWork() : Applies if the work is cacheable and this blocked on another
+        *                         process which finished the work.
+        *   - c) fallback()     : Applies for all remaining cases.
+        * If these all fall through (by returning false), then the result of error() is returned.
+        *
         * @param $skipcache bool
-        * @return bool|mixed
+        * @return mixed
         */
        public function execute( $skipcache = false ) {
                if ( $this->cacheable && !$skipcache ) {
index faad391..b5d4a1c 100644 (file)
@@ -825,6 +825,29 @@ class RecentChange {
                return ChangesList::showCharacterDifference( $old, $new );
        }
 
+       /**
+        * Purge expired changes from the recentchanges table
+        * @since 1.22
+        */
+       public static function purgeExpiredChanges() {
+               if ( wfReadOnly() ) {
+                       return;
+               }
+
+               $method = __METHOD__;
+               $dbw = wfGetDB( DB_MASTER );
+               $dbw->onTransactionIdle( function() use ( $dbw, $method ) {
+                       global $wgRCMaxAge;
+
+                       $cutoff = $dbw->timestamp( time() - $wgRCMaxAge );
+                       $dbw->delete(
+                               'recentchanges',
+                               array( 'rc_timestamp < ' . $dbw->addQuotes( $cutoff ) ),
+                               $method
+                       );
+               } );
+       }
+
        private static function checkIPAddress( $ip ) {
                global $wgRequest;
                if ( $ip ) {
index 9b9485e..ae65b9d 100644 (file)
@@ -694,7 +694,7 @@ class LegacyTemplate extends BaseTemplate {
 
                if ( $title->isTalkPage() ) {
                        $link = $title->getSubjectPage();
-                       switch( $link->getNamespace() ) {
+                       switch ( $link->getNamespace() ) {
                                case NS_MAIN:
                                        $text = wfMessage( 'articlepage' );
                                        break;
index 17c7808..e53d424 100644 (file)
@@ -1827,7 +1827,7 @@ abstract class BaseTemplate extends QuickTemplate {
        }
 
        function makeSearchButton( $mode, $attrs = array() ) {
-               switch( $mode ) {
+               switch ( $mode ) {
                        case 'go':
                        case 'fulltext':
                                $realAttrs = array(
index cf34171..739c52a 100644 (file)
@@ -757,7 +757,7 @@ class Title {
         */
        public function getTalkNsText() {
                global $wgContLang;
-               return( $wgContLang->getNsText( MWNamespace::getTalk( $this->mNamespace ) ) );
+               return $wgContLang->getNsText( MWNamespace::getTalk( $this->mNamespace ) );
        }
 
        /**
@@ -766,7 +766,7 @@ class Title {
         * @return Bool TRUE or FALSE
         */
        public function canTalk() {
-               return( MWNamespace::canTalk( $this->mNamespace ) );
+               return MWNamespace::canTalk( $this->mNamespace );
        }
 
        /**
@@ -1275,10 +1275,10 @@ class Title {
         */
        public function getSubpageText() {
                if ( !MWNamespace::hasSubpages( $this->mNamespace ) ) {
-                       return( $this->mTextform );
+                       return $this->mTextform;
                }
                $parts = explode( '/', $this->mTextform );
-               return( $parts[count( $parts ) - 1] );
+               return $parts[count( $parts ) - 1];
        }
 
        /**
@@ -1318,7 +1318,7 @@ class Title {
        public function getSubpageUrlForm() {
                $text = $this->getSubpageText();
                $text = wfUrlencode( str_replace( ' ', '_', $text ) );
-               return( $text );
+               return $text;
        }
 
        /**
@@ -2046,7 +2046,7 @@ class Title {
                        return $errors;
                }
 
-               global $wgContLang, $wgLang, $wgEmailConfirmToEdit;
+               global $wgEmailConfirmToEdit;
 
                if ( $wgEmailConfirmToEdit && !$user->isEmailConfirmed() ) {
                        $errors[] = array( 'confirmedittext' );
@@ -4401,7 +4401,7 @@ class Title {
                        return true;  // any interwiki link might be viewable, for all we know
                }
 
-               switch( $this->mNamespace ) {
+               switch ( $this->mNamespace ) {
                        case NS_MEDIA:
                        case NS_FILE:
                                // file exists, possibly in a foreign repo
index 7d0d5af..2fd12d5 100644 (file)
@@ -599,7 +599,7 @@ class MediaWiki {
         * Do a job from the job queue
         */
        private function doJobs() {
-               global $wgJobRunRate;
+               global $wgJobRunRate, $wgPhpCli, $IP;
 
                if ( $wgJobRunRate <= 0 || wfReadOnly() ) {
                        return;
@@ -615,25 +615,36 @@ class MediaWiki {
                        $n = intval( $wgJobRunRate );
                }
 
-               $group = JobQueueGroup::singleton();
-               do {
-                       $job = $group->pop( JobQueueGroup::USE_CACHE ); // job from any queue
-                       if ( $job ) {
-                               $output = $job->toString() . "\n";
-                               $t = - microtime( true );
-                               wfProfileIn( __METHOD__ . '-' . get_class( $job ) );
-                               $success = $job->run();
-                               wfProfileOut( __METHOD__ . '-' . get_class( $job ) );
-                               $group->ack( $job ); // done
-                               $t += microtime( true );
-                               $t = round( $t * 1000 );
-                               if ( $success === false ) {
-                                       $output .= "Error: " . $job->getLastError() . ", Time: $t ms\n";
-                               } else {
-                                       $output .= "Success, Time: $t ms\n";
+               if ( !wfShellExecDisabled() && is_executable( $wgPhpCli ) ) {
+                       // Start a background process to run some of the jobs.
+                       // This will be asynchronous on *nix though not on Windows.
+                       wfProfileIn( __METHOD__ . '-exec' );
+                       $retVal = 1;
+                       $cmd = wfShellWikiCmd( "$IP/maintenance/runJobs.php", array( '--maxjobs', $n ) );
+                       wfShellExec( "$cmd &", $retVal );
+                       wfProfileOut( __METHOD__ . '-exec' );
+               } else {
+                       // Fallback to running the jobs here while the user waits
+                       $group = JobQueueGroup::singleton();
+                       do {
+                               $job = $group->pop( JobQueueGroup::USE_CACHE ); // job from any queue
+                               if ( $job ) {
+                                       $output = $job->toString() . "\n";
+                                       $t = - microtime( true );
+                                       wfProfileIn( __METHOD__ . '-' . get_class( $job ) );
+                                       $success = $job->run();
+                                       wfProfileOut( __METHOD__ . '-' . get_class( $job ) );
+                                       $group->ack( $job ); // done
+                                       $t += microtime( true );
+                                       $t = round( $t * 1000 );
+                                       if ( $success === false ) {
+                                               $output .= "Error: " . $job->getLastError() . ", Time: $t ms\n";
+                                       } else {
+                                               $output .= "Success, Time: $t ms\n";
+                                       }
+                                       wfDebugLog( 'jobqueue', $output );
                                }
-                               wfDebugLog( 'jobqueue', $output );
-                       }
-               } while ( --$n && $job );
+                       } while ( --$n && $job );
+               }
        }
 }
index 39a71ad..c2aad76 100644 (file)
@@ -2080,15 +2080,7 @@ class WikiPage implements Page, IDBAccessObject {
                        if ( 0 == mt_rand( 0, 99 ) ) {
                                // Flush old entries from the `recentchanges` table; we do this on
                                // random requests so as to avoid an increase in writes for no good reason
-                               global $wgRCMaxAge;
-
-                               $dbw = wfGetDB( DB_MASTER );
-                               $cutoff = $dbw->timestamp( time() - $wgRCMaxAge );
-                               $dbw->delete(
-                                       'recentchanges',
-                                       array( 'rc_timestamp < ' . $dbw->addQuotes( $cutoff ) ),
-                                       __METHOD__
-                               );
+                               RecentChange::purgeExpiredChanges();
                        }
                }
 
index ee5aa97..c500370 100644 (file)
@@ -966,9 +966,9 @@ abstract class ApiBase extends ContextSource {
                                                }
                                                break;
                                        case 'integer': // Force everything using intval() and optionally validate limits
-                                               $min = isset ( $paramSettings[self::PARAM_MIN] ) ? $paramSettings[self::PARAM_MIN] : null;
-                                               $max = isset ( $paramSettings[self::PARAM_MAX] ) ? $paramSettings[self::PARAM_MAX] : null;
-                                               $enforceLimits = isset ( $paramSettings[self::PARAM_RANGE_ENFORCE] )
+                                               $min = isset( $paramSettings[self::PARAM_MIN] ) ? $paramSettings[self::PARAM_MIN] : null;
+                                               $max = isset( $paramSettings[self::PARAM_MAX] ) ? $paramSettings[self::PARAM_MAX] : null;
+                                               $enforceLimits = isset( $paramSettings[self::PARAM_RANGE_ENFORCE] )
                                                                ? $paramSettings[self::PARAM_RANGE_ENFORCE] : false;
 
                                                if ( is_array( $value ) ) {
index ab60008..e7e5e1d 100644 (file)
@@ -262,7 +262,7 @@ class ApiEditPage extends ApiBase {
                        $requestArray['wpStarttime'] = wfTimestampNow(); // Fake wpStartime
                }
 
-               if ( $params['minor'] || ( !$params['notminor'] && $user->getOption( 'minordefault' ) ) )       {
+               if ( $params['minor'] || ( !$params['notminor'] && $user->getOption( 'minordefault' ) ) ) {
                        $requestArray['wpMinoredit'] = '';
                }
 
@@ -342,7 +342,7 @@ class ApiEditPage extends ApiBase {
                $wgRequest = $oldRequest;
                global $wgMaxArticleSize;
 
-               switch( $status->value ) {
+               switch ( $status->value ) {
                        case EditPage::AS_HOOK_ERROR:
                        case EditPage::AS_HOOK_ERROR_EXPECTED:
                                $this->dieUsageMsg( 'hookaborted' );
index f9b85ef..4ec149c 100644 (file)
@@ -155,7 +155,7 @@ class ApiFormatXml extends ApiFormatBase {
                                        unset( $elemValue[$subElemId] );
                                } elseif ( is_array( $subElemValue ) ) {
                                        $subElements[$subElemId] = $subElemValue;
-                                       unset ( $elemValue[$subElemId] );
+                                       unset( $elemValue[$subElemId] );
                                }
                        }
 
index 99847cf..dd75d3f 100644 (file)
@@ -609,7 +609,7 @@ class ApiMain extends ApiBase {
 
                $result = $this->getResult();
                // Printer may not be initialized if the extractRequestParams() fails for the main module
-               if ( !isset ( $this->mPrinter ) ) {
+               if ( !isset( $this->mPrinter ) ) {
                        // The printer has not been created yet. Try to manually get formatter value.
                        $value = $this->getRequest()->getVal( 'format', self::API_DEFAULT_FORMAT );
                        if ( !$this->mModuleMgr->isDefined( $value, 'format' ) ) {
index 0645edb..3caf81f 100644 (file)
@@ -188,7 +188,7 @@ class ApiPageSet extends ApiBase {
 
                        if ( !$isDryRun ) {
                                // Populate page information with the original user input
-                               switch( $dataSource ) {
+                               switch ( $dataSource ) {
                                        case 'titles':
                                                $this->initFromTitles( $this->mParams['titles'] );
                                                break;
@@ -407,7 +407,7 @@ class ApiPageSet extends ApiBase {
         * @return array of raw_prefixed_title (string) => prefixed_title (string)
         * @since 1.21
         */
-       public function getNormalizedTitlesAsResult( $result = null  ) {
+       public function getNormalizedTitlesAsResult( $result = null ) {
                $values = array();
                foreach ( $this->getNormalizedTitles() as $rawTitleStr => $titleStr ) {
                        $values[] = array(
index fa2a7c4..881269f 100644 (file)
@@ -121,10 +121,10 @@ class ApiQueryBlocks extends ApiQueryBase {
                        $show = array_flip( $params['show'] );
 
                        /* Check for conflicting parameters. */
-                       if ( ( isset ( $show['account'] ) && isset ( $show['!account'] ) )
-                                       || ( isset ( $show['ip'] ) && isset ( $show['!ip'] ) )
-                                       || ( isset ( $show['range'] ) && isset ( $show['!range'] ) )
-                                       || ( isset ( $show['temp'] ) && isset ( $show['!temp'] ) )
+                       if ( ( isset( $show['account'] ) && isset( $show['!account'] ) )
+                                       || ( isset( $show['ip'] ) && isset( $show['!ip'] ) )
+                                       || ( isset( $show['range'] ) && isset( $show['!range'] ) )
+                                       || ( isset( $show['temp'] ) && isset( $show['!temp'] ) )
                        ) {
                                $this->dieUsageMsg( 'show' );
                        }
index 4a53409..690d0e6 100644 (file)
@@ -50,7 +50,7 @@ class ApiQueryDeletedrevs extends ApiQueryBase {
                $fld_user = isset( $prop['user'] );
                $fld_userid = isset( $prop['userid'] );
                $fld_comment = isset( $prop['comment'] );
-               $fld_parsedcomment = isset ( $prop['parsedcomment'] );
+               $fld_parsedcomment = isset( $prop['parsedcomment'] );
                $fld_minor = isset( $prop['minor'] );
                $fld_len = isset( $prop['len'] );
                $fld_sha1 = isset( $prop['sha1'] );
index 33b70a4..eaa2b47 100644 (file)
@@ -49,12 +49,12 @@ class ApiQueryLogEvents extends ApiQueryBase {
                $this->fld_ids = isset( $prop['ids'] );
                $this->fld_title = isset( $prop['title'] );
                $this->fld_type = isset( $prop['type'] );
-               $this->fld_action = isset ( $prop['action'] );
+               $this->fld_action = isset( $prop['action'] );
                $this->fld_user = isset( $prop['user'] );
                $this->fld_userid = isset( $prop['userid'] );
                $this->fld_timestamp = isset( $prop['timestamp'] );
                $this->fld_comment = isset( $prop['comment'] );
-               $this->fld_parsedcomment = isset ( $prop['parsedcomment'] );
+               $this->fld_parsedcomment = isset( $prop['parsedcomment'] );
                $this->fld_details = isset( $prop['details'] );
                $this->fld_tags = isset( $prop['tags'] );
 
index 8aceab2..7cb445d 100644 (file)
@@ -499,7 +499,7 @@ class ApiQueryRecentChanges extends ApiQueryGeneratorBase {
                        }
                        return $retval;
                }
-               switch( $type ) {
+               switch ( $type ) {
                        case 'edit':
                                return RC_EDIT;
                        case 'new':
index 317b7ba..1d86c97 100644 (file)
@@ -146,17 +146,17 @@ class ApiQueryRevisions extends ApiQueryBase {
                $prop = array_flip( $params['prop'] );
 
                // Optional fields
-               $this->fld_ids = isset ( $prop['ids'] );
+               $this->fld_ids = isset( $prop['ids'] );
                // $this->addFieldsIf('rev_text_id', $this->fld_ids); // should this be exposed?
-               $this->fld_flags = isset ( $prop['flags'] );
-               $this->fld_timestamp = isset ( $prop['timestamp'] );
-               $this->fld_comment = isset ( $prop['comment'] );
-               $this->fld_parsedcomment = isset ( $prop['parsedcomment'] );
-               $this->fld_size = isset ( $prop['size'] );
-               $this->fld_sha1 = isset ( $prop['sha1'] );
-               $this->fld_contentmodel = isset ( $prop['contentmodel'] );
+               $this->fld_flags = isset( $prop['flags'] );
+               $this->fld_timestamp = isset( $prop['timestamp'] );
+               $this->fld_comment = isset( $prop['comment'] );
+               $this->fld_parsedcomment = isset( $prop['parsedcomment'] );
+               $this->fld_size = isset( $prop['size'] );
+               $this->fld_sha1 = isset( $prop['sha1'] );
+               $this->fld_contentmodel = isset( $prop['contentmodel'] );
                $this->fld_userid = isset( $prop['userid'] );
-               $this->fld_user = isset ( $prop['user'] );
+               $this->fld_user = isset( $prop['user'] );
                $this->token = $params['token'];
 
                if ( !empty( $params['contentformat'] ) ) {
index 6d20d66..1e013eb 100644 (file)
@@ -48,7 +48,7 @@ class ApiQueryContributions extends ApiQueryBase {
                $this->fld_ids = isset( $prop['ids'] );
                $this->fld_title = isset( $prop['title'] );
                $this->fld_comment = isset( $prop['comment'] );
-               $this->fld_parsedcomment = isset ( $prop['parsedcomment'] );
+               $this->fld_parsedcomment = isset( $prop['parsedcomment'] );
                $this->fld_size = isset( $prop['size'] );
                $this->fld_sizediff = isset( $prop['sizediff'] );
                $this->fld_flags = isset( $prop['flags'] );
@@ -255,7 +255,7 @@ class ApiQueryContributions extends ApiQueryBase {
                $this->addFieldsIf( 'rev_comment', $this->fld_comment || $this->fld_parsedcomment );
                $this->addFieldsIf( 'rev_len', $this->fld_size || $this->fld_sizediff );
                $this->addFieldsIf( 'rev_minor_edit', $this->fld_flags );
-               $this->addFieldsIf( 'rev_parent_id', $this->fld_flags || $this->fld_sizediff );
+               $this->addFieldsIf( 'rev_parent_id', $this->fld_flags || $this->fld_sizediff || $this->fld_ids );
                $this->addFieldsIf( 'rc_patrolled', $this->fld_patrolled );
 
                if ( $this->fld_tags ) {
@@ -297,6 +297,10 @@ class ApiQueryContributions extends ApiQueryBase {
                        $vals['pageid'] = intval( $row->rev_page );
                        $vals['revid'] = intval( $row->rev_id );
                        // $vals['textid'] = intval( $row->rev_text_id ); // todo: Should this field be exposed?
+
+                       if ( !is_null( $row->rev_parent_id ) ) {
+                               $vals['parentid'] = intval( $row->rev_parent_id );
+                       }
                }
 
                $title = Title::makeTitle( $row->page_namespace, $row->page_title );
@@ -474,7 +478,11 @@ class ApiQueryContributions extends ApiQueryBase {
                        ),
                        'ids' => array(
                                'pageid' => 'integer',
-                               'revid' => 'integer'
+                               'revid' => 'integer',
+                               'parentid' => array(
+                                       ApiBase::PROP_TYPE => 'integer',
+                                       ApiBase::PROP_NULLABLE => true
+                               )
                        ),
                        'title' => array(
                                'ns' => 'namespace',
index 491d20f..3ee15f6 100644 (file)
@@ -68,7 +68,7 @@ class ApiQueryWatchlist extends ApiQueryGeneratorBase {
                        $this->fld_user = isset( $prop['user'] );
                        $this->fld_userid = isset( $prop['userid'] );
                        $this->fld_comment = isset( $prop['comment'] );
-                       $this->fld_parsedcomment = isset ( $prop['parsedcomment'] );
+                       $this->fld_parsedcomment = isset( $prop['parsedcomment'] );
                        $this->fld_timestamp = isset( $prop['timestamp'] );
                        $this->fld_sizes = isset( $prop['sizes'] );
                        $this->fld_patrol = isset( $prop['patrol'] );
@@ -143,12 +143,11 @@ class ApiQueryWatchlist extends ApiQueryGeneratorBase {
                        $show = array_flip( $params['show'] );
 
                        /* Check for conflicting parameters. */
-                       if ( ( isset ( $show['minor'] ) && isset ( $show['!minor'] ) )
-                                       || ( isset ( $show['bot'] ) && isset ( $show['!bot'] ) )
-                                       || ( isset ( $show['anon'] ) && isset ( $show['!anon'] ) )
-                                       || ( isset ( $show['patrolled'] ) && isset ( $show['!patrolled'] ) )
-                       )
-                       {
+                       if ( ( isset( $show['minor'] ) && isset( $show['!minor'] ) )
+                                       || ( isset( $show['bot'] ) && isset( $show['!bot'] ) )
+                                       || ( isset( $show['anon'] ) && isset( $show['!anon'] ) )
+                                       || ( isset( $show['patrolled'] ) && isset( $show['!patrolled'] ) )
+                       ) {
                                $this->dieUsageMsg( 'show' );
                        }
 
index a8d7115..5563087 100644 (file)
@@ -456,7 +456,7 @@ class ApiUpload extends ApiBase {
                global $wgFileExtensions;
 
                // @todo Move them to ApiBase's message map
-               switch( $verification['status'] ) {
+               switch ( $verification['status'] ) {
                        // Recoverable errors
                        case UploadBase::MIN_LENGTH_PARTNAME:
                                $this->dieRecoverableError( 'filename-tooshort', 'filename' );
index 63c9cfe..70fc1f3 100644 (file)
@@ -2966,6 +2966,7 @@ abstract class DatabaseBase implements DatabaseType {
        /**
         * Run an anonymous function as soon as there is no transaction pending.
         * If there is a transaction and it is rolled back, then the callback is cancelled.
+        * Queries in the function will run in AUTO-COMMIT mode unless there are begin() calls.
         * Callbacks must commit any transactions that they begin.
         *
         * This is useful for updates to different systems or when separate transactions are needed.
index 427fd3d..da719be 100644 (file)
@@ -1049,7 +1049,7 @@ class MssqlResult {
                                $arrNum[] = $value;
                        }
                }
-               switch( $mode ) {
+               switch ( $mode ) {
                        case SQLSRV_FETCH_ASSOC:
                                $ret = $this->mRows[$this->mCursor];
                                break;
index a3f6805..3333f4a 100644 (file)
@@ -677,7 +677,7 @@ class DatabaseOracle extends DatabaseBase {
                Using uppercase because that's the only way Oracle can handle
                quoted tablenames
                */
-               switch( $name ) {
+               switch ( $name ) {
                        case 'user':
                                $name = 'MWUSER';
                                break;
index 704b70e..e12175f 100644 (file)
@@ -915,7 +915,7 @@ __INDEXATTR__;
 
        function tableName( $name, $format = 'quoted' ) {
                # Replace reserved words with better ones
-               switch( $name ) {
+               switch ( $name ) {
                        case 'user':
                                return $this->realTableName( 'mwuser', $format );
                        case 'text':
index e78045a..4435fc6 100644 (file)
@@ -1111,7 +1111,7 @@ class ArrayDiffFormatter extends DiffFormatter {
                $newline = 1;
                $retval = array();
                foreach ( $diff->edits as $edit ) {
-                       switch( $edit->type ) {
+                       switch ( $edit->type ) {
                                case 'add':
                                        foreach ( $edit->closing as $l ) {
                                                $retval[] = array(
index 8bd8376..325c673 100644 (file)
@@ -1663,11 +1663,11 @@ class LocalFile extends File {
        }
 
        /**
-        * @return bool
+        * @return bool Whether to cache in RepoGroup (this avoids OOMs)
         */
        function isCacheable() {
-               $this->load();
-               return strlen( $this->metadata ) <= self::CACHE_FIELD_MAX_LEN; // avoid OOMs
+               $this->load(); // if loaded from cache, metadata will be null if it didn't fit
+               return $this->metadata !== null && strlen( $this->metadata ) <= self::CACHE_FIELD_MAX_LEN;
        }
 
        /**
index 61886b2..43fb14e 100644 (file)
@@ -336,6 +336,12 @@ The account you specify here must already exist.',
 
 If your MySQL installation supports InnoDB, it is highly recommended that you choose that instead.
 If your MySQL installation does not support InnoDB, maybe it's time for an upgrade.",
+       'config-mysql-only-myisam-dep'    => "'''Warning:''' MyISAM is the only available storage engine for MySQL, which is not recommended for use with MediaWiki, because:
+* it barely supports concurrency due to table locking
+* it is more prone to corruption than other engines
+* the MediaWiki codebase does not always handle MyISAM as it should
+
+Your MySQL installation does not support InnoDB, maybe it's time for an upgrade.",
        'config-mysql-engine-help'        => "'''InnoDB''' is almost always the best option, since it has good concurrency support.
 
 '''MyISAM''' may be faster in single-user or read-only installations.
index d3dfc83..cd7e53c 100644 (file)
@@ -222,7 +222,7 @@ class LocalSettingsGenerator {
                        }
                }
 
-               switch( $this->values['wgMainCacheType'] ) {
+               switch ( $this->values['wgMainCacheType'] ) {
                        case 'anything':
                        case 'db':
                        case 'memcached':
index d550909..84638d4 100644 (file)
@@ -350,7 +350,11 @@ class MysqlInstaller extends DatabaseInstaller {
                $s .= Xml::openElement( 'div', array(
                        'id' => 'dbMyisamWarning'
                ));
-               $s .= $this->parent->getWarningBox( wfMessage( 'config-mysql-myisam-dep' )->text() );
+               $myisamWarning = 'config-mysql-myisam-dep';
+               if ( count( $engines ) === 1 ) {
+                       $myisamWarning = 'config-mysql-only-myisam-dep';
+               }
+               $s .= $this->parent->getWarningBox( wfMessage( $myisamWarning )->text() );
                $s .= Xml::closeElement( 'div' );
 
                if ( $this->getVar( '_MysqlEngine' ) != 'MyISAM' ) {
index 27e927c..6f4f6d9 100644 (file)
@@ -292,7 +292,7 @@ class JobQueueDB extends JobQueue {
                        $title = Title::makeTitleSafe( $row->job_namespace, $row->job_title );
                        if ( !$title ) {
                                $dbw->delete( 'job', array( 'job_id' => $row->job_id ), __METHOD__ );
-                               wfDebugLog( 'JobQueueDB', "Row has invalid title '{$row->job_title}'." );
+                               wfDebug( "Row has invalid title '{$row->job_title}'." );
                                continue; // try again
                        }
                        $job = Job::factory( $row->job_cmd, $title,
@@ -434,7 +434,7 @@ class JobQueueDB extends JobQueue {
                                        array( 'job_cmd' => $this->type, 'job_token' => $uuid ), __METHOD__
                                );
                                if ( !$row ) { // raced out by duplicate job removal
-                                       wfDebugLog( 'JobQueueDB', "Row deleted as duplicate by another process." );
+                                       wfDebug( "Row deleted as duplicate by another process." );
                                }
                        } else {
                                break; // nothing to do
index 27526f5..8f60aee 100644 (file)
@@ -194,9 +194,9 @@ class LogFormatter {
                // Text of title the action is aimed at.
                $target = $entry->getTarget()->getPrefixedText();
                $text = null;
-               switch( $entry->getType() ) {
+               switch ( $entry->getType() ) {
                        case 'move':
-                               switch( $entry->getSubtype() ) {
+                               switch ( $entry->getSubtype() ) {
                                        case 'move':
                                                $movesource = $parameters['4::target'];
                                                $text = wfMessage( '1movedto2' )
@@ -215,7 +215,7 @@ class LogFormatter {
                                break;
 
                        case 'delete':
-                               switch( $entry->getSubtype() ) {
+                               switch ( $entry->getSubtype() ) {
                                        case 'delete':
                                                $text = wfMessage( 'deletedarticle' )
                                                        ->rawParams( $target )->inContentLanguage()->escaped();
@@ -246,7 +246,7 @@ class LogFormatter {
                                break;
 
                        case 'protect':
-                               switch( $entry->getSubtype() ) {
+                               switch ( $entry->getSubtype() ) {
                                case 'protect':
                                        $text = wfMessage( 'protectedarticle' )
                                                ->rawParams( $target . ' ' . $parameters[0] )->inContentLanguage()->escaped();
@@ -263,7 +263,7 @@ class LogFormatter {
                                break;
 
                        case 'newusers':
-                               switch( $entry->getSubtype() ) {
+                               switch ( $entry->getSubtype() ) {
                                        case 'newusers':
                                        case 'create':
                                                $text = wfMessage( 'newuserlog-create-entry' )
@@ -282,7 +282,7 @@ class LogFormatter {
                                break;
 
                        case 'upload':
-                               switch( $entry->getSubtype() ) {
+                               switch ( $entry->getSubtype() ) {
                                        case 'upload':
                                                $text = wfMessage( 'uploadedimage' )
                                                        ->rawParams( $target )->inContentLanguage()->escaped();
@@ -305,7 +305,7 @@ class LogFormatter {
                                } else {
                                        $newgroups = wfMessage( 'rightsnone' )->inContentLanguage()->escaped();
                                }
-                               switch( $entry->getSubtype() ) {
+                               switch ( $entry->getSubtype() ) {
                                        case 'rights':
                                                $text = wfMessage( 'rightslogentry' )
                                                        ->rawParams( $target, $oldgroups, $newgroups )->inContentLanguage()->escaped();
@@ -479,7 +479,7 @@ class LogFormatter {
        protected function formatParameterValue( $type, $value ) {
                $saveLinkFlood = $this->linkFlood;
 
-               switch( strtolower( trim( $type ) ) ) {
+               switch ( strtolower( trim( $type ) ) ) {
                        case 'raw':
                                $value = Message::rawParam( $value );
                                break;
index 3fe91fc..9d6ab25 100644 (file)
@@ -331,7 +331,7 @@ class LogPage {
                        return $title->getPrefixedText();
                }
 
-               switch( $type ) {
+               switch ( $type ) {
                        case 'move':
                                $titleLink = Linker::link(
                                        $title,
index 555a414..7c39c81 100644 (file)
@@ -292,7 +292,7 @@ class BitmapMetadataHandler {
                $head = fread( $fh, 2 );
                fclose( $fh );
 
-               switch( $head ) {
+               switch ( $head ) {
                        case 'II':
                                return 'LE'; // II for intel.
                        case 'MM':
index 6058f45..d7c45d3 100644 (file)
@@ -394,7 +394,7 @@ class Exif {
                //ComponentsConfiguration should really be an array instead of a string...
                //This turns a string of binary numbers into an array of numbers.
 
-               if ( isset ( $this->mFilteredExifData['ComponentsConfiguration'] ) ) {
+               if ( isset( $this->mFilteredExifData['ComponentsConfiguration'] ) ) {
                        $val = $this->mFilteredExifData['ComponentsConfiguration'];
                        $ccVals = array();
                        for ( $i = 0; $i < strlen( $val ); $i++ ) {
@@ -411,7 +411,7 @@ class Exif {
                //Also change exif tag name from GPSVersion (what php exif thinks it is)
                //to GPSVersionID (what the exif standard thinks it is).
 
-               if ( isset ( $this->mFilteredExifData['GPSVersion'] ) ) {
+               if ( isset( $this->mFilteredExifData['GPSVersion'] ) ) {
                        $val = $this->mFilteredExifData['GPSVersion'];
                        $newVal = '';
                        for ( $i = 0; $i < strlen( $val ); $i++ ) {
@@ -758,7 +758,7 @@ class Exif {
                        return true;
                }
                // Does not work if not typecast
-               switch( (string)$etype ) {
+               switch ( (string)$etype ) {
                        case (string)Exif::BYTE:
                                $this->debug( $val, __FUNCTION__, $debug );
                                return $this->isByte( $val );
index 3d153eb..276af4d 100644 (file)
@@ -127,9 +127,9 @@ class FormatMetadata {
 
                        foreach ( $vals as &$val ) {
 
-                               switch( $tag ) {
+                               switch ( $tag ) {
                                case 'Compression':
-                                       switch( $val ) {
+                                       switch ( $val ) {
                                        case 1: case 2: case 3: case 4:
                                        case 5: case 6: case 7: case 8:
                                        case 32773: case 32946: case 34712:
@@ -142,7 +142,7 @@ class FormatMetadata {
                                        break;
 
                                case 'PhotometricInterpretation':
-                                       switch( $val ) {
+                                       switch ( $val ) {
                                        case 2: case 6:
                                                $val = self::msg( $tag, $val );
                                                break;
@@ -153,7 +153,7 @@ class FormatMetadata {
                                        break;
 
                                case 'Orientation':
-                                       switch( $val ) {
+                                       switch ( $val ) {
                                        case 1: case 2: case 3: case 4: case 5: case 6: case 7: case 8:
                                                $val = self::msg( $tag, $val );
                                                break;
@@ -164,7 +164,7 @@ class FormatMetadata {
                                        break;
 
                                case 'PlanarConfiguration':
-                                       switch( $val ) {
+                                       switch ( $val ) {
                                        case 1: case 2:
                                                $val = self::msg( $tag, $val );
                                                break;
@@ -189,7 +189,7 @@ class FormatMetadata {
 
                                case 'XResolution':
                                case 'YResolution':
-                                       switch( $resolutionunit ) {
+                                       switch ( $resolutionunit ) {
                                                case 2:
                                                        $val = self::msg( 'XYResolution', 'i', self::formatNum( $val ) );
                                                        break;
@@ -208,7 +208,7 @@ class FormatMetadata {
                                        break;
 
                                case 'ColorSpace':
-                                       switch( $val ) {
+                                       switch ( $val ) {
                                        case 1: case 65535:
                                                $val = self::msg( $tag, $val );
                                                break;
@@ -219,7 +219,7 @@ class FormatMetadata {
                                        break;
 
                                case 'ComponentsConfiguration':
-                                       switch( $val ) {
+                                       switch ( $val ) {
                                        case 0: case 1: case 2: case 3: case 4: case 5: case 6:
                                                $val = self::msg( $tag, $val );
                                                break;
@@ -267,7 +267,7 @@ class FormatMetadata {
                                        break;
 
                                case 'ExposureProgram':
-                                       switch( $val ) {
+                                       switch ( $val ) {
                                        case 0: case 1: case 2: case 3: case 4: case 5: case 6: case 7: case 8:
                                                $val = self::msg( $tag, $val );
                                                break;
@@ -282,7 +282,7 @@ class FormatMetadata {
                                        break;
 
                                case 'MeteringMode':
-                                       switch( $val ) {
+                                       switch ( $val ) {
                                        case 0: case 1: case 2: case 3: case 4: case 5: case 6: case 7: case 255:
                                                $val = self::msg( $tag, $val );
                                                break;
@@ -293,7 +293,7 @@ class FormatMetadata {
                                        break;
 
                                case 'LightSource':
-                                       switch( $val ) {
+                                       switch ( $val ) {
                                        case 0: case 1: case 2: case 3: case 4: case 9: case 10: case 11:
                                        case 12: case 13: case 14: case 15: case 17: case 18: case 19: case 20:
                                        case 21: case 22: case 23: case 24: case 255:
@@ -328,7 +328,7 @@ class FormatMetadata {
                                        break;
 
                                case 'FocalPlaneResolutionUnit':
-                                       switch( $val ) {
+                                       switch ( $val ) {
                                        case 2:
                                                $val = self::msg( $tag, $val );
                                                break;
@@ -339,7 +339,7 @@ class FormatMetadata {
                                        break;
 
                                case 'SensingMethod':
-                                       switch( $val ) {
+                                       switch ( $val ) {
                                        case 1: case 2: case 3: case 4: case 5: case 7: case 8:
                                                $val = self::msg( $tag, $val );
                                                break;
@@ -350,7 +350,7 @@ class FormatMetadata {
                                        break;
 
                                case 'FileSource':
-                                       switch( $val ) {
+                                       switch ( $val ) {
                                        case 3:
                                                $val = self::msg( $tag, $val );
                                                break;
@@ -361,7 +361,7 @@ class FormatMetadata {
                                        break;
 
                                case 'SceneType':
-                                       switch( $val ) {
+                                       switch ( $val ) {
                                        case 1:
                                                $val = self::msg( $tag, $val );
                                                break;
@@ -372,7 +372,7 @@ class FormatMetadata {
                                        break;
 
                                case 'CustomRendered':
-                                       switch( $val ) {
+                                       switch ( $val ) {
                                        case 0: case 1:
                                                $val = self::msg( $tag, $val );
                                                break;
@@ -383,7 +383,7 @@ class FormatMetadata {
                                        break;
 
                                case 'ExposureMode':
-                                       switch( $val ) {
+                                       switch ( $val ) {
                                        case 0: case 1: case 2:
                                                $val = self::msg( $tag, $val );
                                                break;
@@ -394,7 +394,7 @@ class FormatMetadata {
                                        break;
 
                                case 'WhiteBalance':
-                                       switch( $val ) {
+                                       switch ( $val ) {
                                        case 0: case 1:
                                                $val = self::msg( $tag, $val );
                                                break;
@@ -405,7 +405,7 @@ class FormatMetadata {
                                        break;
 
                                case 'SceneCaptureType':
-                                       switch( $val ) {
+                                       switch ( $val ) {
                                        case 0: case 1: case 2: case 3:
                                                $val = self::msg( $tag, $val );
                                                break;
@@ -416,7 +416,7 @@ class FormatMetadata {
                                        break;
 
                                case 'GainControl':
-                                       switch( $val ) {
+                                       switch ( $val ) {
                                        case 0: case 1: case 2: case 3: case 4:
                                                $val = self::msg( $tag, $val );
                                                break;
@@ -427,7 +427,7 @@ class FormatMetadata {
                                        break;
 
                                case 'Contrast':
-                                       switch( $val ) {
+                                       switch ( $val ) {
                                        case 0: case 1: case 2:
                                                $val = self::msg( $tag, $val );
                                                break;
@@ -438,7 +438,7 @@ class FormatMetadata {
                                        break;
 
                                case 'Saturation':
-                                       switch( $val ) {
+                                       switch ( $val ) {
                                        case 0: case 1: case 2:
                                                $val = self::msg( $tag, $val );
                                                break;
@@ -449,7 +449,7 @@ class FormatMetadata {
                                        break;
 
                                case 'Sharpness':
-                                       switch( $val ) {
+                                       switch ( $val ) {
                                        case 0: case 1: case 2:
                                                $val = self::msg( $tag, $val );
                                                break;
@@ -460,7 +460,7 @@ class FormatMetadata {
                                        break;
 
                                case 'SubjectDistanceRange':
-                                       switch( $val ) {
+                                       switch ( $val ) {
                                        case 0: case 1: case 2: case 3:
                                                $val = self::msg( $tag, $val );
                                                break;
@@ -473,7 +473,7 @@ class FormatMetadata {
                                //The GPS...Ref values are kept for compatibility, probably won't be reached.
                                case 'GPSLatitudeRef':
                                case 'GPSDestLatitudeRef':
-                                       switch( $val ) {
+                                       switch ( $val ) {
                                        case 'N': case 'S':
                                                $val = self::msg( 'GPSLatitude', $val );
                                                break;
@@ -485,7 +485,7 @@ class FormatMetadata {
 
                                case 'GPSLongitudeRef':
                                case 'GPSDestLongitudeRef':
-                                       switch( $val ) {
+                                       switch ( $val ) {
                                        case 'E': case 'W':
                                                $val = self::msg( 'GPSLongitude', $val );
                                                break;
@@ -504,7 +504,7 @@ class FormatMetadata {
                                        break;
 
                                case 'GPSStatus':
-                                       switch( $val ) {
+                                       switch ( $val ) {
                                        case 'A': case 'V':
                                                $val = self::msg( $tag, $val );
                                                break;
@@ -515,7 +515,7 @@ class FormatMetadata {
                                        break;
 
                                case 'GPSMeasureMode':
-                                       switch( $val ) {
+                                       switch ( $val ) {
                                        case 2: case 3:
                                                $val = self::msg( $tag, $val );
                                                break;
@@ -528,7 +528,7 @@ class FormatMetadata {
                                case 'GPSTrackRef':
                                case 'GPSImgDirectionRef':
                                case 'GPSDestBearingRef':
-                                       switch( $val ) {
+                                       switch ( $val ) {
                                        case 'T': case 'M':
                                                $val = self::msg( 'GPSDirection', $val );
                                                break;
@@ -548,7 +548,7 @@ class FormatMetadata {
                                        break;
 
                                case 'GPSSpeedRef':
-                                       switch( $val ) {
+                                       switch ( $val ) {
                                        case 'K': case 'M': case 'N':
                                                $val = self::msg( 'GPSSpeed', $val );
                                                break;
@@ -559,7 +559,7 @@ class FormatMetadata {
                                        break;
 
                                case 'GPSDestDistanceRef':
-                                       switch( $val ) {
+                                       switch ( $val ) {
                                        case 'K': case 'M': case 'N':
                                                $val = self::msg( 'GPSDestDistance', $val );
                                                break;
@@ -646,7 +646,7 @@ class FormatMetadata {
                                        break;
 
                                case 'iimCategory':
-                                       switch( strtolower( $val ) ) {
+                                       switch ( strtolower( $val ) ) {
                                                // See pg 29 of IPTC photo
                                                // metadata standard.
                                                case 'ace': case 'clj':
@@ -791,7 +791,7 @@ class FormatMetadata {
                                        }
                                        break;
                                case 'Copyrighted':
-                                       switch( $val ) {
+                                       switch ( $val ) {
                                        case 'True': case 'False':
                                                $val = self::msg( $tag, $val );
                                                break;
@@ -863,7 +863,7 @@ class FormatMetadata {
                 */
                else {
                        global $wgContLang;
-                       switch( $type ) {
+                       switch ( $type ) {
                        case 'lang':
                                // Display default, followed by ContLang,
                                // followed by the rest in no particular
@@ -948,7 +948,7 @@ class FormatMetadata {
         * this is treated as wikitext not html).
         */
        private static function langItem( $value, $lang, $default = false, $noHtml = false ) {
-               if ( $lang === false && $default === false) {
+               if ( $lang === false && $default === false ) {
                        throw new MWException( '$lang and $default cannot both '
                                . 'be false.' );
                }
@@ -1125,7 +1125,7 @@ class FormatMetadata {
                        return $val;
                }
                $cat = '';
-               switch( substr( $val, 0, 2 ) ) {
+               switch ( substr( $val, 0, 2 ) ) {
                        case '01':
                                $cat = 'ace';
                                break;
index 6e04b3d..544dd21 100644 (file)
@@ -63,7 +63,7 @@ class IPTC {
                                wfDebugLog( 'iptc', "IPTC tag $tag had only whitespace as its value." );
                                continue;
                        }
-                       switch( $tag ) {
+                       switch ( $tag ) {
                                case '2#120': /*IPTC caption. mapped with exif ImageDescription*/
                                        $data['ImageDescription'] = self::convIPTC( $val, $c );
                                        break;
index c9a20f2..948a0f8 100644 (file)
@@ -144,7 +144,7 @@ class SVGReader {
                while ( $keepReading ) {
                        $tag = $this->reader->localName;
                        $type = $this->reader->nodeType;
-                       $isSVG = ($this->reader->namespaceURI == self::NS_SVG);
+                       $isSVG = ( $this->reader->namespaceURI == self::NS_SVG );
 
                        $this->debug( "$tag" );
 
@@ -241,7 +241,7 @@ class SVGReader {
                                && $this->reader->nodeType == XmlReader::END_ELEMENT ) {
                                break;
                        } elseif ( $this->reader->namespaceURI == self::NS_SVG && $this->reader->nodeType == XmlReader::ELEMENT ) {
-                               switch( $this->reader->localName ) {
+                               switch ( $this->reader->localName ) {
                                        case 'script':
                                                // Normally we disallow files with
                                                // <script>, but its possible
index b2b95e4..7eb3d19 100644 (file)
@@ -641,7 +641,7 @@ class XMPReader {
                        throw new MWException( "Hit end element </$elm> but no curItem" );
                }
 
-               switch( $this->mode[0] ) {
+               switch ( $this->mode[0] ) {
                        case self::MODE_IGNORE:
                                $this->endElementModeIgnore( $elm );
                                break;
@@ -1060,7 +1060,7 @@ class XMPReader {
                                . "encountered <$elm> with no mode" );
                }
 
-               switch( $this->mode[0] ) {
+               switch ( $this->mode[0] ) {
                        case self::MODE_IGNORE:
                                $this->startElementModeIgnore( $elm );
                                break;
index 7db6fab..e6342e4 100644 (file)
@@ -187,7 +187,7 @@ class CoreParserFunctions {
                if ( is_null( $magicWords ) ) {
                        $magicWords = new MagicWordArray( array( 'url_path', 'url_query', 'url_wiki' ) );
                }
-               switch( $magicWords->matchStartToEnd( $arg ) ) {
+               switch ( $magicWords->matchStartToEnd( $arg ) ) {
 
                        // Encode as though it's a wiki page, '_' for ' '.
                        case 'url_wiki':
@@ -440,7 +440,7 @@ class CoreParserFunctions {
        static function pagesinnamespace( $parser, $namespace = 0, $raw = null ) {
                return self::formatRaw( SiteStats::pagesInNs( intval( $namespace ) ), $raw );
        }
-       static function numberingroup( $parser, $name = '', $raw = null) {
+       static function numberingroup( $parser, $name = '', $raw = null ) {
                return self::formatRaw( SiteStats::numberingroup( strtolower( $name ) ), $raw );
        }
 
@@ -834,9 +834,9 @@ class CoreParserFunctions {
                if ( $old === false || $old == $text || $arg ) {
                        return '';
                } else {
-                       return( '<span class="error">' .
+                       return '<span class="error">' .
                                wfMessage( 'duplicate-defaultsort', $old, $text )->inContentLanguage()->escaped() .
-                               '</span>' );
+                               '</span>';
                }
        }
 
index c5dd09b..0a69b04 100644 (file)
@@ -156,10 +156,10 @@ class DateFormatter {
                }
                for ( $i = 1; $i <= self::LAST; $i++ ) {
                        $this->mSource = $i;
-                       if ( isset ( $this->rules[$preference][$i] ) ) {
+                       if ( isset( $this->rules[$preference][$i] ) ) {
                                # Specific rules
                                $this->mTarget = $this->rules[$preference][$i];
-                       } elseif ( isset ( $this->rules[self::ALL][$i] ) ) {
+                       } elseif ( isset( $this->rules[self::ALL][$i] ) ) {
                                # General rules
                                $this->mTarget = $this->rules[self::ALL][$i];
                        } elseif ( $preference ) {
@@ -357,7 +357,7 @@ class DateFormatter {
         */
        function makeNormalYear( $iso ) {
                if ( $iso[0] == '-' ) {
-                       $text = (intval( substr( $iso, 1 ) ) + 1) . ' BC';
+                       $text = ( intval( substr( $iso, 1 ) ) + 1 ) . ' BC';
                } else {
                        $text = intval( $iso );
                }
index ab69256..47a09c4 100644 (file)
@@ -2510,10 +2510,10 @@ class Parser {
                for ( $i = 0; $i < $len; $i++ ) {
                        $c = $str[$i];
 
-                       switch( $state ) {
+                       switch ( $state ) {
                        # (Using the number is a performance hack for common cases)
                        case 0: # self::COLON_STATE_TEXT:
-                               switch( $c ) {
+                               switch ( $c ) {
                                case "<":
                                        # Could be either a <start> tag or an </end> tag
                                        $state = self::COLON_STATE_TAGSTART;
@@ -2558,7 +2558,7 @@ class Parser {
                                break;
                        case 1: # self::COLON_STATE_TAG:
                                # In a <tag>
-                               switch( $c ) {
+                               switch ( $c ) {
                                case ">":
                                        $stack++;
                                        $state = self::COLON_STATE_TEXT;
@@ -2572,7 +2572,7 @@ class Parser {
                                }
                                break;
                        case 2: # self::COLON_STATE_TAGSTART:
-                               switch( $c ) {
+                               switch ( $c ) {
                                case "/":
                                        $state = self::COLON_STATE_CLOSETAG;
                                        break;
@@ -4670,7 +4670,7 @@ class Parser {
         * @return mixed An expanded string, or false if invalid.
         */
        function validateSig( $text ) {
-               return( Xml::isWellFormedXmlFragment( $text ) ? $text : false );
+               return Xml::isWellFormedXmlFragment( $text ) ? $text : false;
        }
 
        /**
@@ -5236,7 +5236,7 @@ class Parser {
                                                $validated = $handler->validateParam( $paramName, $value );
                                        } else {
                                                # Validate internal parameters
-                                               switch( $paramName ) {
+                                               switch ( $paramName ) {
                                                case 'manualthumb':
                                                case 'alt':
                                                case 'class':
index de9e99c..13e8a00 100644 (file)
@@ -93,7 +93,7 @@ class SearchEngine {
         * @return Boolean
         */
        public function supports( $feature ) {
-               switch( $feature ) {
+               switch ( $feature ) {
                case 'list-redirects':
                        return true;
                case 'title-suffix-filter':
index f63931d..c219b92 100644 (file)
@@ -211,7 +211,7 @@ class SearchMySQL extends SearchEngine {
        }
 
        public function supports( $feature ) {
-               switch( $feature ) {
+               switch ( $feature ) {
                case 'list-redirects':
                case 'title-suffix-filter':
                        return true;
index b2b2946..4da5155 100644 (file)
@@ -57,7 +57,7 @@ class SpecialUnblock extends SpecialPage {
                $form->addPreText( $this->msg( 'unblockiptext' )->parseAsBlock() );
 
                if ( $form->show() ) {
-                       switch( $this->type ) {
+                       switch ( $this->type ) {
                                case Block::TYPE_USER:
                                case Block::TYPE_IP:
                                        $out->addWikiMsg( 'unblocked', wfEscapeWikiText( $this->target ) );
@@ -106,7 +106,7 @@ class SpecialUnblock extends SpecialPage {
                        } else {
                                $fields['Target']['default'] = $target;
                                $fields['Target']['type'] = 'hidden';
-                               switch( $type ) {
+                               switch ( $type ) {
                                        case Block::TYPE_USER:
                                        case Block::TYPE_IP:
                                                $fields['Name']['default'] = Linker::link(
index 6fb133a..ee737c6 100644 (file)
@@ -530,7 +530,7 @@ class SpecialUpload extends SpecialPage {
        protected function processVerificationError( $details ) {
                global $wgFileExtensions;
 
-               switch( $details['status'] ) {
+               switch ( $details['status'] ) {
 
                        /** Statuses that only require name changing **/
                        case UploadBase::MIN_LENGTH_PARTNAME:
index 624975e..bb57e6c 100644 (file)
@@ -973,6 +973,29 @@ class LoginForm extends SpecialPage {
                );
        }
 
+       /**
+        * Add a "return to" link or redirect to it.
+        * Extensions can use this to reuse the "return to" logic after
+        * inject steps (such as redirection) into the login process.
+        *
+        * @param $type string, one of the following:
+        *    - error: display a return to link ignoring $wgRedirectOnLogin
+        *    - success: display a return to link using $wgRedirectOnLogin if needed
+        *    - successredirect: send an HTTP redirect using $wgRedirectOnLogin if needed
+        * @param string $returnTo
+        * @param array|string $returnToQuery
+        * @param bool $stickHTTPs Keep redirect link on HTTPs
+        * @since 1.22
+        */
+       public function showReturnToPage(
+               $type, $returnTo = '', $returnToQuery = '', $stickHTTPs = false
+       ) {
+               $this->mReturnTo = $returnTo;
+               $this->mReturnToQuery = $returnToQuery;
+               $this->mStickHTTPS = $stickHTTPs;
+               $this->executeReturnTo( $type );
+       }
+
        /**
         * Add a "return to" link or redirect to it.
         *
index b01058a..c257dd4 100644 (file)
@@ -515,9 +515,9 @@ class SpecialVersion extends SpecialPage {
                }
 
                # Make description text.
-               $description = isset ( $extension['description'] ) ? $extension['description'] : '';
+               $description = isset( $extension['description'] ) ? $extension['description'] : '';
 
-               if ( isset ( $extension['descriptionmsg'] ) ) {
+               if ( isset( $extension['descriptionmsg'] ) ) {
                        # Look for a localized description.
                        $descriptionMsg = $extension['descriptionmsg'];
 
@@ -540,7 +540,7 @@ class SpecialVersion extends SpecialPage {
                                <td colspan=\"2\"><em>$mainLink $versionText</em></td>";
                }
 
-               $author = isset ( $extension['author'] ) ? $extension['author'] : array();
+               $author = isset( $extension['author'] ) ? $extension['author'] : array();
                $extDescAuthor = "<td>$description</td>
                        <td>" . $this->listAuthors( $author, false ) . "</td>
                        </tr>\n";
index ff4313f..0296a63 100644 (file)
@@ -76,7 +76,7 @@ class SpecialWatchlist extends SpecialPage {
                $mode = SpecialEditWatchlist::getMode( $request, $par );
                if ( $mode !== false ) {
                        # TODO: localise?
-                       switch( $mode ) {
+                       switch ( $mode ) {
                                case SpecialEditWatchlist::EDIT_CLEAR:
                                        $mode = 'clear';
                                        break;
@@ -163,7 +163,7 @@ class SpecialWatchlist extends SpecialPage {
                        $big = 1000; /* The magical big */
                        if ( $nitems > $big ) {
                                # Set default cutoff shorter
-                               $values['days'] = $defaults['days'] = (12.0 / 24.0); # 12 hours...
+                               $values['days'] = $defaults['days'] = ( 12.0 / 24.0 ); # 12 hours...
                        } else {
                                $values['days'] = $defaults['days']; # default cutoff for shortlisters
                        }
index 0472b8d..0366aef 100644 (file)
@@ -71,7 +71,7 @@ class UsercreateTemplateVForm extends BaseTemplate {
 ?>
                <div class="<?php $this->text( 'messagetype' ); ?>box">
                <?php if ( $this->data['messagetype'] == 'error' ) { ?>
-                       <strong><?php $this->msg( 'loginerror' )?></strong><br />
+                       <strong><?php $this->msg( 'createacct-error' ); ?></strong><br />
                <?php } ?>
                <?php $this->html( 'message' ); ?>
                </div>
index 9651f3d..ff87f89 100644 (file)
@@ -1822,7 +1822,7 @@ class Language {
                }
                $start = substr( $str, 0, strlen( $str ) - 2 );
                $end = substr( $str, strlen( $str ) - 2 );
-               switch( $end ) {
+               switch ( $end ) {
                        case 'כ':
                                $str = $start . 'ך';
                                break;
index c8c06f3..c0bdc3f 100644 (file)
@@ -303,7 +303,7 @@ class KkConverter extends LanguageConverter {
                global $wgLanguageCode;
                $text = parent::translate( $text, $toVariant );
 
-               switch( $toVariant ) {
+               switch ( $toVariant ) {
                        case 'kk-cyrl':
                        case 'kk-kz':
                                $letters = KK_L_UC . KK_L_LC . 'ʺʹ#0123456789';
@@ -347,7 +347,7 @@ class KkConverter extends LanguageConverter {
                        return $text;
                }
 
-               switch( $toVariant ) {
+               switch ( $toVariant ) {
                        case 'kk-arab':
                        case 'kk-cn':
                                $letters = KK_C_LC . KK_C_UC/*.KK_L_LC.KK_L_UC*/;
index 8823dd5..ca1e8a3 100644 (file)
@@ -562,9 +562,13 @@ $2',
 'welcomecreation-msg' => 'Иҫәп яҙыуығыҙ яһалды.
 Шәхси [[Special:Preferences|{{SITENAME}} көйләүҙәрен]] үҙегеҙгә уңайлы итеп үҙгәртергә онотмағыҙ.',
 'yourname' => 'Ҡатнашыусы исеме',
+'userlogin-yourname' => 'Ҡулланыусы исеме',
 'yourpassword' => 'Һеҙҙең пароль',
+'userlogin-yourpassword' => 'Пароль',
+'userlogin-yourpassword-ph' => 'Яңы паролде яҙығыҙ',
 'yourpasswordagain' => 'Паролде ҡабаттан яҙыу',
 'remembermypassword' => 'Был компьютерҙа паролемде иҫләргә ($1 {{PLURAL:$1|көндән|көндән}} күп түгел)',
+'userlogin-remembermypassword' => 'Хәтерҙә ҡалдырырға',
 'securelogin-stick-https' => 'Танылғандан һуң HTTPS менән бәйләнеште ҡалдырырға',
 'yourdomainname' => 'Һеҙҙең домен',
 'password-change-forbidden' => 'Был викила паролегеҙҙе үҙгәртә алмайһығыҙ.',
index 8afa70e..c274d36 100644 (file)
@@ -506,7 +506,7 @@ $2',
 'userlogout' => 'প্রস্থান',
 'notloggedin' => 'আপনি সংযুক্ত নন',
 'userlogin-noaccount' => 'কোনও অ্যাকাউন্ট নেই?',
-'userlogin-joinproject' => '{{SITENAME}}য় অংশগ্রহন করুন',
+'userlogin-joinproject' => '{{SITENAME}}-এ অংশগ্রহন করুন',
 'nologin' => "আপনার কি উইকিপিডিয়াতে অ্যাকাউন্ট নেই? তাহলে '''$1'''।",
 'nologinlink' => 'অ্যাকাউন্ট তৈরি করুন',
 'createaccount' => 'নতুন অ্যাকাউন্ট খুলুন',
index 63c41f2..8a2cfca 100644 (file)
@@ -2210,7 +2210,7 @@ Fremtidige ændringer af denne side og dens tilknyttede diskussionsside vil bliv
 'watchmethod-list' => 'Tjekker seneste ændringer for sider i din overvågningsliste',
 'watchlistcontains' => 'Din overvågningsliste indeholder $1 {{PLURAL:$1|side|sider}}.',
 'iteminvalidname' => "Problem med '$1', ugyldigt navn...",
-'wlnote' => "Nedenfor ses {{PLURAL:$1|den seneste ændring|de seneste '''$1''' ændringer}} i {{PLURAL:$2|den sidste time|'''de sidste $2 timer}}''' fra den $3, kl. $4.",
+'wlnote' => "Nedenfor ses {{PLURAL:$1|den seneste ændring|de seneste '''$1''' ændringer}} i {{PLURAL:$2|den sidste time|'''de sidste $2 timer}}''' op til den $3 kl. $4.",
 'wlshowlast' => 'Vis de seneste $1 timer $2 dage $3',
 'watchlist-options' => 'Indstillinger for overvågningslisten',
 
index e28b26b..a9fd166 100644 (file)
@@ -1449,7 +1449,7 @@ Einzelheiten sind im [{{fullurl:{{#Special:Log}}/delete|page={{FULLPAGENAMEE}}}}
 'searchprofile-advanced' => 'Erweitert',
 'searchprofile-articles-tooltip' => 'Suchen in $1',
 'searchprofile-project-tooltip' => 'Suchen in $1',
-'searchprofile-images-tooltip' => 'Nach Bildern suchen',
+'searchprofile-images-tooltip' => 'Nach Dateien suchen',
 'searchprofile-everything-tooltip' => 'Gesamten Inhalt durchsuchen (inklusive Diskussionsseiten)',
 'searchprofile-advanced-tooltip' => 'Suche in weiteren Namensräumen',
 'search-result-size' => '$1 ({{PLURAL:$2|1 Wort|$2 Wörter}})',
@@ -1792,8 +1792,8 @@ Stand: $4, $5 Uhr.",
 'rc-change-size' => '$1 {{PLURAL:$1|Byte|Bytes}}',
 'rc-change-size-new' => '$1 {{PLURAL:$1|Byte|Bytes}} nach der Änderung',
 'newsectionsummary' => 'Neuer Abschnitt /* $1 */',
-'rc-enhanced-expand' => 'Details anzeigen (benötigt JavaScript)',
-'rc-enhanced-hide' => 'Details verstecken',
+'rc-enhanced-expand' => 'Einzelheiten anzeigen (benötigt JavaScript)',
+'rc-enhanced-hide' => 'Einzelheiten verstecken',
 'rc-old-title' => 'ursprünglich erstellt als „$1“',
 
 # Recent changes linked
index 0f79d34..cf8af7c 100644 (file)
@@ -2091,12 +2091,12 @@ gıreyê her satıri de gıreyi; raş motışê yewın u dıyıni esto.
 'brokenredirects-edit' => 'bıvurne',
 'brokenredirects-delete' => 'bestere',
 
-'withoutinterwiki' => 'Peleyê ke zıwanan de bina re gırey cı çınyo',
+'withoutinterwiki' => 'Pelê ke zıwananê binan rê gıreyê cı çıniyo',
 'withoutinterwiki-summary' => 'Enê pelî ke versiyonê ziwanî binî ra link nidano.',
 'withoutinterwiki-legend' => 'Verole',
 'withoutinterwiki-submit' => 'Bımocne',
 
-'fewestrevisions' => 'Peleyê ke cı sero tewr tayn timaryayış vıraziyayo',
+'fewestrevisions' => 'Pelê be senık çımraviyarnayışi',
 
 # Miscellaneous special pages
 'nbytes' => '$1 {{PLURAL:$1|bayt|bayti}}',
@@ -2114,17 +2114,17 @@ gıreyê her satıri de gıreyi; raş motışê yewın u dıyıni esto.
 'uncategorizedpages' => 'Pelayanê ke kategorî nibiye',
 'uncategorizedcategories' => 'Kategoriyê ke bê kategorîyê',
 'uncategorizedimages' => 'Dosyayê ke bê kategoriyê',
-'uncategorizedtemplates' => 'Şablonê ke bê kategoriyê',
+'uncategorizedtemplates' => 'Şablonê ke bêkategoriyê',
 'unusedcategories' => 'Kategoriyê ke nê xebtênê',
 'unusedimages' => 'Dosyeyê ke nê xebtênê',
 'popularpages' => 'Pelî ke populer o.',
 'wantedcategories' => 'Kategoriye ke waştênê',
 'wantedpages' => 'Peleye ke waştênê',
 'wantedpages-badtitle' => 'sernuşte meqbul niyo: $1',
-'wantedfiles' => 'Dosyeye ke waştênê',
+'wantedfiles' => 'Dosyeyê cıgeyriyayey',
 'wantedfiletext-cat' => 'Dosyaya cêrên karvıstedeya lakin çınya. Mewcud dosyayan de xeriba miyan de liste bena. Xırabiya wınisin dana <del>ateber</del>. Zewbi zi, şırê pela da dosyeyê ke çınyaya [[:$1]].',
 'wantedfiletext-nocat' => 'Dosyeyê cêrêni estê lekin karnêvıstê. Dosyeyê xeribi liste benê. bo babeta dano <del>ateber</del>',
-'wantedtemplates' => 'Şablonê ke waştênê',
+'wantedtemplates' => 'Şablonê ke waziyenê',
 'mostlinked' => 'Pelî ke tewr zafî lînk bîy.',
 'mostlinkedcategories' => 'Kategorî ke tewr zafî lînk bîy.',
 'mostlinkedtemplates' => 'Şablonê ke tewr zafî pela re gıre bîye.',
@@ -2136,14 +2136,14 @@ gıreyê her satıri de gıreyi; raş motışê yewın u dıyıni esto.
 'prefixindex-namespace' => 'Peleyê Veroleyıni ($1 cay nami)',
 'shortpages' => 'Pelê kılmeki',
 'longpages' => 'Peleyê dergeki',
-'deadendpages' => 'pelê ke pelê binan re gırey nêeşto',
+'deadendpages' => 'Pelê nêgıredayey',
 'deadendpagestext' => 'Ena pelan ke {{SITENAME}} de zerrî ey de link çini yo.',
-'protectedpages' => 'Pelayê ke biyê star',
+'protectedpages' => 'Pelê pawıtiyey',
 'protectedpages-indef' => 'têna pawıteyê bêmuddeti',
 'protectedpages-cascade' => 'Kilit biyaye ke teyna cascadiye',
 'protectedpagestext' => 'pelê cêrınî pawiyenê',
 'protectedpagesempty' => 'pê ney parametreyan pelê pawiteyi çinî',
-'protectedtitles' => 'Sernameyê ke starênê',
+'protectedtitles' => 'Sernameyê pawıtiyey',
 'protectedtitlestext' => 'sernameyê cêrıni pawıte yî',
 'protectedtitlesempty' => 'pê ney parametreyan sernuşteyê pawite çinê',
 'listusers' => 'Listeyê Karberan',
@@ -2504,9 +2504,9 @@ Tı eşkeno seviyeye kılit kerdışi bıvurno, feqat tı nıeşken "cascading p
 'restriction-upload' => 'Bar ke',
 
 # Restriction levels
-'restriction-level-sysop' => 'pawıtışê tamamîye',
-'restriction-level-autoconfirmed' => 'nêm-pawıtış',
-'restriction-level-all' => 'seviye ya ke raşt ame',
+'restriction-level-sysop' => 'tam pawiyayo',
+'restriction-level-autoconfirmed' => 'nêm pawiyayo',
+'restriction-level-all' => 'heme yew sewiya',
 
 # Undelete
 'undelete' => 'Peleyê ke besterneyayê enê bımocnê',
@@ -4053,14 +4053,14 @@ Resımi be tam asayış mocniyayê, tipê dosyaê bini be programê cıyo elaqed
 * Xısusi pelaya normal
 * <span class="mw-specialpagerestricted">Xısusi peleyê keı rê ray nê deyaya.</span>
 * <strong class="mw-specialpagerestricted">Peleya xısusiya ke grota verhefıza.</strong>',
-'specialpages-group-maintenance' => 'Raporê pak tepiştîşî',
+'specialpages-group-maintenance' => 'Raporê tepıştışi',
 'specialpages-group-other' => 'Pelê xasiyê bini',
 'specialpages-group-login' => 'Cı kewe / hesab vıraze',
 'specialpages-group-changes' => 'Vurnayişê peni u logan',
 'specialpages-group-media' => 'Raporê medya u bar kerdîşî',
 'specialpages-group-users' => 'Karber u heqqî',
 'specialpages-group-highuse' => 'Peleyê ke vêşi karênê',
-'specialpages-group-pages' => 'listeyanê pelan',
+'specialpages-group-pages' => 'Listeyê pelan',
 'specialpages-group-pagetools' => 'Haletê pelan',
 'specialpages-group-wiki' => 'Melumat u haceti',
 'specialpages-group-redirects' => 'Pela xasîyê ke heteneyayê',
index 00bf2ba..8191f59 100644 (file)
@@ -1136,12 +1136,13 @@ Do not forget to change your [[Special:Preferences|{{SITENAME}} preferences]].',
 'createacct-benefit-head2'        => '{{NUMBEROFARTICLES}}',
 'createacct-benefit-body2'        => 'pages',
 'createacct-benefit-icon3'        => 'icon-contributors',
-'createacct-benefit-head3'        => '{{NUMBEROFUSERS}}',
+'createacct-benefit-head3'        => '{{NUMBEROFACTIVEUSERS}}',
 'createacct-benefit-body3'        => 'contributors this month',
 'badretype'                    => 'The passwords you entered do not match.',
 'userexists'                   => 'Username entered already in use.
 Please choose a different name.',
 'loginerror'                   => 'Login error',
+'createacct-error'             => 'Account creation error',
 'createaccounterror'           => 'Could not create account: $1',
 'nocookiesnew'                 => 'The user account was created, but you are not logged in.
 {{SITENAME}} uses cookies to log in users.
@@ -3917,20 +3918,19 @@ By executing it, your system may be compromised.",
 'ago'            => '$1 ago',
 'just-now'       => 'just now',
 
-'hours-ago'      => '$1 {{PLURAL:$1|hour|hours}} ago',
-'minutes-ago'    => '$1 {{PLURAL:$1|minute|minutes}} ago',
-'seconds-ago'    => '$1 {{PLURAL:$1|seconds|seconds}} ago',
-
-'monday-at'      => 'Monday at $1',
-'tuesday-at'     => 'Tuesday at $1',
-'wednesday-at'   => 'Wednesday at $1',
-'thursday-at'    => 'Thursday at $1',
-'friday-at'      => 'Friday at $1',
-'saturday-at'    => 'Saturday at $1',
-'sunday-at'      => 'Sunday at $1',
-
-'today-at'       => '$1',
-'yesterday-at'   => 'Yesterday at $1',
+# Human-readable timestamps
+'hours-ago'    => '$1 {{PLURAL:$1|hour|hours}} ago',
+'minutes-ago'  => '$1 {{PLURAL:$1|minute|minutes}} ago',
+'seconds-ago'  => '$1 {{PLURAL:$1|seconds|seconds}} ago',
+'monday-at'    => 'Monday at $1',
+'tuesday-at'   => 'Tuesday at $1',
+'wednesday-at' => 'Wednesday at $1',
+'thursday-at'  => 'Thursday at $1',
+'friday-at'    => 'Friday at $1',
+'saturday-at'  => 'Saturday at $1',
+'sunday-at'    => 'Sunday at $1',
+'today-at'     => '$1',
+'yesterday-at' => 'Yesterday at $1',
 
 # Bad image list
 'bad_image_list' => 'The format is as follows:
index 0d41e46..f570b42 100644 (file)
@@ -422,6 +422,8 @@ $messages = array(
 'nov' => 'Nov',
 'dec' => 'Dec',
 
+'today-at' => '$1',
+
 # Categories related messages
 'pagecategories' => '{{PLURAL:$1|Kategorio|Kategorioj}}',
 'category_header' => 'Artikoloj en kategorio "$1"',
@@ -730,9 +732,14 @@ Notu ke iuj paĝoj daŭre ŝajnos kvazaŭ vi ankoraŭ estus ensalutinta, ĝis vi
 'welcomecreation-msg' => 'Via konto estas kreita.
 Ne forgesu ŝanĝi viajn [[Special:Preferences|{{SITENAME}}-preferojn]]',
 'yourname' => 'Salutnomo:',
+'userlogin-yourname' => 'Uzantonomo',
+'userlogin-yourname-ph' => 'Enigu vian uzantonomon',
 'yourpassword' => 'Pasvorto:',
+'userlogin-yourpassword' => 'Pasvorto',
+'userlogin-yourpassword-ph' => 'Enigu vian pasvorton',
 'yourpasswordagain' => 'Retajpu pasvorton',
 'remembermypassword' => 'Memori mian ensalutadon ĉe ĉi tiu komputilo (daŭrante maksimume $1 {{PLURAL:$1|tagon|tagojn}})',
+'userlogin-remembermypassword' => 'Memoru min',
 'securelogin-stick-https' => 'Resti konektita al HTTPS post ensalutado',
 'yourdomainname' => 'Via domajno',
 'password-change-forbidden' => 'Ve ne povas ŝanĝi pasvortojn en ĉi tiu vikio.',
@@ -745,12 +752,14 @@ Ne forgesu ŝanĝi viajn [[Special:Preferences|{{SITENAME}}-preferojn]]',
 'logout' => 'Elsaluti',
 'userlogout' => 'Elsaluti',
 'notloggedin' => 'Ne ensalutinta',
+'userlogin-noaccount' => 'Ĉu vi ne havas konton?',
 'nologin' => "Ĉu vi ne havas konton? '''$1'''.",
 'nologinlink' => 'Krei konton',
 'createaccount' => 'Krei novan konton',
 'gotaccount' => "Ĉu vi jam havas konton? '''$1'''.",
 'gotaccountlink' => 'Ensaluti',
 'userlogin-resetlink' => 'Ĉu vi forgesis ensalutajn detalojn?',
+'userlogin-helplink' => '[[{{MediaWiki:helplogin-url}}|Helpo pri ensalutado]]',
 'createaccountmail' => 'Uzi provizoran hazardsignan pasvorton kaj sendi ĝin al la retpoŝto suben',
 'createaccountreason' => 'Kialo:',
 'badretype' => 'La pasvortojn kiujn vi tajpis ne egalas.',
@@ -822,6 +831,7 @@ Bonvolu ĝisatendi antaŭ retrovi.',
 # Email sending
 'php-mail-error-unknown' => 'Nekonata eraro en la funkcio mail() de PHP',
 'user-mail-no-addy' => 'Provis sendi retpoŝton sen retpoŝtadreso.',
+'user-mail-no-body' => 'Provo sendi malplenan aŭ sensence mallongan retpošton.',
 
 # Change password dialog
 'resetpass' => 'Ŝanĝi pasvorton',
@@ -843,9 +853,10 @@ Vi eble jam ŝanĝis vian pasvorton aŭ petis novan provizoran pasvorton.',
 
 # Special:PasswordReset
 'passwordreset' => 'Restarigo de pasvorto',
-'passwordreset-text' => 'Plenumigu ĉi tiun formularon por ricevi retpoŝtan memoraĵon de viaj kontaj detaloj.',
+'passwordreset-text' => 'Plenigu ĉi tiun formularon por renovigi vian pasvorton.',
 'passwordreset-legend' => 'Refari pasvorton',
 'passwordreset-disabled' => 'Pasvortaj restarigoj estis malŝaltitaj en ĉi tiu vikio.',
+'passwordreset-emaildisabled' => 'Retpoŝtaj funkcioj estas malfunkciigitaj en tiu ĉi vikio.',
 'passwordreset-pretext' => '{{PLURAL:$1||Enigi unu el la jenaj datenoj}}',
 'passwordreset-username' => 'Salutnomo:',
 'passwordreset-domain' => 'Domajno:',
@@ -875,9 +886,9 @@ aŭ se vi memoris vian originalan pasvorton, kaj vi ne plu volas ŝanĝi
 ĝin, vi povas ignori ĉi tiun mesaĝon kaj uzi vian malnovan pasvorton.',
 'passwordreset-emailelement' => 'Salutnomo: $1
 Provizora pasvorto: $2',
-'passwordreset-emailsent' => 'Rememoriga retpoŝto estis sendita.',
-'passwordreset-emailsent-capture' => 'Memoriga retpoŝto estis sendita, kiu estas montrata sube.',
-'passwordreset-emailerror-capture' => 'Memoriga retpoŝto estis generita, montrata sube, sed sendado al uzanto malsukcesis: $1',
+'passwordreset-emailsent' => 'Renovigita pasvorto estis retpoŝte sendita.',
+'passwordreset-emailsent-capture' => 'Retpoŝto kun renovigita pasvorto estis sendita, kiu estas montrata sube.',
+'passwordreset-emailerror-capture' => 'Retpoŝto kun renovigita pasvorto estis generita, montrata sube, sed sendado al uzanto malsukcesis: $1',
 
 # Special:ChangeEmail
 'changeemail' => 'Ŝanĝi retpoŝtadreson',
@@ -1359,7 +1370,7 @@ Detaloj troveblos en la [{{fullurl:{{#Special:Log}}/delete|page={{FULLPAGENAMEE}
 'search-interwiki-default' => '$1 rezultoj:',
 'search-interwiki-more' => '(plu)',
 'search-relatedarticle' => 'Relataj',
-'mwsuggest-disable' => 'Malŝalti AJAX-sugestojn',
+'mwsuggest-disable' => 'Malŝalti serĉajn sugestojn',
 'searcheverything-enable' => 'Traserĉi ĉiujn nomspacojn',
 'searchrelated' => 'rilataj',
 'searchall' => 'ĉiuj',
@@ -1380,6 +1391,7 @@ Provu prefiksi vian mendon kun ''all:'' por serĉi ĉiun enhavon (inkluzivante d
 'search-external' => 'Ekstera serĉo',
 'searchdisabled' => '<p>Oni provizore malŝaltis serĉadon per la plenteksta
 indekso pro troŝarĝita servilo. Intertempe, vi povas serĉi per <i>guglo</i> aŭ per <i>jahu!</i>:</p>',
+'search-error' => 'Okazis eraro dum serĉado: $1',
 
 # Preferences page
 'preferences' => 'Preferoj',
@@ -2447,6 +2459,7 @@ Vidu [[Special:ProtectedPages|liston de protektitaj paĝoj]] por listo de aktual
 'prot_1movedto2' => '[[$1]] movita al [[$2]]',
 'protect-badnamespace-title' => 'Ne-protektebla nomspaco',
 'protect-badnamespace-text' => 'Paĝoj en ĉi tiu datumbazo ne povas esti protektita.',
+'protect-norestrictiontypes-title' => 'Neprotektebla paĝo',
 'protect-legend' => 'Konfirmi protektadon',
 'protectcomment' => 'Kialo:',
 'protectexpiry' => 'Eksvalidiĝas:',
@@ -2462,9 +2475,9 @@ Jen la aktualaj valoroj por la paĝo '''$1''':",
 'protect-cascadeon' => 'Ĉi paĝo estas nun protektita kontraŭ redaktado ĉar ĝi estas inkluzivita en {{PLURAL:$1|jena paĝo, kiu mem estas protektita|jenaj paĝoj, kiuj mem estas protektitaj}} per kaskada protekto.
 Vi povas ŝanĝi ties protektnivelon, sed tio ne ŝanĝos la kaskadan protekton.',
 'protect-default' => 'Permesigi ĉiujn uzantojn',
-'protect-fallback' => 'Rajto "$1" nepras.',
+'protect-fallback' => 'Permesi nur uzantojn kun la rajto  "$1"',
 'protect-level-autoconfirmed' => 'Bloki novajn kaj neregistritajn uzantojn',
-'protect-level-sysop' => 'Nur administrantoj',
+'protect-level-sysop' => 'Permesi nur administrantojn',
 'protect-summary-cascade' => 'kaskada',
 'protect-expiring' => 'finiĝas je $1 (UTC)',
 'protect-expiring-local' => 'eksdatiĝas $1',
@@ -3106,6 +3119,7 @@ Datoj de versioj kaj nomoj de redaktantoj estos preservitaj.
 'pageinfo-robot-noindex' => 'Ne indeksebla',
 'pageinfo-views' => 'Nombro de rigardoj',
 'pageinfo-watchers' => 'Nombro de paĝatentantoj',
+'pageinfo-few-watchers' => 'Malpli ol $1 {{PLURAL:$1|atentanto|atentantoj}}',
 'pageinfo-redirects-name' => 'Alidirektoj al ĉi tiu paĝo',
 'pageinfo-subpages-name' => 'Subpaĝoj de ĉi tiu paĝo',
 'pageinfo-subpages-value' => '$1 ($2 {{PLURAL:$2|alidirektilo|alidirektiloj}}; $3 {{PLURAL:$3|ne-alidirektilo|ne-alidirektiloj}})',
@@ -3213,6 +3227,7 @@ $1',
 'minutes' => '{{PLURAL:$1|$1 minuto|$1 minutoj}}',
 'hours' => '{{PLURAL:$1|$1 horo|$1 horoj}}',
 'days' => '{{PLURAL:$1|$1 tago|$1 tagoj}}',
+'weeks' => '{{PLURAL:$1|$1 semajno|$1 semajnoj}}',
 'months' => '{{PLURAL:$1|$1 monato|$1 monatoj}}',
 'years' => '{{PLURAL:$1|$1 jaro|$1 jaroj}}',
 'ago' => 'antaŭ $1',
@@ -3989,6 +4004,8 @@ Bildoj montriĝas en plena distingivo, aliaj dosiertipoj estas malfermataj rekte
 'htmlform-submit' => 'Ek!',
 'htmlform-reset' => 'Malfari ŝanĝojn',
 'htmlform-selectorother-other' => 'Alia',
+'htmlform-no' => 'Ne',
+'htmlform-yes' => 'Jes',
 
 # SQLite database support
 'sqlite-has-fts' => '$1 kun tut-teksta subteno',
@@ -3999,13 +4016,13 @@ Bildoj montriĝas en plena distingivo, aliaj dosiertipoj estas malfermataj rekte
 'logentry-delete-restore' => '$1 restarigis paĝon $3',
 'logentry-delete-event' => '$1 ŝanĝis videblecon de {{PLURAL:$5|protokola evento|$5 protokolaj eventoj}} je $3: $4',
 'logentry-delete-revision' => '$1 ŝanĝis videblecon de {{PLURAL:$5|revizio|$5 reviziojn}} je paĝo $3: $4',
-'logentry-delete-event-legacy' => '$1 ŝanĝis vidiblecon de protokolaj eventoj en $3',
-'logentry-delete-revision-legacy' => '$1 ŝanĝis vidiblecon de revizioj en $3',
+'logentry-delete-event-legacy' => '$1 ŝanĝis videblecon de protokolaj eventoj en $3',
+'logentry-delete-revision-legacy' => '$1 ŝanĝis videblecon de revizioj en $3',
 'logentry-suppress-delete' => '$1 kaŝis paĝon $3',
 'logentry-suppress-event' => '$1 kaŝite ŝanĝis videblecon de {{PLURAL:$5|protokola evento|$5 protokolaj eventoj}} je $3: $4',
 'logentry-suppress-revision' => '$1 kaŝite ŝanĝis videblecon de {{PLURAL:$5|revizio|$5 reviziojn}} je paĝo $3: $4',
-'logentry-suppress-event-legacy' => '$1 kaŝite ŝanĝis vidiblecon de protokolaj eventoj en $3',
-'logentry-suppress-revision-legacy' => '$1 kaŝite ŝanĝis vidiblecon de revizioj en paĝo $3',
+'logentry-suppress-event-legacy' => '$1 kaŝite ŝanĝis videblecon de protokolaj eventoj en $3',
+'logentry-suppress-revision-legacy' => '$1 kaŝite ŝanĝis videblecon de revizioj en paĝo $3',
 'revdelete-content-hid' => 'enhavo kaŝita',
 'revdelete-summary-hid' => 'resumo de redakto kaŝita',
 'revdelete-uname-hid' => 'salutnomo kaŝita',
@@ -4015,15 +4032,16 @@ Bildoj montriĝas en plena distingivo, aliaj dosiertipoj estas malfermataj rekte
 'revdelete-restricted' => 'aplikis limojn al administrantoj',
 'revdelete-unrestricted' => 'forigis limojn por administrantoj',
 'logentry-move-move' => '$1 movis paĝon $3 al $4',
-'logentry-move-move-noredirect' => '$1 movis paĝon $3 al $4 sen lasante alidirektilon',
+'logentry-move-move-noredirect' => '$1 movis paĝon $3 al $4 ne lasante alidirektilon',
 'logentry-move-move_redir' => '$1 movis paĝon $3 al $4 anstataŭigante alidirektilon',
-'logentry-move-move_redir-noredirect' => '$1 movis paĝon $3 al $4 anstataŭigante alidirektilon sen lasante alidirektilon',
-'logentry-patrol-patrol' => '$1 markis revizion $4 de paĝo $3 kiel patrolita',
-'logentry-patrol-patrol-auto' => '$1 aŭtomate markis revizion $4 de paĝo $3 kiel patrolita',
-'logentry-newusers-newusers' => '$1 kreis konton',
-'logentry-newusers-create' => '$1 kreis konton',
-'logentry-newusers-create2' => '$1 kreis uzanton $3',
-'logentry-newusers-autocreate' => 'Konto $1 estis kreita aŭtomate',
+'logentry-move-move_redir-noredirect' => '$1 movis paĝon $3 al $4 anstataŭigante alidirektilon ne lasante alidirektilon',
+'logentry-patrol-patrol' => '$1 markis revizion $4 de paĝo $3 patrolita',
+'logentry-patrol-patrol-auto' => '$1 aŭtomate markis revizion $4 de paĝo $3 patrolita',
+'logentry-newusers-newusers' => 'Konto de uzanto $1 estis kreita',
+'logentry-newusers-create' => 'Konto de uzanto $1 estis kreita',
+'logentry-newusers-create2' => 'Konto de uzanto $3 estis kreita de $1',
+'logentry-newusers-byemail' => 'Konto de uzanto $3 estis kreita de $1 kaj pasvorto estis sendita per retpoŝto',
+'logentry-newusers-autocreate' => 'Uzantokonto $1 estis kreita aŭtomate',
 'logentry-rights-rights' => '$1 ŝanĝis grupan membrecon por $3 de $4 al $5',
 'logentry-rights-rights-legacy' => '$1 ŝanĝis grupan membrecon por $3',
 'logentry-rights-autopromote' => '$1 estis aŭtomate {{GENDER:$2|altrangigita}} de $4 al $5',
@@ -4102,4 +4120,8 @@ Aŭ vi povas uzi la facilan formularon sube. Via komento estos aldonita al la pa
 'duration-centuries' => '$1 {{PLURAL:$1|jarcento|jarcentoj}}',
 'duration-millennia' => '$1 {{PLURAL:$1|jarmilo|jarmiloj}}',
 
+# Unknown messages
+'hours-ago' => 'antaŭ $1 {{PLURAL:$1|horo|horoj}}',
+'minutes-ago' => 'antaŭ $1 {{PLURAL:$1|minuto|minutoj}}',
+'seconds-ago' => 'antaŭ $1 {{PLURAL:$1|sekundo|sekundoj}}',
 );
index f4e9c4c..f7c996a 100644 (file)
@@ -556,7 +556,7 @@ $messages = array(
 'vector-simplesearch-preference' => "Activer la barre de recherche simplifiée (seulement pour l'habillage Vector)",
 'vector-view-create' => 'Créer',
 'vector-view-edit' => 'Modifier',
-'vector-view-history' => "Afficher l'historique",
+'vector-view-history' => 'Afficher l’historique',
 'vector-view-view' => 'Lire',
 'vector-view-viewsource' => 'Voir la source',
 'actions' => 'Actions',
index 20ef535..2332a69 100644 (file)
@@ -1494,9 +1494,9 @@ Smě mjenje hač $1 {{PLURAL:$1|znamješko|znamješce|znamješka|znamješkow}} d
 'rc-old-title' => 'prěnjotnje wutworjeny jako "$1"',
 
 # Recent changes linked
-'recentchangeslinked' => 'Změny w zwjazanych stronach',
+'recentchangeslinked' => 'Změny na zwjazanych stronach',
 'recentchangeslinked-feed' => 'Změny zwjazanych stron',
-'recentchangeslinked-toolbox' => 'Změny w zwjazanych stronach',
+'recentchangeslinked-toolbox' => 'Změny na zwjazanych stronach',
 'recentchangeslinked-title' => 'Změny na stronach, kotrež su z „$1“ wotkazane',
 'recentchangeslinked-noresult' => 'Njejsu změny zwajzanych stron we wubranej dobje.',
 'recentchangeslinked-summary' => "Tuta strona nalistuje poslednje změny na wotkazanych stronach (resp. pola kategorijow na čłonach kategorije).
index b9766ca..724430e 100644 (file)
@@ -3156,6 +3156,7 @@ $1',
 'minutes' => '{{PLURAL:$1|un minuto|$1 minuti}}',
 'hours' => "{{PLURAL:$1|un'ora|$1 ore}}",
 'days' => '{{PLURAL:$1|$1 giorno|$1 giorni}}',
+'weeks' => '{{PLURAL:$1|$1 settimana|$1 settimane}}',
 'months' => '{{PLURAL:$1|$1 mese|$1 mesi}}',
 'years' => '{{PLURAL:$1|$1 anno|$1 anni}}',
 'ago' => '$1 fa',
index a084acd..a79f258 100644 (file)
@@ -1562,7 +1562,7 @@ Eke dosya de peydêna vuriyais biyo ki, beno ke taê melumati gorê vurnaisê ne
 'specialpages-group-media' => 'Raporê medya u bar-kerdey',
 'specialpages-group-users' => 'Karber u heqi',
 'specialpages-group-highuse' => 'Pelê jêdêr gurenaey',
-'specialpages-group-pages' => 'Lista pelun',
+'specialpages-group-pages' => 'Listê pelun',
 'specialpages-group-pagetools' => 'Hacetê pele',
 'specialpages-group-wiki' => "Daê ''Wiki''y u haceti",
 'specialpages-group-redirects' => 'Newe-vırastena pelunê xususiyun',
index c433881..2f00177 100644 (file)
@@ -475,7 +475,7 @@ $messages = array(
 'hidden-category-category' => 'Скриени категории',
 'category-subcat-count' => '{{PLURAL:$2|Оваа категорија ја содржи само следнава поткатегорија.|Оваа категорија {{PLURAL:$1|ја содржи следнава поткатегорија|ги содржи следниве $1 поткатегории}} од вкупно $2.}}',
 'category-subcat-count-limited' => 'Оваа категорија {{PLURAL:$1|ја содржи следнава поткатегорија|ги содржи следниве $1 поткатегории}}.',
-'category-article-count' => '{{PLURAL:$2|Ð\9aаÑ\82егоÑ\80иÑ\98аÑ\82а Ñ\98а Ñ\81одÑ\80жи Ñ\81амо Ñ\81леднава Ñ\81Ñ\82Ñ\80аниÑ\86а.|Ð\9aаÑ\82егоÑ\80иÑ\98аÑ\82а {{PLURAL:$1|Ñ\98а Ñ\81одÑ\80жи Ñ\81леднава Ñ\81Ñ\82Ñ\80аниÑ\86а|ги Ñ\81одÑ\80жи следниве $1 страници}} од вкупно $2.}}',
+'category-article-count' => '{{PLURAL:$2|Ð\9eваа ÐºÐ°Ñ\82егоÑ\80иÑ\98а Ñ\98а Ñ\81одÑ\80жи Ñ\81амо Ñ\81леднава Ñ\81Ñ\82Ñ\80аниÑ\86а:|Ð\92о ÐºÐ°Ñ\82егоÑ\80иÑ\98аÑ\82а Ñ\81е {{PLURAL:$1|Ñ\81одÑ\80жи Ñ\81леднава Ñ\81Ñ\82Ñ\80аниÑ\86а|Ñ\81одÑ\80жаÑ\82 следниве $1 страници}} од вкупно $2.}}',
 'category-article-count-limited' => '{{PLURAL:$1|Следната страница е|Следните $1 страници се}} во оваа категорија.',
 'category-file-count' => '{{PLURAL:$2|Оваа категорија ја содржи само следната податотека.|{{PLURAL:$1|Следната податотека е|Следните $1 податотеки се}} во оваа категорија, од вкупно $2.}}',
 'category-file-count-limited' => '{{PLURAL:$1|Следнава податотека е|Следниве $1 податотеки се}} во оваа категорија.',
@@ -2173,11 +2173,11 @@ $1',
 'statistics-users-active-desc' => 'Корисници кои имаат извршено некое дејство {{PLURAL:$1|претходниот ден|во претходните $1 дена}}',
 'statistics-mostpopular' => 'Најпосетувани страници',
 
-'disambiguations' => 'Страници што водат до страници за појаснување',
+'disambiguations' => 'Страници што водат до појаснителни страници',
 'disambiguationspage' => 'Template:Појаснување',
-'disambiguations-text' => "Следните страници имаат барем по една врска што води до '''страница за појаснување'''.
-Наместо тоа, може да имаат врска до посоодветната тема.<br />
-Една страница се смета за страница за појаснување ако го користи шаблонот што води од [[MediaWiki:Disambiguationspage]]",
+'disambiguations-text' => "Следните страници имаат барем по една врска што води до '''појаснителна страница'''.
+Наместо тоа, може да имаат врска до посоодветна страница.<br />
+Една страница се смета за појаснителна ако го користи шаблонот што води од [[MediaWiki:Disambiguationspage]]",
 
 'pageswithprop' => 'Страници со својство',
 'pageswithprop-legend' => 'Страници со својство',
@@ -3351,6 +3351,7 @@ $1',
 'minutes' => '{{PLURAL:$1|$1 минута|$1 минути}}',
 'hours' => '{{PLURAL:$1|$1 час|$1 часа}}',
 'days' => '{{PLURAL:$1|$1 ден|$1 дена}}',
+'weeks' => '{{PLURAL:$1|$1 недела|$1 недели}}',
 'months' => '{{PLURAL:$1|$1 месец|$1 месеци}}',
 'years' => '{{PLURAL:$1|$1 година|$1 години}}',
 'ago' => 'пред $1',
@@ -4233,7 +4234,7 @@ $5
 
 # New logging system
 'logentry-delete-delete' => '$1 {{GENDER:$2|ја избриша}} страницата $3',
-'logentry-delete-restore' => '$1 {{GENDER:$2|ја врати}} страницата $3',
+'logentry-delete-restore' => '$1 {{GENDER:$2|Ñ\98а Ð¿Ð¾Ð²Ñ\80аÑ\82и}} Ñ\81Ñ\82Ñ\80аниÑ\86аÑ\82а $3',
 'logentry-delete-event' => '$1 {{GENDER:$2|ја измени}} видливоста на {{PLURAL:$5|настан во дневникот|$5 настани во дневникот}} на $3: $4',
 'logentry-delete-revision' => '$1 {{GENDER:$2|ја измени}} видливоста на {{PLURAL:$5|ревизија|$5 ревизии}} на страницата $3: $4',
 'logentry-delete-event-legacy' => '$1 {{GENDER:$2|ја измени}} видливоста на настаните во дневникот на $3',
index 00e6e5f..5892961 100644 (file)
@@ -905,7 +905,7 @@ $2
 താത്കാലിക രഹസ്യവാക്ക്: $2',
 'passwordreset-emailsent' => 'ഒരു രഹസ്യവാക്ക് പുനർസജ്ജീകരണ ഇമെയിൽ അയച്ചിട്ടുണ്ട്.',
 'passwordreset-emailsent-capture' => 'രഹസ്യവാക്ക് പുനർസജ്ജീകരണ ഇമെയിൽ അയച്ചിട്ടുണ്ട്, അത് താഴെക്കൊടുക്കുന്നു.',
-'passwordreset-emailerror-capture' => 'താഴàµ\86à´\95àµ\8dà´\95àµ\8aà´\9fàµ\81à´¤àµ\8dതിരിà´\95àµ\8dà´\95àµ\81à´¨àµ\8dà´¨, à´°à´¹à´¸àµ\8dയവാà´\95àµ\8dà´\95àµ\8d à´ªàµ\81നർസà´\9càµ\8dà´\9càµ\80à´\95à´°à´£ à´\87à´®àµ\86യിൽ à´¸àµ\83à´·àµ\8dà´\9fà´¿à´\95àµ\8dà´\95ാനായàµ\86à´\99àµ\8dà´\95à´¿à´²àµ\81à´\82, à´\89പയàµ\8bà´\95àµ\8dതാവിനàµ\8d à´\85യയàµ\8dà´\95àµ\8dà´\95ാൻ à´\95à´´à´¿à´\9eàµ\8dà´\9eà´¿à´²àµ\8dà´²: $1',
+'passwordreset-emailerror-capture' => 'താഴàµ\86à´\95àµ\8dà´\95àµ\8aà´\9fàµ\81à´¤àµ\8dതിരിà´\95àµ\8dà´\95àµ\81à´¨àµ\8dà´¨, à´°à´¹à´¸àµ\8dയവാà´\95àµ\8dà´\95àµ\8d à´ªàµ\81നർസà´\9càµ\8dà´\9càµ\80à´\95à´°à´£ à´\87à´®àµ\86യിൽ à´¸àµ\83à´·àµ\8dà´\9fà´¿à´\95àµ\8dà´\95ാനായàµ\86à´\99àµ\8dà´\95à´¿à´²àµ\81à´\82, à´\85à´¤àµ\8d {{GENDER:$2|à´\89പയàµ\8bà´\95àµ\8dതാവിനàµ\8d}} à´\85യയàµ\8dà´\95àµ\8dà´\95àµ\81à´¨àµ\8dനതàµ\8d à´ªà´°à´¾à´\9cയപàµ\8dà´ªàµ\86à´\9fàµ\8dà´\9fàµ\81: $1',
 
 # Special:ChangeEmail
 'changeemail' => 'ഇമെയിൽ വിലാസത്തിൽ മാറ്റംവരുത്തുക',
@@ -1392,6 +1392,7 @@ $1",
 'powersearch-togglenone' => 'ഒന്നുംവേണ്ട',
 'search-external' => 'ബാഹ്യ അന്വേഷണം',
 'searchdisabled' => '{{SITENAME}} സം‌രംഭത്തിൽ തിരച്ചിൽ ദുർബലപ്പെടുത്തിയിരിക്കുന്നു. താങ്കൾക്ക് ഗൂഗിൾ ഉപയോഗിച്ച് തത്കാലം തിരച്ചിൽ നടത്താവുന്നതാണ്‌. പക്ഷെ ഗൂഗിളിൽ {{SITENAME}} സം‌രംഭത്തിന്റെ സൂചിക കാലഹരണപ്പെട്ടതായിരിക്കാൻ സാദ്ധ്യതയുണ്ട്.',
+'search-error' => 'തിരയുന്നതിനിടെ ഒരു പിഴവുണ്ടായി: $1',
 
 # Preferences page
 'preferences' => 'ക്രമീകരണങ്ങൾ',
@@ -2745,6 +2746,7 @@ $1',
 'proxyblocksuccess' => 'ചെയ്തു കഴിഞ്ഞു.',
 'sorbsreason' => '{{SITENAME}} ഉപയോഗിക്കുന്ന DNSBL ൽ താങ്കളുടെ ഐ.പി. വിലാസം ഒരു ഓപ്പൺ പ്രോക്സിയായാണു രേഖപ്പെടുത്തിട്ടുള്ളത്.',
 'sorbs_create_account_reason' => '{{SITENAME}} ഉപയോഗിക്കുന്ന DNSBL ൽ താങ്കളുടെ ഐ.പി. വിലാസം ഒരു ഓപ്പൺ പ്രോക്സിയായാണു രേഖപ്പെടുത്തിട്ടുള്ളത്. താങ്കൾക്ക് അംഗത്വമെടുക്കാൻ സാദ്ധ്യമല്ല.',
+'xffblockreason' => 'എക്സ്-ഫോർവേഡഡ്-ഫോർ ഹെഡറിലെ ഒരു ഐ.പി. വിലാസം, താങ്കളുടേതോ താങ്കൾ ഉപയോഗിക്കുന്ന പ്രോക്സി സെർവറിലേതോ ആകാം, തടയപ്പെട്ടിരിക്കുന്നതാണ്. തടയലിന്റെ കാരണം: $1',
 'cant-block-while-blocked' => 'താങ്കൾ തടയപ്പെട്ടിരിക്കുമ്പോൾ മറ്റുപയോക്താക്കളെ തടയാൻ താങ്കൾക്ക് സാധിക്കില്ല.',
 'cant-see-hidden-user' => 'താങ്കൾ തടയാൻ ശ്രമിക്കുന്ന ഉപയോക്താവ് മുമ്പേ തടയപ്പെടുകയും മറയ്ക്കപ്പെടുകയും ചെയ്യപ്പെട്ടതാണ്. താങ്കൾക്ക് ഉപയോക്താവിനെ മറയ്ക്കാനുള്ള അവകാശം ഇല്ലെങ്കിൽ, ഉപയോക്താവിനെതിരെ ഉള്ള തടയൽ കാണാനോ തിരുത്താനോ കഴിയുന്നതല്ല.',
 'ipbblocked' => 'മറ്റുള്ളവരെ തടയാനോ അവരുടെ തടയൽ നീക്കാനോ താങ്കൾക്ക് കഴിയില്ല. കാരണം താങ്കൾ തന്നെ തടയപ്പെട്ടിരിക്കുകയാണ്',
@@ -3235,6 +3237,7 @@ $1',
 'minutes' => '{{PLURAL:$1|ഒരു മിനിറ്റ്|$1 മിനിറ്റ്}}',
 'hours' => '{{PLURAL:$1|ഒരു മണിക്കൂർ|$1 മണിക്കൂർ}}',
 'days' => '{{PLURAL:$1|ഒരു ദിവസം|$1 ദിവസം}}',
+'weeks' => '{{PLURAL:$1|ഒരാഴ്ച്ച|$1 ആഴ്ച്ച}}',
 'months' => '{{PLURAL:$1|ഒരു മാസം|$1 മാസം}}',
 'years' => '{{PLURAL:$1|ഒരു വർഷം|$1 വർഷം}}',
 'ago' => '$1 മുമ്പ്',
index 062504a..13696ef 100644 (file)
@@ -102,8 +102,8 @@ $messages = array(
 'sunday' => 'dumìnica',
 'monday' => 'lùn-es',
 'tuesday' => 'màrtes',
-'wednesday' => 'Merco',
-'thursday' => 'Giòbia',
+'wednesday' => 'merco',
+'thursday' => 'giòbia',
 'friday' => 'Vënner',
 'saturday' => 'Saba',
 'sun' => 'Dum',
index 1478f35..4ef67e5 100644 (file)
@@ -1055,14 +1055,14 @@ In user preferences.
 'userlogin-yourname' => 'In new vertical user login & create account forms, label for username field.
 {{Identical|Username}}',
 'userlogin-yourname-ph' => 'Placeholder text in new userlogin/create account form field.',
+'createacct-helpusername-url' => 'The URL of a page providing username guidance for the wiki.',
+'createacct-helpusername-link' => 'Message in new create account form providing guidance for username.',
 'yourpassword' => 'In user preferences
 
 {{Identical|Password}}',
 'userlogin-yourpassword' => 'In new vertical user login & create account forms, label for password field.
 {{Identical|Password}}',
 'userlogin-yourpassword-ph' => 'Placeholder text in new userlogin form for password field.',
-'createacct-helpusername-url' => 'The URL of a page providing username guidance for the wiki.',
-'createacct-helpusername-link' => 'Message in new create account form providing guidance for username.',
 'createacct-yourpassword-ph' => 'Placeholder text in new create account form for password field.',
 'yourpasswordagain' => 'In user preferences',
 'createacct-yourpasswordagain' => 'In new create account form, label for field to re-enter password',
@@ -1135,9 +1135,9 @@ Wikitext linking to login help.
 See also:
 * {{msg-mw|Helplogin-url}}',
 'createacct-join' => 'Subheading of vertical-layout create account form encouraging user to join the wiki.',
-'createacct-emailrequired'  => 'Label in vertical-layout create account form for email field when it is required.',
+'createacct-emailrequired' => 'Label in vertical-layout create account form for email field when it is required.',
 'createacct-emailoptional' => 'Label in vertical-layout create account form for email field when it is optional.',
-'createacct-email-ph'  => 'Placeholder in vertical-layout create account form for email field.',
+'createacct-email-ph' => 'Placeholder in vertical-layout create account form for email field.',
 'createaccountmail' => 'Button text for creating a new account and sending the new password to the specified e-mail address directly, as used on [[Special:UserLogin/signup]] if creating accounts by e-mail is allowed.',
 'createacct-realname' => 'In vertical-layout create account form, label for field to enter optional real name.',
 'createaccountreason' => '{{Identical|Reason}}',
@@ -1160,6 +1160,7 @@ See also:
 'userexists' => 'Used as error message in creating a user account.',
 'loginerror' => 'Used as title of error message.
 {{Identical|Login error}}',
+'createacct-error' => 'Title of error message in new vertical create account form.',
 'createaccounterror' => 'Parameters:
 * $1 is an error message',
 'nocookiesnew' => "This message is displayed when a new account was successfully created, but the browser doesn't accept cookies.",
@@ -2462,7 +2463,8 @@ See also:
 'resetprefs' => 'Button for resetting changes in the preferences page.',
 'restoreprefs' => 'Used in [[Special:Preferences]]',
 'prefs-editing' => 'Title of a tab in [[Special:Preferences]].
-When changing this message, please also update {{msg-mw|vector-editwarning-warning}} which references to this message.',
+When changing this message, please also update {{msg-mw|vector-editwarning-warning}} which references to this message.
+{{Identical|Editing}}',
 'prefs-edit-boxsize' => 'Used on [[Special:Preferences]].',
 'rows' => 'Used on [[Special:Preferences]], "Editing" section in the "Size of editing window" fieldset',
 'columns' => 'Used on [[Special:Preferences]], "Editing" section in the "Size of editing window" fieldset',
@@ -3845,7 +3847,8 @@ $1 is the name of the shared repository. On wikimedia sites, $1 is {{msg-mw|shar
 * $1 - file title
 See also:
 * {{msg-mw|Filedelete-intro}}',
-'filedelete-legend' => '{{Identical|Delete}}',
+'filedelete-legend' => 'Used as fieldset label in the "Delete file" form.
+{{Identical|Delete file}}',
 'filedelete-intro' => 'Used as introduction for FileDelete form.
 See also:
 * {{msg-mw|Filedelete|page title}}',
index 6f726f2..516b376 100644 (file)
@@ -133,6 +133,16 @@ $messages = array(
 'nov' => 'Nov',
 'dec' => 'Dec',
 
+'monday-at' => 'Lunedìe a le $1',
+'tuesday-at' => 'Martedìe a le $1',
+'wednesday-at' => 'Mercrudìe a le $1',
+'thursday-at' => 'Sciuvedìe a le $1',
+'friday-at' => 'Venerdìe a le $1',
+'saturday-at' => 'Sabbète a le $1',
+'sunday-at' => 'Dumeneche a le $1',
+'today-at' => '$1',
+'yesterday-at' => 'Aijere a le $1',
+
 # Categories related messages
 'pagecategories' => '{{PLURAL:$1|Categorije|Categorije}}',
 'category_header' => 'Pàggene jndr\'à categorie "$1"',
@@ -3045,6 +3055,7 @@ Ce l'esegue sus a 'u sisteme tue pò essere ca se combromette.",
 'minutes' => '{{PLURAL:$1|$1 minute|$1 minute}}',
 'hours' => '{{PLURAL: $1|$1ore|$1 ore}}',
 'days' => '{{PLURAL: $1|$1 sciurne|$1 sciurne}}',
+'weeks' => '{{PLURAL:$1|$1 sumàne}}',
 'months' => '{{PLURAL:$1|$1 mese|$1 mise}}',
 'years' => '{{PLURAL:$1|$1 anne}}',
 'ago' => '$1 fà',
@@ -4077,4 +4088,8 @@ Ce nò, tu puè ausà 'u module facile aqquà sotte. 'U commende tune avène agg
 # Image rotation
 'rotate-comment' => 'Immaggine rotate de $1 {{PLURAL:$1|grade}} in sienze orarie',
 
+# Unknown messages
+'hours-ago' => '$1 {{PLURAL:$1|ore}} fà',
+'minutes-ago' => '$1 {{PLURAL:$1|minute}} fà',
+'seconds-ago' => '$1 {{PLURAL:$1|seconde}} fà',
 );
index 70ce910..f2fc88f 100644 (file)
@@ -36,6 +36,7 @@
  * @author RLuts
  * @author Riwnodennyk
  * @author Sodmy
+ * @author Ua2004
  * @author Urhixidur
  * @author VolodymyrF
  * @author Vox
@@ -2408,7 +2409,7 @@ $1',
 'addedwatchtext' => "Сторінку «[[:$1]]» додано до вашого [[Special:Watchlist|списку спостереження]].
 Подальші редагування цієї сторінки (та пов'язаної з нею сторінки обговорення) відображатимуться в цьому списку.",
 'removewatch' => 'Видалити зі списку спостереження',
-'removedwatchtext' => 'Сторінка «[[:$1]]» вилучена з вашого [[Special:Watchlist|списку спостереження]].',
+'removedwatchtext' => 'Сторінку «[[:$1]]» вилучено з вашого [[Special:Watchlist|списку спостереження]].',
 'watch' => 'Спостерігати',
 'watchthispage' => 'Спостерігати за цією сторінкою',
 'unwatch' => 'Скас. спостереження',
index 52500b5..dd8ff84 100644 (file)
@@ -410,6 +410,16 @@ $messages = array(
 'nov' => 'tháng 11',
 'dec' => 'tháng 12',
 
+'monday-at' => 'Thứ Hai lúc $1',
+'tuesday-at' => 'Thứ Ba lúc $1',
+'wednesday-at' => 'Thứ Tư lúc $1',
+'thursday-at' => 'Thứ Năm lúc $1',
+'friday-at' => 'Thứ Sáu lúc $1',
+'saturday-at' => 'Thứ Bảy lúc $1',
+'sunday-at' => 'Chủ Nhật lúc $1',
+'today-at' => '$1',
+'yesterday-at' => 'Hôm qua lúc $1',
+
 # Categories related messages
 'pagecategories' => '{{PLURAL:$1|Thể loại|Thể loại}}',
 'category_header' => 'Các trang trong thể loại “$1”',
@@ -3215,6 +3225,7 @@ Nếu thực thi nó máy tính của bạn có thể bị tiếm quyền.",
 'minutes' => '$1 phút',
 'hours' => '$1 giờ',
 'days' => '$1 ngày',
+'weeks' => '{{PLURAL:$1|$1 tuần}}',
 'months' => '$1 tháng',
 'years' => '$1 năm',
 'ago' => 'cách đây $1',
@@ -4167,4 +4178,8 @@ Nếu không thì bạn có thể điền biểu mẫu đơn giản ở dưới.
 # Image rotation
 'rotate-comment' => 'Đã quay hình $1 độ theo chiều kim đồng hồ',
 
+# Unknown messages
+'hours-ago' => 'Cách đây $1 {{PLURAL:$1|giờ}}',
+'minutes-ago' => 'Cách đây $1 {{PLURAL:$1|phút}}',
+'seconds-ago' => 'Cách đây $1 {{PLURAL:$1|giây}}',
 );
index 9163d69..bcd59f1 100644 (file)
@@ -133,7 +133,7 @@ class BackupDumper {
                        $matches = array();
                        if ( preg_match( '/^--(.+?)(?:=(.+?)(?::(.+?))?)?$/', $arg, $matches ) ) {
                                @list( /* $full */ , $opt, $val, $param ) = $matches;
-                               switch( $opt ) {
+                               switch ( $opt ) {
                                case "plugin":
                                        $this->loadPlugin( $val, $param );
                                        break;
@@ -368,7 +368,7 @@ class BackupDumper {
 
        function fatalError( $msg ) {
                $this->progress( "$msg\n" );
-               die(1);
+               die( 1 );
        }
 }
 
index cc0a7e1..04352b9 100644 (file)
@@ -51,7 +51,7 @@ class BaseDump {
                $this->infiles = explode( ';', $infile );
                $this->reader = new XMLReader();
                $infile = array_shift( $this->infiles );
-               if (defined( 'LIBXML_PARSEHUGE' ) ) {
+               if ( defined( 'LIBXML_PARSEHUGE' ) ) {
                        $this->reader->open( $infile, null, LIBXML_PARSEHUGE );
                }
                else {
@@ -110,8 +110,8 @@ class BaseDump {
                        }
                } else {
                        $this->close();
-                       if (count($this->infiles)) {
-                               $infile = array_shift($this->infiles);
+                       if ( count( $this->infiles ) ) {
+                               $infile = array_shift( $this->infiles );
                                $this->reader->open( $infile );
                                $this->atEnd = false;
                        }
@@ -181,7 +181,7 @@ class BaseDump {
                }
                $buffer = "";
                while ( $this->reader->read() ) {
-                       switch( $this->reader->nodeType ) {
+                       switch ( $this->reader->nodeType ) {
                        case XMLReader::TEXT:
 //                     case XMLReader::WHITESPACE:
                        case XMLReader::SIGNIFICANT_WHITESPACE:
index c99f004..547abab 100644 (file)
@@ -183,7 +183,7 @@ class TextPassDumper extends BackupDumper {
                global $IP;
                $url = $this->processFileOpt( $val, $param );
 
-               switch( $opt ) {
+               switch ( $opt ) {
                case 'prefetch':
                        require_once "$IP/maintenance/backupPrefetch.inc";
                        $this->prefetch = new BaseDump( $url );
@@ -215,7 +215,7 @@ class TextPassDumper extends BackupDumper {
        function processFileOpt( $val, $param ) {
                $fileURIs = explode( ';', $param );
                foreach ( $fileURIs as $URI ) {
-                       switch( $val ) {
+                       switch ( $val ) {
                                case "file":
                                        $newURI = $URI;
                                        break;
index 83b5b02..53ea597 100644 (file)
@@ -53,7 +53,7 @@ class GetConfiguration extends Maintenance {
                }
 
                $out = null;
-               switch( $this->getOption( 'format' ) ) {
+               switch ( $this->getOption( 'format' ) ) {
                        case 'PHP':
                                $out = serialize( $res );
                                break;
index 413d650..9e583e7 100644 (file)
@@ -46,7 +46,7 @@ class CheckLanguageCLI {
        public function __construct( array $options ) {
                if ( isset( $options['help'] ) ) {
                        echo $this->help();
-                       exit(1);
+                       exit( 1 );
                }
 
                if ( isset( $options['lang'] ) ) {
@@ -488,7 +488,7 @@ class CheckExtensionsCLI extends CheckLanguageCLI {
        public function __construct( array $options, $extension ) {
                if ( isset( $options['help'] ) ) {
                        echo $this->help();
-                       exit(1);
+                       exit( 1 );
                }
 
                if ( isset( $options['lang'] ) ) {
@@ -654,7 +654,7 @@ ENDS;
                                echo $extension->name() . ":\n";
 
                                if ( $this->level > 0 ) {
-                                       switch( $this->output ) {
+                                       switch ( $this->output ) {
                                                case 'plain':
                                                        $this->outputText();
                                                        break;
index f5bcb5d..991788c 100644 (file)
@@ -247,6 +247,13 @@ $wgIgnoredMessages = array(
        'ipb-default-expiry',
        'pageinfo-header',
        'pageinfo-footer',
+       'createacct-benefit-head1',
+       'createacct-benefit-icon1',
+       'createacct-benefit-head2',
+       'createacct-benefit-icon2',
+       'createacct-benefit-head3',
+       'createacct-benefit-icon3',
+       'today-at',
 );
 
 /** Optional messages, which may be translated only if changed in the target language. */
index 4410187..96a6c13 100644 (file)
@@ -136,17 +136,6 @@ $wgMessageStructure = array(
                'nov',
                'dec',
        ),
-       'human-timestamps' => array(
-               'monday-at',
-               'tuesday-at',
-               'wednesday-at',
-               'thursday-at',
-               'friday-at',
-               'saturday-at',
-               'sunday-at',
-               'today-at',
-               'yesterday-at',
-       ),
        'categorypages' => array(
                'pagecategories',
                'pagecategorieslink',
@@ -502,6 +491,7 @@ $wgMessageStructure = array(
                'badretype',
                'userexists',
                'loginerror',
+               'createacct-error',
                'createaccounterror',
                'nocookiesnew',
                'nocookieslogin',
@@ -2850,6 +2840,20 @@ $wgMessageStructure = array(
                'ago',
                'just-now',
        ),
+       'human-timestamps' => array(
+               'hours-ago',
+               'minutes-ago',
+               'seconds-ago',
+               'monday-at',
+               'tuesday-at',
+               'wednesday-at',
+               'thursday-at',
+               'friday-at',
+               'saturday-at',
+               'sunday-at',
+               'today-at',
+               'yesterday-at',
+       ),
        'badimagelist' => array(
                'bad_image_list',
        ),
@@ -4008,8 +4012,9 @@ XHTML id names.",
        'patrol-log'          => 'Patrol log',
        'imagedeletion'       => 'Image deletion',
        'browsediffs'         => 'Browsing diffs',
-       'newfiles'           => 'Special:NewFiles',
+       'newfiles'            => 'Special:NewFiles',
        'video-info'          => 'Video information, used by Language::formatTimePeriod() to format lengths in the above messages',
+       'human-timestamps'    => 'Human-readable timestamps',
        'badimagelist'        => 'Bad image list',
        'variantname-zh'      => "Short names for language variants used for language conversion links.
 Variants for Chinese language",
index 6148cc4..8aac4b3 100644 (file)
@@ -145,8 +145,8 @@ function generateConfigFile( $doxygenTemplate, $outputDirectory, $stripFromPath,
 unset( $file );
 
 if ( is_array( $argv ) ) {
-       for ($i = 0; $i < count($argv); $i++ ) {
-               switch( $argv[$i] ) {
+       for ( $i = 0; $i < count( $argv ); $i++ ) {
+               switch ( $argv[$i] ) {
                case '--all':
                        $input = 0;
                        break;
@@ -210,7 +210,7 @@ Other options:
 
 
 END;
-                       exit(0);
+                       exit( 0 );
                        break;
                }
        }
index c5bf569..0f6f365 100644 (file)
@@ -522,12 +522,12 @@ CREATE TABLE &mw_prefix.job (
   job_namespace  NUMBER  DEFAULT 0 NOT NULL,
   job_title      VARCHAR2(255)      NOT NULL,
   job_timestamp         TIMESTAMP(6) WITH TIME ZONE NULL,
-  job_params     CLOB      NOT NULL
-  job_random NUMBER NOT NULL default 0,
+  job_params     CLOB      NOT NULL,
+  job_random NUMBER DEFAULT 0 NOT NULL,
   job_token VARCHAR2(32),
   job_token_timestamp TIMESTAMP(6) WITH TIME ZONE,
   job_sha1 VARCHAR2(32),
-  job_attempts NUMBER NOT NULL default 0
+  job_attempts NUMBER DEFAULT 0 NOT NULL
 );
 ALTER TABLE &mw_prefix.job ADD CONSTRAINT &mw_prefix.job_pk PRIMARY KEY (job_id);
 CREATE INDEX &mw_prefix.job_i01 ON &mw_prefix.job (job_cmd, job_namespace, job_title);
@@ -703,7 +703,7 @@ CREATE TABLE &mw_prefix.site_identifiers (
   si_type VARCHAR2(32) NOT NULL,
   si_key VARCHAR2(32) NOT NULL
 );
-CREATE UNIQUE INDEX &mw_prefix.site_identifiers_u01 ON &mw_prefix.sites (si_type, si_key);
+CREATE UNIQUE INDEX &mw_prefix.site_identifiers_u01 ON &mw_prefix.site_identifiers (si_type, si_key);
 CREATE INDEX &mw_prefix.site_identifiers_i01 ON &mw_prefix.site_identifiers (si_site);
 CREATE INDEX &mw_prefix.site_identifiers_i02 ON &mw_prefix.site_identifiers (si_key);
 
index b9bfe81..505313d 100644 (file)
@@ -443,13 +443,21 @@ class CheckStorage {
 
        function importRevision( &$revision, &$importer ) {
                $id = $revision->getID();
-               $text = $revision->getText();
+               $content = $revision->getContent( Revision::RAW );
+               $id = $id ? $id : '';
+
+               if ( $content === null ) {
+                       echo "Revision $id is broken, we have no content available\n";
+                       return;
+               }
+
+               $text = $content->serialize();
                if ( $text === '' ) {
                        // This is what happens if the revision was broken at the time the
                        // dump was made. Unfortunately, it also happens if the revision was
                        // legitimately blank, so there's no way to tell the difference. To
                        // be safe, we'll skip it and leave it broken
-                       $id = $id ? $id : '';
+
                        echo "Revision $id is blank in the dump, may have been broken before export\n";
                        return;
                }
index f8d55c5..1e4643e 100644 (file)
@@ -187,7 +187,7 @@ class VectorTemplate extends BaseTemplate {
                                <?php } ?>
                                <?php if ( $this->data['newtalk'] ) { ?>
                                <!-- newtalk -->
-                               <div class="usermessage"><?php $this->html( 'newtalk' )  ?></div>
+                               <div class="usermessage"><?php $this->html( 'newtalk' ) ?></div>
                                <!-- /newtalk -->
                                <?php } ?>
                                <?php if ( $this->data['showjumplinks'] ) { ?>
@@ -304,7 +304,7 @@ class VectorTemplate extends BaseTemplate {
                        }
 
                        echo "\n<!-- {$name} -->\n";
-                       switch( $name ) {
+                       switch ( $name ) {
                                case 'SEARCH':
                                        break;
                                case 'TOOLBOX':
@@ -381,7 +381,7 @@ class VectorTemplate extends BaseTemplate {
                // Render elements
                foreach ( $elements as $name => $element ) {
                        echo "\n<!-- {$name} -->\n";
-                       switch( $element ) {
+                       switch ( $element ) {
                                case 'NAMESPACES':
 ?>
 <div id="p-namespaces" role="navigation" class="vectorTabs<?php if ( count( $this->data['namespace_urls'] ) == 0 ) { echo ' emptyPortlet'; } ?>">
index b7320cb..964b7d6 100644 (file)
@@ -108,7 +108,7 @@ class SeleniumTester extends Maintenance {
        }
 
        protected function stopServer() {
-               if ( !isset ( $this->serverManager ) ) {
+               if ( !isset( $this->serverManager ) ) {
                        echo ( "Warning: Request to stop Selenium Server, but it was " .
                                "not stared by RunSeleniumTests\n" .
                                "RunSeleniumTests cannot stop a Selenium Server it " .
index b34c957..0631196 100644 (file)
@@ -3969,6 +3969,33 @@ Link containing "<#" and ">#" as a hex sequences
 </p>
 !! end
 
+!! test
+Link containing an equals sign
+!! input
+[[Special:BookSources/isbn=4-00-026157-6]]
+!! result
+<p><a href="/wiki/Special:BookSources/isbn%3D4-00-026157-6" title="Special:BookSources/isbn=4-00-026157-6">Special:BookSources/isbn=4-00-026157-6</a>
+</p>
+!! end
+
+!! article
+Foo~bar
+!! text
+Just a test of an article title containing a tilde.
+!! endarticle
+
+# note that links containing signatures, like [[Foo~~~~]], are
+# massaged by the pre-save transform (PST) and so the tildes are never
+# seen by the parser.
+!! test
+Link containing a tilde
+!! input
+[[Foo~bar]]
+!! result
+<p><a href="/wiki/Foo%7Ebar" title="Foo~bar">Foo~bar</a>
+</p>
+!! end
+
 !! test
 Link containing double-single-quotes '' (bug 4598)
 !! input
@@ -4230,6 +4257,23 @@ language=kaa
 </p>
 !! end
 
+!! article
+Söfnuður
+!! text
+Test.
+!! endarticle
+
+!! test
+Internal link with is linkprefix
+!! options
+language=is
+!! input
+Aðrir mótmælenda[[söfnuður|söfnuðir]] og
+!! result
+<p>Aðrir <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðir</a> og
+</p>
+!! end
+
 !! test
 Parsoid-centric test: Whitespace in ext- and wiki-links should be preserved
 !! input
index 12c2e00..b9117fd 100644 (file)
@@ -18,7 +18,6 @@ class MediaWikiPHPUnitCommand extends PHPUnit_TextUI_Command {
                foreach ( self::$additionalOptions as $option => $default ) {
                        $this->longOptions[$option] = $option . 'Handler';
                }
-
        }
 
        public static function main( $exit = true ) {
@@ -97,5 +96,4 @@ Database options:
 
 EOT;
        }
-
 }
index ecc8ad1..440f866 100644 (file)
@@ -137,6 +137,7 @@ abstract class MediaWikiTestCase extends PHPUnit_Framework_TestCase {
        protected function getNewTempFile() {
                $fname = tempnam( wfTempDir(), 'MW_PHPUnit_' . get_class( $this ) . '_' );
                $this->tmpfiles[] = $fname;
+
                return $fname;
        }
 
@@ -158,6 +159,7 @@ abstract class MediaWikiTestCase extends PHPUnit_Framework_TestCase {
                // where temporary directory creation is bundled and can be improved
                unlink( $fname );
                $this->assertTrue( wfMkdirParents( $fname ) );
+
                return $fname;
        }
 
@@ -348,7 +350,8 @@ abstract class MediaWikiTestCase extends PHPUnit_Framework_TestCase {
         * Stub. If a test needs to add additional data to the database, it should
         * implement this method and do so
         */
-       function addDBData() {}
+       function addDBData() {
+       }
 
        private function addCoreDBData() {
                # disabled for performance
@@ -377,7 +380,6 @@ abstract class MediaWikiTestCase extends PHPUnit_Framework_TestCase {
                                'page_touched' => $this->db->timestamp(),
                                'page_latest' => 0,
                                'page_len' => 0 ), __METHOD__, array( 'IGNORE' ) );
-
                }
 
                User::resetIdByNameCache();
@@ -394,7 +396,6 @@ abstract class MediaWikiTestCase extends PHPUnit_Framework_TestCase {
                        $user->saveSettings();
                }
 
-
                //Make 1 page with 1 revision
                $page = WikiPage::factory( Title::newFromText( 'UTPage' ) );
                if ( !$page->getId() == 0 ) {
@@ -461,6 +462,7 @@ abstract class MediaWikiTestCase extends PHPUnit_Framework_TestCase {
 
                if ( ( $db->getType() == 'oracle' || !self::$useTemporaryTables ) && self::$reuseDB ) {
                        CloneDatabase::changePrefix( $prefix );
+
                        return;
                } else {
                        $dbClone->cloneTableStructure();
@@ -523,6 +525,7 @@ abstract class MediaWikiTestCase extends PHPUnit_Framework_TestCase {
 
        private static function unprefixTable( $tableName ) {
                global $wgDBprefix;
+
                return substr( $tableName, strlen( $wgDBprefix ) );
        }
 
@@ -547,6 +550,7 @@ abstract class MediaWikiTestCase extends PHPUnit_Framework_TestCase {
                        unset( $tables['searchindex_segments'] );
                        $tables = array_flip( $tables );
                }
+
                return $tables;
        }
 
@@ -561,13 +565,11 @@ abstract class MediaWikiTestCase extends PHPUnit_Framework_TestCase {
                if ( isset( MediaWikiPHPUnitCommand::$additionalOptions[$offset] ) ) {
                        return MediaWikiPHPUnitCommand::$additionalOptions[$offset];
                }
-
        }
 
        public function setCliArg( $offset, $value ) {
 
                MediaWikiPHPUnitCommand::$additionalOptions[$offset] = $value;
-
        }
 
        /**
@@ -839,6 +841,7 @@ abstract class MediaWikiTestCase extends PHPUnit_Framework_TestCase {
                        ) {
 
                                $wikitextNS = $ns;
+
                                return $wikitextNS;
                        }
                }
@@ -906,6 +909,7 @@ abstract class MediaWikiTestCase extends PHPUnit_Framework_TestCase {
                if ( !$loaded ) {
                        $this->markTestSkipped( "PHP extension '$extName' is not loaded, skipping." );
                }
+
                return $loaded;
        }
 
@@ -934,5 +938,4 @@ abstract class MediaWikiTestCase extends PHPUnit_Framework_TestCase {
 
                $this->assertInstanceOf( $expected, $pokemons, $message );
        }
-
 }
index 01caf8f..3978b8d 100644 (file)
@@ -11,7 +11,7 @@ if ( !defined( 'MW_PHPUNIT_TEST' ) ) {
 You are running these tests directly from phpunit. You may not have all globals correctly set.
 Running phpunit.php instead is recommended.
 EOF;
-       require_once ( __DIR__ . "/phpunit.php" );
+       require_once( __DIR__ . "/phpunit.php" );
 }
 
 // Output a notice when running with older versions of PHPUnit
index 967ffa1..686ab93 100644 (file)
@@ -16,18 +16,17 @@ class ArticleTablesTest extends MediaWikiLangTestCase {
                $wgContLang = Language::factory( 'es' );
 
                $wgLang = Language::factory( 'fr' );
-               $status = $page->doEditContent( new WikitextContent( '{{:{{int:history}}}}' ), 'Test code for bug 14404', 0, false, $user );
+               $page->doEditContent( new WikitextContent( '{{:{{int:history}}}}' ), 'Test code for bug 14404', 0, false, $user );
                $templates1 = $title->getTemplateLinksFrom();
 
                $wgLang = Language::factory( 'de' );
                $page->mPreparedEdit = false; // In order to force the rerendering of the same wikitext
 
                // We need an edit, a purge is not enough to regenerate the tables
-               $status = $page->doEditContent( new WikitextContent( '{{:{{int:history}}}}' ), 'Test code for bug 14404', EDIT_UPDATE, false, $user );
+               $page->doEditContent( new WikitextContent( '{{:{{int:history}}}}' ), 'Test code for bug 14404', EDIT_UPDATE, false, $user );
                $templates2 = $title->getTemplateLinksFrom();
 
                $this->assertEquals( $templates1, $templates2 );
                $this->assertEquals( $templates1[0]->getFullText(), 'Historial' );
        }
-
 }
index 02546fa..32fc2c5 100644 (file)
@@ -59,7 +59,7 @@ class BlockTest extends MediaWikiLangTestCase {
         * debug function : dump the ipblocks table
         */
        function dumpBlocks() {
-               $v = $this->db->query( 'SELECT * FROM unittest_ipblocks' );
+               $v = $this->db->select( 'ipblocks', '*' );
                print "Got " . $v->numRows() . " rows. Full dump follow:\n";
                foreach ( $v as $row ) {
                        print_r( $row );
@@ -72,7 +72,6 @@ class BlockTest extends MediaWikiLangTestCase {
                $this->assertTrue( $this->block->equals( Block::newFromTarget( 'UTBlockee' ) ), "newFromTarget() returns the same block as the one that was made" );
 
                $this->assertTrue( $this->block->equals( Block::newFromID( $this->blockId ) ), "newFromID() returns the same block as the one that was made" );
-
        }
 
        /**
@@ -82,7 +81,6 @@ class BlockTest extends MediaWikiLangTestCase {
                // delta to stop one-off errors when things happen to go over a second mark.
                $delta = abs( $this->madeAt - $this->block->mTimestamp );
                $this->assertLessThan( 2, $delta, "If no timestamp is specified, the block is recorded as time()" );
-
        }
 
        /**
@@ -133,7 +131,6 @@ class BlockTest extends MediaWikiLangTestCase {
                $u->addToDatabase();
                unset( $u );
 
-
                // Sanity check
                $this->assertNull(
                        Block::newFromTarget( $username ),
index add585d..e3d9da7 100644 (file)
@@ -66,7 +66,6 @@ class CdbTest extends MediaWikiTestCase {
                        $this->cdbAssert( "PHP error", $key, $v1, $value );
                        $this->cdbAssert( "DBA error", $key, $v2, $value );
                }
-
        }
 
        private function randomString() {
@@ -75,6 +74,7 @@ class CdbTest extends MediaWikiTestCase {
                for ( $j = 0; $j < $len; $j++ ) {
                        $s .= chr( mt_rand( 0, 255 ) );
                }
+
                return $s;
        }
 
index c746208..f1004fb 100644 (file)
@@ -47,6 +47,7 @@ class CollationTest extends MediaWikiLangTestCase {
                        array( 'en', 'A', 'Aꦲ' ),
                );
        }
+
        /**
         * Opposite of testIsPrefix
         *
@@ -84,6 +85,7 @@ class CollationTest extends MediaWikiLangTestCase {
                $col = Collation::factory( $collation );
                $this->assertEquals( $firstLetter, $col->getFirstLetter( $string ) );
        }
+
        function firstLetterProvider() {
                return array(
                        array( 'uppercase', 'Abc', 'A' ),
index dcd9ddd..53f33d9 100644 (file)
@@ -4,14 +4,17 @@ class DiffHistoryBlobTest extends MediaWikiTestCase {
        protected function setUp() {
                if ( !extension_loaded( 'xdiff' ) ) {
                        $this->markTestSkipped( 'The xdiff extension is not available' );
+
                        return;
                }
                if ( !function_exists( 'xdiff_string_rabdiff' ) ) {
                        $this->markTestSkipped( 'The version of xdiff extension is lower than 1.5.0' );
+
                        return;
                }
                if ( !extension_loaded( 'hash' ) && !extension_loaded( 'mhash' ) ) {
                        $this->markTestSkipped( 'Neither the hash nor mhash extension is available' );
+
                        return;
                }
                parent::setUp();
index 4053683..fb2304d 100644 (file)
@@ -81,5 +81,4 @@ class FormOptionsInitializationTest extends MediaWikiTestCase {
                        $this->object->getOptions()
                );
        }
-
 }
index 2e6417f..166a3ce 100644 (file)
@@ -257,7 +257,6 @@ class GlobalTest extends MediaWikiTestCase {
 
                $sampleUTF = "Östergötland_coat_of_arms.png";
 
-
                //mb_substr
                $substr_params = array(
                        array( 0, 0 ),
@@ -280,7 +279,6 @@ class GlobalTest extends MediaWikiTestCase {
                        );
                }
 
-
                //mb_strlen
                $this->assertEquals(
                        mb_strlen( $sampleUTF ),
@@ -288,7 +286,6 @@ class GlobalTest extends MediaWikiTestCase {
                        'Fallback mb_strlen'
                );
 
-
                //mb_str(r?)pos
                $strpos_params = array(
                        //array( 'ter' ),
@@ -315,7 +312,6 @@ class GlobalTest extends MediaWikiTestCase {
                                'Fallback mb_strrpos with params ' . implode( ', ', $old_param_set )
                        );
                }
-
        }
 
 
@@ -329,7 +325,6 @@ class GlobalTest extends MediaWikiTestCase {
                $old_wgDebugTimestamps = $wgDebugTimestamps;
                $wgDebugTimestamps = false;
 
-
                wfDebug( "This is a normal string" );
                $this->assertEquals( "This is a normal string", file_get_contents( $wgDebugLogFile ) );
                unlink( $wgDebugLogFile );
@@ -338,7 +333,6 @@ class GlobalTest extends MediaWikiTestCase {
                $this->assertEquals( "This is nöt an ASCII string", file_get_contents( $wgDebugLogFile ) );
                unlink( $wgDebugLogFile );
 
-
                wfDebug( "\00305This has böth UTF and control chars\003" );
                $this->assertEquals( " 05This has böth UTF and control chars ", file_get_contents( $wgDebugLogFile ) );
                unlink( $wgDebugLogFile );
@@ -351,7 +345,6 @@ class GlobalTest extends MediaWikiTestCase {
                $this->assertGreaterThan( 5000000, preg_replace( '/\D/', '', file_get_contents( $wgDebugLogFile ) ) );
                unlink( $wgDebugLogFile );
 
-
                $wgDebugLogFile = $old_log_file;
                $wgDebugTimestamps = $old_wgDebugTimestamps;
        }
@@ -398,7 +391,6 @@ class GlobalTest extends MediaWikiTestCase {
 
                $this->assertEquals( $var1, 2, 'var1 is swapped' );
                $this->assertEquals( $var2, 1, 'var2 is swapped' );
-
        }
 
        function testWfPercentTest() {
@@ -643,6 +635,7 @@ class GlobalTest extends MediaWikiTestCase {
                                array( "$p//nds-nl.wikipedia.org", array( 'nl.wikipedia.org' ), true, "Substrings of domains match while they shouldn't, $pDesc URL" ),
                        ) );
                }
+
                return $a;
        }
 
@@ -660,6 +653,7 @@ class GlobalTest extends MediaWikiTestCase {
 
        public static function provideWfShellMaintenanceCmdList() {
                global $wgPhpCli;
+
                return array(
                        array( 'eval.php', array( '--help', '--test' ), array(),
                                "'$wgPhpCli' 'eval.php' '--help' '--test'",
index c585726..8bd0849 100644 (file)
@@ -13,6 +13,7 @@ class GlobalWithDBTest extends MediaWikiTestCase {
 
        public static function provideWfIsBadImageList() {
                $blacklist = '* [[File:Bad.jpg]] except [[Nasty page]]';
+
                return array(
                        array( 'Bad.jpg', false, $blacklist, true,
                                'Called on a bad image' ),
index 4bd8c68..4184d15 100644 (file)
@@ -87,7 +87,6 @@ class WfAssembleUrlTest extends MediaWikiTestCase {
                                                                $url .= '#' . $fragment;
                                                        }
 
-
                                                        $cases[] = array(
                                                                $parts,
                                                                $url,
index 10b62b3..c60f223 100644 (file)
@@ -152,6 +152,7 @@ class WfBaseConvertTest extends MediaWikiTestCase {
 
                        $x[] = array( $base, $str );
                }
+
                return $x;
        }
 
index 8c67ced..5b622c1 100644 (file)
@@ -103,6 +103,7 @@ class WfExpandUrlTest extends MediaWikiTestCase {
                                }
                        }
                }
+
                return $retval;
        }
 }
index 87193fa..3521d18 100644 (file)
@@ -18,6 +18,7 @@ class WfGetCallerTest extends MediaWikiTestCase {
                if ( $n > 0 ) {
                        return self::intermediateFunction( $level, $n - 1 );
                }
+
                return wfGetCaller( $level );
        }
 
index e4e33d1..604f901 100644 (file)
@@ -24,5 +24,4 @@ class WfShorthandToIntegerTest extends MediaWikiTestCase {
                        array( '1k', 1024, 'One kb lowercased' ),
                );
        }
-
 }
index ddfffe8..3ac33a4 100644 (file)
@@ -12,6 +12,7 @@ class WfTimestampTest extends MediaWikiTestCase {
 
        public static function provideNormalTimestamps() {
                $t = gmmktime( 12, 34, 56, 1, 15, 2001 );
+
                return array(
                        // TS_UNIX
                        array( $t, TS_MW, '20010115123456', 'TS_UNIX to TS_MW' ),
index 8f70b3d..81dd487 100644 (file)
@@ -11,6 +11,7 @@ class HooksTest extends MediaWikiTestCase {
 
        public static function provideHooks() {
                $i = new NothingClass();
+
                return array(
                        array( 'Object and method', array( $i, 'someNonStatic' ), 'changed-nonstatic', 'changed-nonstatic' ),
                        array( 'Object and no method', array( $i ), 'changed-onevent', 'original' ),
@@ -19,14 +20,16 @@ class HooksTest extends MediaWikiTestCase {
                        array( 'Class::method static call', array( 'NothingClass::someStatic' ), 'changed-static', 'original' ),
                        array( 'Global function', array( 'NothingFunction' ), 'changed-func', 'original' ),
                        array( 'Global function with data', array( 'NothingFunctionData', 'data' ), 'data', 'original' ),
-                       array( 'Closure', array( function( &$foo, $bar ) {
-                                       $foo = 'changed-closure';
-                                       return true;
-                               } ), 'changed-closure', 'original' ),
-                       array( 'Closure with data', array( function( $data, &$foo, $bar ) {
-                                       $foo = $data;
-                                       return true;
-                               }, 'data' ), 'data', 'original' )
+                       array( 'Closure', array( function ( &$foo, $bar ) {
+                               $foo = 'changed-closure';
+
+                               return true;
+                       } ), 'changed-closure', 'original' ),
+                       array( 'Closure with data', array( function ( $data, &$foo, $bar ) {
+                               $foo = $data;
+
+                               return true;
+                       }, 'data' ), 'data', 'original' )
                );
        }
 
@@ -86,8 +89,14 @@ class HooksTest extends MediaWikiTestCase {
        }
 
        public function testFalseReturn() {
-               Hooks::register( 'MediaWikiHooksTest001', function( &$foo ) { return false; } );
-               Hooks::register( 'MediaWikiHooksTest001', function( &$foo ) { $foo = 'test'; return true; } );
+               Hooks::register( 'MediaWikiHooksTest001', function ( &$foo ) {
+                       return false;
+               } );
+               Hooks::register( 'MediaWikiHooksTest001', function ( &$foo ) {
+                       $foo = 'test';
+
+                       return true;
+               } );
                $foo = 'original';
                Hooks::run( 'MediaWikiHooksTest001', array( &$foo ) );
                $this->assertSame( 'original', $foo, 'Hooks continued processing after a false return.' );
@@ -97,18 +106,22 @@ class HooksTest extends MediaWikiTestCase {
         * @expectedException FatalError
         */
        public function testFatalError() {
-               Hooks::register( 'MediaWikiHooksTest001', function() { return 'test'; } );
+               Hooks::register( 'MediaWikiHooksTest001', function () {
+                       return 'test';
+               } );
                Hooks::run( 'MediaWikiHooksTest001', array() );
        }
 }
 
 function NothingFunction( &$foo, &$bar ) {
        $foo = 'changed-func';
+
        return true;
 }
 
 function NothingFunctionData( $data, &$foo, &$bar ) {
        $foo = $data;
+
        return true;
 }
 
@@ -117,6 +130,7 @@ class NothingClass {
 
        public static function someStatic( &$foo, &$bar ) {
                $foo = 'changed-static';
+
                return true;
        }
 
@@ -124,18 +138,21 @@ class NothingClass {
                $this->calls++;
                $foo = 'changed-nonstatic';
                $bar = 'changed-nonstatic';
+
                return true;
        }
 
        public function onMediaWikiHooksTest001( &$foo, &$bar ) {
                $this->calls++;
                $foo = 'changed-onevent';
+
                return true;
        }
 
        public function someNonStaticWithData( $data, &$foo, &$bar ) {
                $this->calls++;
                $foo = $data;
+
                return true;
        }
 }
index 9e3d3a4..4e010d4 100644 (file)
@@ -432,6 +432,7 @@ class HtmlTest extends MediaWikiTestCase {
                foreach ( $types as $type ) {
                        $cases[] = array( $type );
                }
+
                return $cases;
        }
 
@@ -596,6 +597,7 @@ class HtmlTest extends MediaWikiTestCase {
                                isset( $case[3] ) ? $case[3] : ''
                        );
                }
+
                return $ret;
        }
 
@@ -610,5 +612,4 @@ class HtmlTest extends MediaWikiTestCase {
                        'Allow special case "step=any".'
                );
        }
-
 }
index 7698776..12ba226 100644 (file)
@@ -194,6 +194,7 @@ class MWHttpRequestTester extends MWHttpRequest {
                                        throw new MWException( __METHOD__ . ': allow_url_fopen needs to be enabled for pure PHP' .
                                                ' http requests to work. If possible, curl should be used instead. See http://php.net/curl.' );
                                }
+
                                return new PhpHttpRequestTester( $url, $options );
                        default:
                }
index ab93b2b..93ce119 100644 (file)
@@ -123,7 +123,6 @@ class TestConverter extends LanguageConverter {
                        'tg' => new ReplacementArray()
                );
        }
-
 }
 
 class LanguageToTest extends Language {
index c83f7da..ae551c0 100644 (file)
@@ -122,7 +122,6 @@ class LinksUpdateTest extends MediaWikiTestCase {
 
                $po->addImage( "Foo.png" );
 
-
                $this->assertLinksUpdate( $t, $po, 'imagelinks', 'il_to', 'il_from = 111', array(
                        array( 'Foo.png' ),
                ) );
@@ -133,7 +132,6 @@ class LinksUpdateTest extends MediaWikiTestCase {
 
                $po->addLanguageLink( Title::newFromText( "en:Foo" )->getFullText() );
 
-
                $this->assertLinksUpdate( $t, $po, 'langlinks', 'll_lang, ll_title', 'll_from = 111', array(
                        array( 'En', 'Foo' ),
                ) );
index 6c17bf4..becf507 100644 (file)
@@ -59,7 +59,6 @@ class MWFunctionTest extends MediaWikiTestCase {
        public static function someMethod() {
                return func_get_args();
        }
-
 }
 
 class MWBlankClass {
index 6b71b7e..7d6d5a1 100644 (file)
@@ -125,7 +125,6 @@ class MWNamespaceTest extends MediaWikiTestCase {
        public function testGetAssociated() {
                $this->assertEquals( NS_TALK, MWNamespace::getAssociated( NS_MAIN ) );
                $this->assertEquals( NS_MAIN, MWNamespace::getAssociated( NS_TALK ) );
-
        }
 
        ### Exceptions with getAssociated()
@@ -201,7 +200,6 @@ class MWNamespaceTest extends MediaWikiTestCase {
                        NS_SPECIAL, NS_MEDIA,
                        "NS_SPECIAL and NS_MEDIA are different subject namespaces"
                );
-
        }
 
        /**
@@ -350,7 +348,6 @@ class MWNamespaceTest extends MediaWikiTestCase {
                        '$wgContentNamespaces is an array with only NS_MAIN by default'
                );
 
-
                # test !is_array( $wgcontentNamespaces )
                $wgContentNamespaces = '';
                $this->assertEquals( NS_MAIN, MWNamespace::getContentNamespaces() );
index 9e50b4c..386ddb8 100644 (file)
@@ -253,5 +253,4 @@ class PathRouterTest extends MediaWikiTestCase {
                $matches = $router->parse( "/wiki/Foo" );
                $this->assertEquals( $matches, array( 'title' => 'bar%20$1' ) );
        }
-
 }
index 7aa3c4a..b909f26 100644 (file)
@@ -77,6 +77,7 @@ class PreferencesTest extends MediaWikiTestCase {
                        , $this->context
                        , $preferences
                );
+
                return $preferences;
        }
 }
index 948b635..4ddc0b0 100644 (file)
@@ -16,6 +16,7 @@ class MediaWikiProvide {
                for ( $i = 1; $i <= $num; $i++ ) {
                        $ret[] = array( $i );
                }
+
                return $ret;
        }
 
@@ -39,6 +40,7 @@ class MediaWikiProvide {
                                $ret[] = array( $day[0], $month[0] );
                        }
                }
+
                return $ret;
        }
 }
index a1e6236..56967de 100644 (file)
@@ -276,5 +276,4 @@ class RecentChangeTest extends MediaWikiTestCase {
                        $msg
                );
        }
-
 }
index f587171..e3a9cfb 100644 (file)
@@ -25,7 +25,6 @@ class RequestContextTest extends MediaWikiTestCase {
                $context->setTitle( $curTitle );
                $this->assertTrue( $curTitle->equals( $context->getWikiPage()->getTitle() ),
                        "When a title is updated the WikiPage should be purged and recreated on-demand with the new title." );
-
        }
 
        public function testImportScopedSession() {
@@ -58,7 +57,7 @@ class RequestContextTest extends MediaWikiTestCase {
                $this->assertEquals( $sinfo['userId'], $context->getUser()->getId(), "Correct context user ID." );
                $this->assertEquals( 'UnitTestContextUser', $context->getUser()->getName(), "Correct context user name." );
 
-               unset ( $sc ); // restore previous context
+               unset( $sc ); // restore previous context
 
                $info = $context->exportSession();
                $this->assertEquals( $oInfo['ip'], $info['ip'], "Correct initial IP address." );
index 60618b1..68db9ad 100644 (file)
@@ -11,6 +11,7 @@ class ResourceLoaderTest extends MediaWikiTestCase {
         */
        public static function resourceLoaderRegisterModules( &$resourceLoader ) {
                self::$resourceLoaderRegisterModulesHook = true;
+
                return true;
        }
 
@@ -31,6 +32,7 @@ class ResourceLoaderTest extends MediaWikiTestCase {
                self::$resourceLoaderRegisterModulesHook = false;
                $resourceLoader = new ResourceLoader();
                $this->assertTrue( self::$resourceLoaderRegisterModulesHook );
+
                return $resourceLoader;
        }
 
@@ -84,7 +86,8 @@ class ResourceLoaderTest extends MediaWikiTestCase {
 
 /* Stubs */
 
-class ResourceLoaderTestModule extends ResourceLoaderModule {}
+class ResourceLoaderTestModule extends ResourceLoaderModule {
+}
 
 /* Hooks */
 global $wgHooks;
index 39673c0..968aaba 100644 (file)
@@ -78,5 +78,4 @@ class RevisionTest_ContentHandlerUseDB extends RevisionStorageTest {
                        $this->assertTrue( true ); // ok
                }
        }
-
 }
index 9380928..e3b0844 100644 (file)
@@ -403,7 +403,6 @@ class RevisionTest extends MediaWikiTestCase {
                // for immutable content like wikitext, this should be the same object
                $this->assertSame( $content, $content2 );
        }
-
 }
 
 class RevisionTestModifyableContent extends TextContent {
@@ -422,7 +421,6 @@ class RevisionTestModifyableContent extends TextContent {
        public function setText( $text ) {
                $this->mText = $text;
        }
-
 }
 
 class RevisionTestModifyableContentHandler extends TextContentHandler {
index f5aacab..c84f10c 100644 (file)
@@ -148,7 +148,6 @@ class SanitizerTest extends MediaWikiTestCase {
                        array( array( 'foo.' => 'baz' ), 'foo.=baz', 'A . is allowed as last character' ),
                        array( array( 'foo6' => 'baz' ), 'foo6=baz', 'Numbers are allowed' ),
 
-
                        # This bit is more relaxed than XML rules, but some extensions use
                        # it, like ProofreadPage (see bug 27539)
                        array( array( '1foo' => 'baz' ), '1foo=baz', 'Leading numbers are allowed' ),
@@ -246,5 +245,4 @@ class SanitizerTest extends MediaWikiTestCase {
                        $message
                );
        }
-
 }
index fc7d8d0..4cdf020 100644 (file)
@@ -10,6 +10,7 @@ function getSiteParams( $conf, $wiki ) {
                        break;
                }
        }
+
        return array(
                'suffix' => $site,
                'lang' => $lang,
index 0530b44..842e2fc 100644 (file)
@@ -49,6 +49,7 @@ class StringUtilsTest extends MediaWikiTestCase {
                                $escaped .= $char;
                        }
                }
+
                return $escaped;
        }
 
index a793bab..ffa8c42 100644 (file)
@@ -13,14 +13,14 @@ class TemplateCategoriesTest extends MediaWikiLangTestCase {
                $user = new User();
                $user->mRights = array( 'createpage', 'edit', 'purge' );
 
-               $status = $page->doEditContent( new WikitextContent( '{{Categorising template}}' ), 'Create a page with a template', 0, false, $user );
+               $page->doEditContent( new WikitextContent( '{{Categorising template}}' ), 'Create a page with a template', 0, false, $user );
                $this->assertEquals(
                        array()
                        , $title->getParentCategories()
                );
 
                $template = WikiPage::factory( Title::newFromText( 'Template:Categorising template' ) );
-               $status = $template->doEditContent( new WikitextContent( '[[Category:Solved bugs]]' ), 'Add a category through a template', 0, false, $user );
+               $template->doEditContent( new WikitextContent( '[[Category:Solved bugs]]' ), 'Add a category through a template', 0, false, $user );
 
                // Run the job queue
                JobQueueGroup::destroySingletons();
@@ -33,5 +33,4 @@ class TemplateCategoriesTest extends MediaWikiLangTestCase {
                        , $title->getParentCategories()
                );
        }
-
 }
index c4d8945..2fb0f49 100644 (file)
@@ -53,6 +53,5 @@ class TestUser {
                        }
                }
                $this->user->saveSettings();
-
        }
 }
index 2d550bc..07dcb7d 100644 (file)
@@ -3,16 +3,12 @@
 /**
  * Tests timestamp parsing and output.
  */
-class TimestampTest extends MediaWikiTestCase {
+class TimestampTest extends MediaWikiLangTestCase {
 
        protected function setUp() {
                parent::setUp();
 
-               $this->setMwGlobals( array(
-                       'wgLanguageCode' => 'en',
-                       'wgContLang' => Language::factory( 'en' ),
-                       'wgLang' => Language::factory( 'en' ),
-               ) );
+               RequestContext::getMain()->setLanguage( Language::factory( 'en' ) );
        }
 
        /**
@@ -38,7 +34,7 @@ class TimestampTest extends MediaWikiTestCase {
         * @expectedException TimestampException
         */
        function testInvalidParse() {
-               $timestamp = new MWTimestamp( "This is not a timestamp." );
+               new MWTimestamp( "This is not a timestamp." );
        }
 
        /**
index 476c194..a11c3d9 100644 (file)
@@ -286,5 +286,4 @@ class TitleMethodsTest extends MediaWikiTestCase {
                $title = Title::newFromText( $title );
                $this->assertEquals( $expectedBool, $title->isWikitextPage() );
        }
-
 }
index aaf81f6..b8b0391 100644 (file)
@@ -66,7 +66,6 @@ class TitlePermissionTest extends MediaWikiLangTestCase {
 
                        $this->user = $this->userUser;
                }
-
        }
 
        function setUserPerm( $perm ) {
@@ -317,7 +316,6 @@ class TitlePermissionTest extends MediaWikiLangTestCase {
                                $this->title->userCan( $action, $this->user, true ) );
                        $this->assertEquals( $check[$action][3],
                                $this->title->quickUserCan( $action, $this->user ) );
-
                        # count( User::getGroupsWithPermissions( $action ) ) < 1
                }
        }
@@ -538,7 +536,6 @@ class TitlePermissionTest extends MediaWikiLangTestCase {
                        $this->title->userCan( 'edit', $this->user ) );
                $this->assertEquals( array(),
                        $this->title->getUserPermissionsErrors( 'edit', $this->user ) );
-
        }
 
        function testActionPermissions() {
@@ -562,7 +559,6 @@ class TitlePermissionTest extends MediaWikiLangTestCase {
                $this->assertEquals( true,
                        $this->title->userCan( 'create', $this->user ) );
 
-
                $this->setUserPerm( array( 'createpage' ) );
                $this->assertEquals( array( array( 'titleprotected', 'Useruser', 'test' ) ),
                        $this->title->getUserPermissionsErrors( 'create', $this->user ) );
@@ -605,7 +601,6 @@ class TitlePermissionTest extends MediaWikiLangTestCase {
                        $this->title->getUserPermissionsErrors( 'move-target', $this->user ) );
                $this->assertEquals( false,
                        $this->title->userCan( 'move-target', $this->user ) );
-
        }
 
        function testUserBlock() {
@@ -655,7 +650,6 @@ class TitlePermissionTest extends MediaWikiLangTestCase {
                                'Useruser', null, '23:00, 31 December 1969', '127.0.8.1',
                                $wgLang->timeanddate( wfTimestamp( TS_MW, $now ), true ) ) ),
                        $this->title->getUserPermissionsErrors( 'move-target', $this->user ) );
-
                # $action != 'read' && $action != 'createaccount' && $user->isBlockedFrom( $this )
                #   $user->blockedFor() == ''
                #   $user->mBlock->mExpiry == 'infinity'
index 970862b..33bd8d6 100644 (file)
@@ -197,6 +197,7 @@ class TitleTest extends MediaWikiTestCase {
                foreach ( $errors as $error ) {
                        $result[] = $error[0];
                }
+
                return $result;
        }
 
index 4bb6daa..f829509 100644 (file)
@@ -587,6 +587,7 @@ class WikiPageTest extends MediaWikiLangTestCase {
                $text = preg_replace( '!\s*(</p>)!sm', '\1', $text ); # don't let tidy confuse us
 
                $this->assertEquals( $expectedHtml, $text );
+
                return $po;
        }
 
@@ -1014,5 +1015,4 @@ more stuff
 
                $this->assertEquals( $expected, $text );
        }
-
 }
index dca9910..41f3572 100644 (file)
@@ -44,5 +44,4 @@ class WikiPageTest_ContentHandlerUseDB extends WikiPageTest {
                $page = new WikiPage( $page->getTitle() );
                $this->assertEquals( 'WikitextContentHandler', get_class( $page->getContentHandler() ) );
        }
-
 }
index 696b145..50638ca 100644 (file)
@@ -47,13 +47,16 @@ class ApiCreateAccountTest extends ApiTestCase {
                $token = $a['token'];
 
                // Finally create the account
-               $ret = $this->doApiRequest( array(
-                       'action' => 'createaccount',
-                       'name' => 'Apitestnew',
-                       'password' => $password,
-                       'token' => $token,
-                       'email' => 'test@domain.test',
-                       'realname' => 'Test Name' ), $ret[2]
+               $ret = $this->doApiRequest(
+                       array(
+                               'action' => 'createaccount',
+                               'name' => 'Apitestnew',
+                               'password' => $password,
+                               'token' => $token,
+                               'email' => 'test@domain.test',
+                               'realname' => 'Test Name'
+                       ),
+                       $ret[2]
                );
 
                $result = $ret[0];
@@ -107,7 +110,7 @@ class ApiCreateAccountTest extends ApiTestCase {
         * @expectedException UsageException
         */
        function testNoName() {
-               $ret = $this->doApiRequest( array(
+               $this->doApiRequest( array(
                        'action' => 'createaccount',
                        'token' => LoginForm::getCreateaccountToken(),
                        'password' => 'password',
@@ -119,7 +122,7 @@ class ApiCreateAccountTest extends ApiTestCase {
         * @expectedException UsageException
         */
        function testNoPassword() {
-               $ret = $this->doApiRequest( array(
+               $this->doApiRequest( array(
                        'action' => 'createaccount',
                        'name' => 'testName',
                        'token' => LoginForm::getCreateaccountToken(),
index 8842766..a3d39dd 100644 (file)
@@ -6,7 +6,6 @@
  * @group medium
  */
 class ApiBlockTest extends ApiTestCase {
-
        protected function setUp() {
                parent::setUp();
                $this->doLogin();
@@ -36,7 +35,6 @@ class ApiBlockTest extends ApiTestCase {
         * previously always considered valid (bug 34212).
         */
        function testMakeNormalBlock() {
-
                $data = $this->getTokens();
 
                $user = User::newFromName( 'UTApiBlockee' );
@@ -53,7 +51,7 @@ class ApiBlockTest extends ApiTestCase {
                $key = array_pop( $keys );
                $pageinfo = $data[0]['query']['pages'][$key];
 
-               $data = $this->doApiRequest( array(
+               $this->doApiRequest( array(
                        'action' => 'block',
                        'user' => 'UTApiBlockee',
                        'reason' => 'Some reason',
@@ -66,7 +64,6 @@ class ApiBlockTest extends ApiTestCase {
                $this->assertEquals( 'UTApiBlockee', (string)$block->getTarget() );
                $this->assertEquals( 'Some reason', $block->mReason );
                $this->assertEquals( 'infinity', $block->mExpiry );
-
        }
 
        /**
index 7d8e01f..f3b9a67 100644 (file)
@@ -161,13 +161,13 @@ class ApiEditPageTest extends ApiTestCase {
                if ( $text !== null ) {
                        if ( $text === '' ) {
                                // can't create an empty page, so create it with some content
-                               list( $re, , ) = $this->doApiRequestWithToken( array(
+                               $this->doApiRequestWithToken( array(
                                        'action' => 'edit',
                                        'title' => $name,
                                        'text' => '(dummy)', ) );
                        }
 
-                       list( $re, , ) = $this->doApiRequestWithToken( array(
+                       list( $re ) = $this->doApiRequestWithToken( array(
                                'action' => 'edit',
                                'title' => $name,
                                'text' => $text, ) );
@@ -176,7 +176,7 @@ class ApiEditPageTest extends ApiTestCase {
                }
 
                // -- try append/prepend --------------------------------------------
-               list( $re, , ) = $this->doApiRequestWithToken( array(
+               list( $re ) = $this->doApiRequestWithToken( array(
                        'action' => 'edit',
                        'title' => $name,
                        $op . 'text' => $append, ) );
@@ -224,7 +224,7 @@ class ApiEditPageTest extends ApiTestCase {
 
                // try to save edit, expect conflict
                try {
-                       list( $re, , ) = $this->doApiRequestWithToken( array(
+                       $this->doApiRequestWithToken( array(
                                'action' => 'edit',
                                'title' => $name,
                                'text' => 'nix bar!',
@@ -280,7 +280,7 @@ class ApiEditPageTest extends ApiTestCase {
 
                // try again, without following the redirect. Should fail.
                try {
-                       list( $re, , ) = $this->doApiRequestWithToken( array(
+                       $this->doApiRequestWithToken( array(
                                'action' => 'edit',
                                'title' => $rname,
                                'text' => 'nix bar!',
index 902b7b8..ae74e38 100644 (file)
@@ -116,6 +116,7 @@ class ApiOptionsTest extends MediaWikiLangTestCase {
                                $mapping[$key] = 'unused';
                        }
                }
+
                return $mapping;
        }
 
@@ -126,12 +127,14 @@ class ApiOptionsTest extends MediaWikiLangTestCase {
                        'optionname' => null,
                        'optionvalue' => null,
                );
+
                return array_merge( $request, $custom );
        }
 
        private function executeQuery( $request ) {
                $this->mContext->setRequest( new FauxRequest( $request, true, $this->mSession ) );
                $this->mTested->execute();
+
                return $this->mTested->getResult()->getData();
        }
 
@@ -156,6 +159,7 @@ class ApiOptionsTest extends MediaWikiLangTestCase {
                } catch ( UsageException $e ) {
                        $this->assertEquals( 'notloggedin', $e->getCodeString() );
                        $this->assertEquals( 'Anonymous users cannot change preferences', $e->getMessage() );
+
                        return;
                }
                $this->fail( "UsageException was not thrown" );
@@ -169,6 +173,7 @@ class ApiOptionsTest extends MediaWikiLangTestCase {
                } catch ( UsageException $e ) {
                        $this->assertEquals( 'nooptionname', $e->getCodeString() );
                        $this->assertEquals( 'The optionname parameter must be set', $e->getMessage() );
+
                        return;
                }
                $this->fail( "UsageException was not thrown" );
@@ -191,6 +196,7 @@ class ApiOptionsTest extends MediaWikiLangTestCase {
                } catch ( UsageException $e ) {
                        $this->assertEquals( 'nochanges', $e->getCodeString() );
                        $this->assertEquals( 'No changes were requested', $e->getMessage() );
+
                        return;
                }
                $this->fail( "UsageException was not thrown" );
index a42e5aa..b408875 100644 (file)
@@ -16,7 +16,7 @@ class ApiParseTest extends ApiTestCase {
                $somePage = mt_rand();
 
                try {
-                       $data = $this->doApiRequest( array(
+                       $this->doApiRequest( array(
                                'action' => 'parse',
                                'page' => $somePage ) );
 
@@ -26,5 +26,4 @@ class ApiParseTest extends ApiTestCase {
                                "Parse request for nonexistent page must give 'missingtitle' error: " . var_export( $ex->getMessageArray(), true ) );
                }
        }
-
 }
index a7f9229..881eb3f 100644 (file)
@@ -37,5 +37,4 @@ class ApiPurgeTest extends ApiTestCase {
                        $this->assertArrayHasKey( $pages[$v['title']], $v );
                }
        }
-
 }
index 552fbfb..1559bef 100644 (file)
@@ -52,6 +52,7 @@ abstract class ApiTestCase extends MediaWikiLangTestCase {
        protected function editPage( $pageName, $text, $summary = '', $defaultNs = NS_MAIN ) {
                $title = Title::newFromText( $pageName, $defaultNs );
                $page = WikiPage::factory( $title );
+
                return $page->doEditContent( ContentHandler::makeContent( $text, $title ), $summary );
        }
 
@@ -131,6 +132,7 @@ abstract class ApiTestCase extends MediaWikiLangTestCase {
                        $session['wsEditToken'] = $session['wsToken'];
                        // add token to request parameters
                        $params['token'] = md5( $session['wsToken'] ) . User::EDIT_TOKEN_SUFFIX;
+
                        return $this->doApiRequest( $params, $session, false, $user );
                } else {
                        throw new Exception( "request data not in right format" );
@@ -164,6 +166,7 @@ abstract class ApiTestCase extends MediaWikiLangTestCase {
                        'titles' => 'Main Page',
                        'intoken' => 'edit|delete|protect|move|block|unblock|watch',
                        'prop' => 'info' ), $session, false, $user->user );
+
                return $data;
        }
 
@@ -204,11 +207,14 @@ class UserWrapper {
 }
 
 class MockApi extends ApiBase {
-       public function execute() {}
+       public function execute() {
+       }
 
-       public function getVersion() {}
+       public function getVersion() {
+       }
 
-       public function __construct() {}
+       public function __construct() {
+       }
 
        public function getAllowedParams() {
                return array(
@@ -234,6 +240,7 @@ class ApiTestContext extends RequestContext {
                if ( $user !== null ) {
                        $context->setUser( $user );
                }
+
                return $context;
        }
 }
index 8028491..7e18b6e 100644 (file)
@@ -47,6 +47,7 @@ abstract class ApiTestCaseUpload extends ApiTestCase {
                        // see if it now doesn't exist; reload
                        $title = Title::newFromText( $title->getText(), NS_FILE );
                }
+
                return !( $title && $title instanceof Title && $title->exists() );
        }
 
@@ -69,6 +70,7 @@ abstract class ApiTestCaseUpload extends ApiTestCase {
                foreach ( $dupes as $dupe ) {
                        $success &= $this->deleteFileByTitle( $dupe->getTitle() );
                }
+
                return $success;
        }
 
@@ -105,7 +107,6 @@ abstract class ApiTestCaseUpload extends ApiTestCase {
                );
 
                return true;
-
        }
 
        function fakeUploadChunk( $fieldName, $fileName, $type, & $chunkData ) {
@@ -145,5 +146,4 @@ abstract class ApiTestCaseUpload extends ApiTestCase {
        function clearFakeUploads() {
                $_FILES = array();
        }
-
 }
index 0d98b04..c418a87 100644 (file)
@@ -27,7 +27,6 @@ require_once( 'ApiTestCaseUpload.php' );
  * This is pretty sucky... needs to be prettified.
  */
 class ApiUploadTest extends ApiTestCaseUpload {
-
        /**
         * Testing login
         * XXX this is a funny way of getting session context
@@ -59,8 +58,8 @@ class ApiUploadTest extends ApiTestCaseUpload {
                $this->assertArrayHasKey( 'lgtoken', $result['login'] );
 
                $this->assertNotEmpty( $session, 'API Login must return a session' );
-               return $session;
 
+               return $session;
        }
 
        /**
@@ -118,7 +117,6 @@ class ApiUploadTest extends ApiTestCaseUpload {
                $this->deleteFileByFileName( $fileName );
                $this->deleteFileByContent( $filePath );
 
-
                if ( !$this->fakeUploadFile( 'file', $fileName, $mimeType, $filePath ) ) {
                        $this->markTestIncomplete( "Couldn't upload file!\n" );
                }
@@ -298,7 +296,7 @@ class ApiUploadTest extends ApiTestCaseUpload {
 
                $exception = false;
                try {
-                       list( $result, $request, $session ) = $this->doApiRequestWithToken( $params, $session,
+                       list( $result, , $session ) = $this->doApiRequestWithToken( $params, $session,
                                self::$users['uploader']->user );
                } catch ( UsageException $e ) {
                        $exception = true;
@@ -307,7 +305,6 @@ class ApiUploadTest extends ApiTestCaseUpload {
                $this->assertEquals( 'Success', $result['upload']['result'] );
                $this->assertFalse( $exception );
 
-
                // second upload with the same content (but different name)
 
                if ( !$this->fakeUploadFile( 'file', $fileNames[1], $mimeType, $filePaths[0] ) ) {
@@ -324,7 +321,7 @@ class ApiUploadTest extends ApiTestCaseUpload {
 
                $exception = false;
                try {
-                       list( $result, $request, $session ) = $this->doApiRequestWithToken( $params, $session,
+                       list( $result ) = $this->doApiRequestWithToken( $params, $session,
                                self::$users['uploader']->user ); // FIXME: leaks a temporary file
                } catch ( UsageException $e ) {
                        $exception = true;
@@ -341,7 +338,6 @@ class ApiUploadTest extends ApiTestCaseUpload {
                unlink( $filePaths[0] );
        }
 
-
        /**
         * @depends testLogin
         */
@@ -382,7 +378,7 @@ class ApiUploadTest extends ApiTestCaseUpload {
 
                $exception = false;
                try {
-                       list( $result, $request, $session ) = $this->doApiRequestWithToken( $params, $session,
+                       list( $result, , $session ) = $this->doApiRequestWithToken( $params, $session,
                                self::$users['uploader']->user ); // FIXME: leaks a temporary file
                } catch ( UsageException $e ) {
                        $exception = true;
@@ -411,7 +407,7 @@ class ApiUploadTest extends ApiTestCaseUpload {
                $this->clearFakeUploads();
                $exception = false;
                try {
-                       list( $result, $request, $session ) = $this->doApiRequestWithToken( $params, $session,
+                       list( $result ) = $this->doApiRequestWithToken( $params, $session,
                                self::$users['uploader']->user );
                } catch ( UsageException $e ) {
                        $exception = true;
@@ -482,7 +478,7 @@ class ApiUploadTest extends ApiTestCaseUpload {
                        if ( !$chunkSessionKey ) {
                                // Upload fist chunk ( and get the session key )
                                try {
-                                       list( $result, $request, $session ) = $this->doApiRequestWithToken( $params, $session,
+                                       list( $result, , $session ) = $this->doApiRequestWithToken( $params, $session,
                                                self::$users['uploader']->user );
                                } catch ( UsageException $e ) {
                                        $this->markTestIncomplete( $e->getMessage() );
@@ -509,7 +505,7 @@ class ApiUploadTest extends ApiTestCaseUpload {
                        $this->assertEquals( $resultOffset, $params['offset'] );
                        // Upload current chunk
                        try {
-                               list( $result, $request, $session ) = $this->doApiRequestWithToken( $params, $session,
+                               list( $result, , $session ) = $this->doApiRequestWithToken( $params, $session,
                                        self::$users['uploader']->user );
                        } catch ( UsageException $e ) {
                                $this->markTestIncomplete( $e->getMessage() );
@@ -548,7 +544,7 @@ class ApiUploadTest extends ApiTestCaseUpload {
                $this->clearFakeUploads();
                $exception = false;
                try {
-                       list( $result, $request, $session ) = $this->doApiRequestWithToken( $params, $session,
+                       list( $result ) = $this->doApiRequestWithToken( $params, $session,
                                self::$users['uploader']->user );
                } catch ( UsageException $e ) {
                        $exception = true;
index aefd939..a9bc43a 100644 (file)
@@ -7,7 +7,6 @@
  * @todo This test suite is severly broken and need a full review
  */
 class ApiWatchTest extends ApiTestCase {
-
        protected function setUp() {
                parent::setUp();
                $this->doLogin();
@@ -95,8 +94,7 @@ class ApiWatchTest extends ApiTestCase {
        /**
         */
        function testGetRollbackToken() {
-
-               $pageinfo = $this->getTokens();
+               $this->getTokens();
 
                if ( !Title::newFromText( 'Help:UTPage' )->exists() ) {
                        $this->markTestSkipped( "The article [[Help:UTPage]] does not exist" ); //TODO: just create it?
@@ -168,7 +166,7 @@ class ApiWatchTest extends ApiTestCase {
                $this->assertArrayHasKey( 'delete', $data[0] );
                $this->assertArrayHasKey( 'title', $data[0]['delete'] );
 
-               $data = $this->doApiRequest( array(
+               $this->doApiRequest( array(
                        'action' => 'query',
                        'list' => 'watchlist' ) );
 
index 3040758..1b815ac 100644 (file)
@@ -108,6 +108,7 @@ class RandomImageGenerator {
                foreach ( $filenames as $filename ) {
                        $this->{$imageWriteMethod}( $this->getImageSpec(), $format, $filename );
                }
+
                return $filenames;
        }
 
@@ -156,7 +157,6 @@ class RandomImageGenerator {
                }
 
                return $filenames;
-
        }
 
 
@@ -196,7 +196,6 @@ class RandomImageGenerator {
                                array( 'x' => $originX, 'y' => $originY - $radius )
                        );
                        $draws[] = $draw;
-
                }
 
                $spec['draws'] = $draws;
@@ -216,6 +215,7 @@ class RandomImageGenerator {
                foreach ( $shape as $point ) {
                        $points[] = $point['x'] . ',' . $point['y'];
                }
+
                return join( " ", $points );
        }
 
@@ -337,6 +337,7 @@ class RandomImageGenerator {
                        }
                        $tSpec['draws'][] = $tDraw;
                }
+
                return $tSpec;
        }
 
@@ -384,6 +385,7 @@ class RandomImageGenerator {
                $command = wfEscapeShellArg( $wgImageMagickConvertCommand ) . " " . implode( " ", $args );
                $retval = null;
                wfShellExec( $command, $retval );
+
                return ( $retval === 0 );
        }
 
@@ -397,6 +399,7 @@ class RandomImageGenerator {
                for ( $i = 0; $i <= 2; $i++ ) {
                        $components[] = mt_rand( 0, 255 );
                }
+
                return 'rgb(' . join( ', ', $components ) . ')';
        }
 
@@ -414,6 +417,7 @@ class RandomImageGenerator {
                for ( $i = 0; $i < $count; $i += 2 ) {
                        $pairs[] = array( $lines[$i], $lines[$i + 1] );
                }
+
                return $pairs;
        }
 
@@ -461,5 +465,4 @@ class RandomImageGenerator {
 
                return $lines;
        }
-
 }
index a59983d..802a0e1 100644 (file)
@@ -13,7 +13,5 @@ class ApiFormatPhpTest extends ApiFormatTestBase {
 
                $this->assertInternalType( 'array', unserialize( $data ) );
                $this->assertGreaterThan( 0, count( (array)$data ) );
-
        }
-
 }
index e0a84e1..7f32e5f 100644 (file)
@@ -68,6 +68,7 @@ abstract class ApiQueryContinueTestBase extends ApiQueryTestBase {
                                // put 'continue' params at the end - lazy method
                                $a = strpos( $a, 'continue' ) !== false ? 'zzz ' . $a : $a;
                                $b = strpos( $b, 'continue' ) !== false ? 'zzz ' . $b : $b;
+
                                return strcmp( $a, $b );
                        } );
                        $reqStr = http_build_query( $request );
@@ -103,6 +104,7 @@ abstract class ApiQueryContinueTestBase extends ApiQueryTestBase {
                                if ( $expectedCount > $count ) {
                                        print "***** $id Finished early in $count turns. $expectedCount was expected\n";
                                }
+
                                return $result;
                        } elseif ( !$useContinue ) {
                                $this->assertFalse( 'Non-smart query must be requested all at once' );
index 7fb5307..bc01ec2 100644 (file)
@@ -20,7 +20,6 @@ class ApiQueryTest extends ApiTestCase {
                        'action' => 'query',
                        'titles' => 'Project:articleA|article_B' ) );
 
-
                $this->assertArrayHasKey( 'query', $data[0] );
                $this->assertArrayHasKey( 'normalized', $data[0]['query'] );
 
@@ -42,7 +41,6 @@ class ApiQueryTest extends ApiTestCase {
                        ),
                        $data[0]['query']['normalized'][1]
                );
-
        }
 
        function testTitlesAreRejectedIfInvalid() {
@@ -65,5 +63,4 @@ class ApiQueryTest extends ApiTestCase {
                $this->assertArrayHasKey( 'missing', $data[0]['query']['pages'][-2] );
                $this->assertArrayHasKey( 'invalid', $data[0]['query']['pages'][-1] );
        }
-
 }
index 3d96beb..d712bc0 100644 (file)
@@ -24,7 +24,6 @@
  * @file
  */
 
-
 /** This class has some common functionality for testing query module
  */
 abstract class ApiQueryTestBase extends ApiTestCase {
@@ -48,6 +47,7 @@ STR;
                        $request = array_merge_recursive( $request, $req );
                        $this->mergeExpected( $expected, $exp );
                }
+
                return array( $request, $expected );
        }
 
@@ -62,6 +62,7 @@ STR;
                $this->assertArrayHasKey( 1, $v, self::PARAM_ASSERT );
                $this->assertType( 'array', $v[0], self::PARAM_ASSERT );
                $this->assertType( 'array', $v[1], self::PARAM_ASSERT );
+
                return $v;
        }
 
index c7e75d9..1c81ea7 100644 (file)
@@ -52,6 +52,7 @@ class ProcessCacheLRUTest extends MediaWikiTestCase {
                for ( $i = $firstKey; $i <= $lastKey; $i++ ) {
                        $expected["cache-key-$i"] = array( "prop-$i" => "value-$i" );
                }
+
                return $expected;
        }
 
@@ -70,7 +71,7 @@ class ProcessCacheLRUTest extends MediaWikiTestCase {
         * @expectedException MWException
         */
        function testConstructorGivenInvalidValue( $maxSize ) {
-               $c = new ProcessCacheLRUTestable( $maxSize );
+               new ProcessCacheLRUTestable( $maxSize );
        }
 
        /**
@@ -125,7 +126,6 @@ class ProcessCacheLRUTest extends MediaWikiTestCase {
                        $cache->getCache(),
                        "Filling a $cacheMaxEntries entries cache with $entryToFill entries"
                );
-
        }
 
        /**
@@ -218,9 +218,7 @@ class ProcessCacheLRUTest extends MediaWikiTestCase {
                        ),
                        $cache->getCache()
                );
-
        }
-
 }
 
 /**
index 67d4fde..c345513 100644 (file)
@@ -317,6 +317,7 @@ class DummyContentHandlerForTesting extends ContentHandler {
         */
        public function unserializeContent( $blob, $format = null ) {
                $d = unserialize( $blob );
+
                return new DummyContentForTesting( $d );
        }
 
index 8f53dd3..1c45820 100644 (file)
@@ -77,5 +77,4 @@ class CssContentTest extends MediaWikiTestCase {
        public function testEquals( Content $a, Content $b = null, $equal = false ) {
                $this->assertEquals( $equal, $a->equals( $b ) );
        }
-
 }
index 2d693fe..6632edd 100644 (file)
@@ -269,5 +269,4 @@ class JavaScriptContentTest extends TextContentTest {
                        array( new JavaScriptContent( "hallo" ), new JavaScriptContent( "HALLO" ), false ),
                );
        }
-
 }
index 4fc2d51..28c006c 100644 (file)
@@ -423,5 +423,4 @@ class TextContentTest extends MediaWikiLangTestCase {
                        $this->assertEquals( $expectedNative, $converted->getNativeData() );
                }
        }
-
 }
index 0f6a968..45d8140 100644 (file)
@@ -181,5 +181,4 @@ class WikitextContentHandlerTest extends MediaWikiLangTestCase {
        /*
        public function testGetUndoContent( Revision $current, Revision $undo, Revision $undoafter = null ) {}
        */
-
 }
index caa3368..965a5f3 100644 (file)
@@ -231,7 +231,7 @@ class DatabaseSQLTest extends MediaWikiTestCase {
                                ),
                                "DELETE FROM table " .
                                        "WHERE field IN (" .
-                                               "SELECT field_join FROM table_join WHERE alias = 'text'" .
+                                       "SELECT field_join FROM table_join WHERE alias = 'text'" .
                                        ")"
                        ),
                        array(
@@ -244,7 +244,7 @@ class DatabaseSQLTest extends MediaWikiTestCase {
                                ),
                                "DELETE FROM table " .
                                        "WHERE field IN (" .
-                                               "SELECT field_join FROM table_join " .
+                                       "SELECT field_join FROM table_join " .
                                        ")"
                        ),
                );
@@ -296,8 +296,8 @@ class DatabaseSQLTest extends MediaWikiTestCase {
                                "INSERT IGNORE INTO table " .
                                        "(field,field2) " .
                                        "VALUES " .
-                                               "('text','2')," .
-                                               "('multi','3')"
+                                       "('text','2')," .
+                                       "('multi','3')"
                        ),
                );
        }
@@ -330,7 +330,7 @@ class DatabaseSQLTest extends MediaWikiTestCase {
                                "INSERT INTO insert_table " .
                                        "(field_insert,field) " .
                                        "SELECT field_select,field2 " .
-                                               "FROM select_table"
+                                       "FROM select_table"
                        ),
                        array(
                                array(
@@ -342,8 +342,8 @@ class DatabaseSQLTest extends MediaWikiTestCase {
                                "INSERT INTO insert_table " .
                                        "(field_insert,field) " .
                                        "SELECT field_select,field2 " .
-                                               "FROM select_table " .
-                                               "WHERE field = '2'"
+                                       "FROM select_table " .
+                                       "WHERE field = '2'"
                        ),
                        array(
                                array(
@@ -357,9 +357,9 @@ class DatabaseSQLTest extends MediaWikiTestCase {
                                "INSERT IGNORE INTO insert_table " .
                                        "(field_insert,field) " .
                                        "SELECT field_select,field2 " .
-                                               "FROM select_table " .
-                                               "WHERE field = '2' " .
-                                               "ORDER BY field"
+                                       "FROM select_table " .
+                                       "WHERE field = '2' " .
+                                       "ORDER BY field"
                        ),
                );
        }
@@ -388,8 +388,8 @@ class DatabaseSQLTest extends MediaWikiTestCase {
                                "DELETE FROM replace_table " .
                                        "WHERE ( field='text' ); " .
                                        "INSERT INTO replace_table " .
-                                               "(field,field2) " .
-                                               "VALUES ('text','text2')"
+                                       "(field,field2) " .
+                                       "VALUES ('text','text2')"
                        ),
                        array(
                                array(
@@ -404,8 +404,8 @@ class DatabaseSQLTest extends MediaWikiTestCase {
                                "DELETE FROM module_deps " .
                                        "WHERE ( md_module='module' AND md_skin='skin' ); " .
                                        "INSERT INTO module_deps " .
-                                               "(md_module,md_skin,md_deps) " .
-                                               "VALUES ('module','skin','deps')"
+                                       "(md_module,md_skin,md_deps) " .
+                                       "VALUES ('module','skin','deps')"
                        ),
                        array(
                                array(
@@ -426,13 +426,13 @@ class DatabaseSQLTest extends MediaWikiTestCase {
                                "DELETE FROM module_deps " .
                                        "WHERE ( md_module='module' AND md_skin='skin' ); " .
                                        "INSERT INTO module_deps " .
-                                               "(md_module,md_skin,md_deps) " .
-                                               "VALUES ('module','skin','deps'); " .
-                               "DELETE FROM module_deps " .
+                                       "(md_module,md_skin,md_deps) " .
+                                       "VALUES ('module','skin','deps'); " .
+                                       "DELETE FROM module_deps " .
                                        "WHERE ( md_module='module2' AND md_skin='skin2' ); " .
                                        "INSERT INTO module_deps " .
-                                               "(md_module,md_skin,md_deps) " .
-                                               "VALUES ('module2','skin2','deps2')"
+                                       "(md_module,md_skin,md_deps) " .
+                                       "VALUES ('module2','skin2','deps2')"
                        ),
                        array(
                                array(
@@ -453,13 +453,13 @@ class DatabaseSQLTest extends MediaWikiTestCase {
                                "DELETE FROM module_deps " .
                                        "WHERE ( md_module='module' ) OR ( md_skin='skin' ); " .
                                        "INSERT INTO module_deps " .
-                                               "(md_module,md_skin,md_deps) " .
-                                               "VALUES ('module','skin','deps'); " .
-                               "DELETE FROM module_deps " .
+                                       "(md_module,md_skin,md_deps) " .
+                                       "VALUES ('module','skin','deps'); " .
+                                       "DELETE FROM module_deps " .
                                        "WHERE ( md_module='module2' ) OR ( md_skin='skin2' ); " .
                                        "INSERT INTO module_deps " .
-                                               "(md_module,md_skin,md_deps) " .
-                                               "VALUES ('module2','skin2','deps2')"
+                                       "(md_module,md_skin,md_deps) " .
+                                       "VALUES ('module2','skin2','deps2')"
                        ),
                        array(
                                array(
index 097e57a..815edd2 100644 (file)
@@ -9,6 +9,7 @@ class MockDatabaseSqlite extends DatabaseSqliteStandalone {
 
        function query( $sql, $fname = '', $tempIgnore = false ) {
                $this->lastQuery = $sql;
+
                return true;
        }
 
@@ -327,6 +328,7 @@ class DatabaseSqliteTest extends MediaWikiTestCase {
                $db->sourceFile( "$IP/tests/phpunit/data/db/sqlite/tables-$version.sql" );
                $updater = DatabaseUpdater::newForDB( $db, false, $maint );
                $updater->doUpdates( array( 'core' ) );
+
                return $db;
        }
 
@@ -348,6 +350,7 @@ class DatabaseSqliteTest extends MediaWikiTestCase {
                }
                $list = array_flip( $list );
                sort( $list );
+
                return $list;
        }
 
@@ -359,6 +362,7 @@ class DatabaseSqliteTest extends MediaWikiTestCase {
                        $cols[$col->name] = $col;
                }
                ksort( $cols );
+
                return $cols;
        }
 
@@ -376,6 +380,7 @@ class DatabaseSqliteTest extends MediaWikiTestCase {
                        $indexes[$index->name] = $index;
                }
                ksort( $indexes );
+
                return $indexes;
        }
 
index 1efa279..57df08e 100644 (file)
@@ -36,6 +36,7 @@ class DatabaseTestHelper extends DatabaseBase {
        public function getLastSqls() {
                $lastSqls = implode( '; ', $this->lastSqls );
                $this->lastSqls = array();
+
                return $lastSqls;
        }
 
@@ -78,6 +79,7 @@ class DatabaseTestHelper extends DatabaseBase {
 
        public function tableExists( $table, $fname = __METHOD__ ) {
                $this->checkFunctionName( $fname );
+
                return in_array( $table, (array)$this->tablesExists );
        }
 
index 596d0bd..27d4d0e 100644 (file)
@@ -76,6 +76,7 @@ abstract class ORMRowTest extends \MediaWikiTestCase {
         */
        protected function getRowInstance( array $data, $loadDefaults ) {
                $class = $this->getRowClass();
+
                return new $class( $this->getTableInstance(), $data, $loadDefaults );
        }
 
index 4cadf31..e583d1b 100644 (file)
@@ -45,6 +45,7 @@ class ORMTableTest extends MediaWikiTestCase {
         */
        public function getTable() {
                $class = $this->getTableClass();
+
                return $class::singleton();
        }
 
@@ -84,7 +85,6 @@ class ORMTableTest extends MediaWikiTestCase {
 
                $db->ignoreErrors( false );
        }
-
 }
 
 /**
index 263553a..f32610b 100644 (file)
@@ -122,10 +122,10 @@ class TestORMRowTest extends ORMRowTest {
                        'blob' => new stdClass()
                );
        }
-
 }
 
-class TestORMRow extends ORMRow {}
+class TestORMRow extends ORMRow {
+}
 
 class TestORMTable extends ORMTable {
 
@@ -194,6 +194,4 @@ class TestORMTable extends ORMTable {
        protected function getFieldPrefix() {
                return 'test_';
        }
-
-
 }
index 3991c93..0d6e4d5 100644 (file)
@@ -315,6 +315,7 @@ class FileBackendTest extends MediaWikiTestCase {
                                "Source file $source does not exist ($backendName)." );
                        $this->assertEquals( false, $this->backend->fileExists( array( 'src' => $dest ) ),
                                "Destination file $dest does not exist ($backendName)." );
+
                        return; // done
                }
 
@@ -434,6 +435,7 @@ class FileBackendTest extends MediaWikiTestCase {
                                "Source file $source does not exist ($backendName)." );
                        $this->assertEquals( false, $this->backend->fileExists( array( 'src' => $dest ) ),
                                "Destination file $dest does not exist ($backendName)." );
+
                        return; // done
                }
 
@@ -1369,6 +1371,7 @@ class FileBackendTest extends MediaWikiTestCase {
 
        public static function provider_testPrepareAndClean() {
                $base = self::baseStorePath();
+
                return array(
                        array( "$base/unittest-cont1/e/a/z/some_file1.txt", true ),
                        array( "$base/unittest-cont2/a/z/some_file2.txt", true ),
@@ -2192,6 +2195,7 @@ class FileBackendTest extends MediaWikiTestCase {
        // test helper wrapper for backend prepare() function
        private function create( array $params ) {
                $params['op'] = 'create';
+
                return $this->backend->doQuickOperations( array( $params ) );
        }
 
index 7cc25b1..033ae0b 100644 (file)
@@ -1,26 +1,25 @@
 <?php
 
 class FileRepoTest extends MediaWikiTestCase {
-
        /**
         * @expectedException MWException
         */
        function testFileRepoConstructionOptionCanNotBeNull() {
-               $f = new FileRepo();
+               new FileRepo();
        }
 
        /**
         * @expectedException MWException
         */
        function testFileRepoConstructionOptionCanNotBeAnEmptyArray() {
-               $f = new FileRepo( array() );
+               new FileRepo( array() );
        }
 
        /**
         * @expectedException MWException
         */
        function testFileRepoConstructionOptionNeedNameKey() {
-               $f = new FileRepo( array(
+               new FileRepo( array(
                        'backend' => 'foobar'
                ) );
        }
@@ -29,7 +28,7 @@ class FileRepoTest extends MediaWikiTestCase {
         * @expectedException MWException
         */
        function testFileRepoConstructionOptionNeedBackendKey() {
-               $f = new FileRepo( array(
+               new FileRepo( array(
                        'name' => 'foobar'
                ) );
        }
index a89ef98..71a585e 100644 (file)
@@ -69,6 +69,7 @@ class StoreBatchTest extends MediaWikiTestCase {
                $result = $this->repo->store( $srcPath, 'temp', $dstRel, $flags );
                $result->value = $this->repo->getVirtualUrl( 'temp' ) . '/' . $dstUrlRel;
                $this->createdFiles[] = $result->value;
+
                return $result;
        }
 
index 820f8c5..787b431 100644 (file)
@@ -46,7 +46,8 @@ class JobQueueTest extends MediaWikiTestCase {
                                if ( !( $this->$q instanceof JobQueueDB ) ) {
                                        $this->$q->setTestingPrefix( 'unittests-' . wfRandomString( 32 ) );
                                }
-                       } catch ( MWException $e ) {}; // unsupported? (@TODO: what if it was another error?)
+                       } catch ( MWException $e ) {
+                       }; // unsupported? (@TODO: what if it was another error?)
                }
        }
 
@@ -109,7 +110,6 @@ class JobQueueTest extends MediaWikiTestCase {
                $jobs = iterator_to_array( $queue->getAllQueuedJobs() );
                $this->assertEquals( 2, count( $jobs ), "Queue iterator size is correct ($desc)" );
 
-
                $job1 = $queue->pop();
                $this->assertFalse( $queue->isEmpty(), "Queue is not empty ($desc)" );
 
index 0782e4e..ef263c4 100644 (file)
@@ -88,7 +88,6 @@ class FormatJsonTest extends MediaWikiTestCase {
                        strtolower( FormatJson::encode( "\xf0\xa0\x80\x80" ) ),
                        'Test encoding an broken json_encode character (U+20000)'
                );
-
        }
 
        public function testDecodeReturnType() {
@@ -156,6 +155,7 @@ class FormatJsonTest extends MediaWikiTestCase {
                                $cases[] = array( $from, '"' . ( $leaveUnescaped ? $from : $to ) . '"' );
                        }
                }
+
                return $cases;
        }
 }
index 37a9b34..7436c43 100644 (file)
@@ -73,6 +73,7 @@ abstract class GenericArrayObjectTest extends MediaWikiTestCase {
         */
        protected function getNew( array $elements = array() ) {
                $class = $this->getInstanceClass();
+
                return new $class( $elements );
        }
 
@@ -197,6 +198,7 @@ abstract class GenericArrayObjectTest extends MediaWikiTestCase {
        public function testOffsetSet( array $elements ) {
                if ( $elements === array() ) {
                        $this->assertTrue( true );
+
                        return;
                }
 
@@ -258,5 +260,4 @@ abstract class GenericArrayObjectTest extends MediaWikiTestCase {
 
                $this->assertArrayEquals( $list, $copy, true, true );
        }
-
 }
index 117a072..ffa6084 100644 (file)
@@ -146,5 +146,4 @@ class BitmapMetadataHandlerTest extends MediaWikiTestCase {
                $res = $handler->getTiffByteOrder( $this->filePath . 'test.tiff' );
                $this->assertEquals( 'LE', $res );
        }
-
 }
index e7e95f7..6ad28ac 100644 (file)
@@ -39,6 +39,4 @@ class ExifTest extends MediaWikiTestCase {
                );
                $this->assertEquals( $expected, $data );
        }
-
-
 }
index c9648a7..81a58dd 100644 (file)
@@ -56,5 +56,4 @@ class IPTCTest extends MediaWikiTestCase {
                $res = IPTC::Parse( $iptcData );
                $this->assertEquals( array( '¼' ), $res['Keywords'] );
        }
-
 }
index 3bbce2b..58d791f 100644 (file)
@@ -52,7 +52,6 @@ class PNGMetadataExtractorTest extends MediaWikiTestCase {
                // encoded as just \xA9.
                $expected = "© 2010 Bawolff";
 
-
                $this->assertArrayHasKey( 'text', $meta );
                $meta = $meta['text'];
                $this->assertArrayHasKey( 'Copyright', $meta );
@@ -149,5 +148,4 @@ class PNGMetadataExtractorTest extends MediaWikiTestCase {
                        'greyscale-na-png.png' );
                $this->assertEquals( 'greyscale', $meta['colorType'] );
        }
-
 }
index 97a0000..3bf9c59 100644 (file)
@@ -21,6 +21,7 @@ class SVGMetadataExtractorTest extends MediaWikiTestCase {
                $r = new XMLReader();
                if ( !method_exists( $r, 'readInnerXML' ) ) {
                        $this->markTestSkipped( 'XMLReader::readInnerXML() does not exist (libxml >2.6.20 needed).' );
+
                        return;
                }
                $this->assertMetadata( $infile, $expected );
@@ -41,6 +42,7 @@ class SVGMetadataExtractorTest extends MediaWikiTestCase {
 
        public static function provideSvgFiles() {
                $base = __DIR__ . '/../../data/media';
+
                return array(
                        array(
                                "$base/Wikimedia-logo.svg",
index 86c722b..3e39675 100644 (file)
@@ -65,6 +65,7 @@ class XMPTest extends MediaWikiTestCase {
                        include( $xmpPath . $file[0] . '.result.php' );
                        $data[] = array( $xmp, $result, '[' . $file[0] . '.xmp] ' . $file[1] );
                }
+
                return $data;
        }
 
@@ -157,5 +158,4 @@ class XMPTest extends MediaWikiTestCase {
 
                $this->assertEquals( $expected, $actual );
        }
-
 }
index a2b4e1c..257c40a 100644 (file)
@@ -41,7 +41,5 @@ class XMPValidateTest extends MediaWikiTestCase {
                        array( '2001-05-12T15', null ),
                        array( '2001-12T15:13', null ),
                );
-
        }
-
 }
index 88b07f0..be603e5 100644 (file)
@@ -15,7 +15,6 @@ class BagOStuffTest extends MediaWikiTestCase {
                        $name = $this->getCliArg( 'use-bagostuff=' );
 
                        $this->cache = ObjectCache::newFromId( $name );
-
                } else {
                        // no type defined - use simple hash
                        $this->cache = new HashBagOStuff;
index abc2f61..3939c4f 100644 (file)
@@ -41,6 +41,7 @@ EOT;
                        $parserTester = new $parserTestClassName( $testsName );
                        $suite->addTestSuite( new ReflectionClass ( $parserTester ) );
                }
+
                return $suite;
        }
 }
index 77311b9..934f181 100644 (file)
@@ -86,7 +86,6 @@ class NewParserTest extends MediaWikiTestCase {
                        $tmpGlobals['wgStyleDirectory'] = "$IP/skins";
                }
 
-
                foreach ( $tmpGlobals as $var => $val ) {
                        if ( array_key_exists( $var, $GLOBALS ) ) {
                                $this->savedInitialGlobals[$var] = $GLOBALS[$var];
@@ -432,6 +431,7 @@ class NewParserTest extends MediaWikiTestCase {
                // wfDebug( "Creating upload directory $dir\n" );
                if ( file_exists( $dir ) ) {
                        wfDebug( "Already exists!\n" );
+
                        return $dir;
                }
 
@@ -543,6 +543,7 @@ class NewParserTest extends MediaWikiTestCase {
                        global $wgParserTestFiles;
                        $this->file = $wgParserTestFiles[0];
                }
+
                return new TestFileIterator( $this->file, $this );
        }
 
@@ -717,7 +718,6 @@ class NewParserTest extends MediaWikiTestCase {
                        }
 
                        $id++;
-
                }
        }
 
@@ -911,6 +911,7 @@ class NewParserTest extends MediaWikiTestCase {
                                }
                        }
                }
+
                return $opts;
        }
 
@@ -922,6 +923,7 @@ class NewParserTest extends MediaWikiTestCase {
                if ( substr( $opt, 0, 2 ) == '[[' ) {
                        return substr( $opt, 2, -2 );
                }
+
                return $opt;
        }
 
index 50fe0e4..cacbb85 100644 (file)
@@ -44,6 +44,5 @@ class ParserMethodsTest extends MediaWikiLangTestCase {
                        'text' => '<pre style="margin-left: 1.6em">foo</pre>',
                ), $ret, 'callParserFunction works for {{#tag:pre|foo|style=margin-left: 1.6em}}' );
        }
-
        // TODO: Add tests for cleanSig() / cleanSigInSig(), getSection(), replaceSection(), getPreloadText()
 }
index e16b407..c609164 100644 (file)
@@ -68,5 +68,4 @@ class ParserPreloadTest extends MediaWikiTestCase {
                        $msg
                );
        }
-
 }
index 6abca6d..47c47f6 100644 (file)
@@ -87,6 +87,7 @@ class SearchEngineTest extends MediaWikiLangTestCase {
                # sort them numerically so we will compare simply that we received
                # the expected matches.
                sort( $matches );
+
                return $matches;
        }
 
@@ -172,5 +173,4 @@ class SearchEngineTest extends MediaWikiLangTestCase {
                        $this->fetchIds( $this->search->searchTitle( 'smithee' ) ),
                        "Title power search failed" );
        }
-
 }
index 7d867bc..d19cdd0 100644 (file)
@@ -28,6 +28,7 @@ class SearchUpdateTest extends MediaWikiTestCase {
        function update( $text, $title = 'Test', $id = 1 ) {
                $u = new SearchUpdate( $id, $title, $text );
                $u->doUpdate();
+
                return array( MockSearch::$title, MockSearch::$text );
        }
 
index b86636f..e0092a5 100644 (file)
@@ -85,5 +85,4 @@ class MediaWikiSiteTest extends SiteTest {
                $this->assertContains( $path, $site->getPageUrl() );
                $this->assertContains( $expected, $site->getPageUrl( $page ) );
        }
-
 }
index c329839..bd2ae07 100644 (file)
@@ -186,5 +186,4 @@ class SiteListTest extends MediaWikiTestCase {
                        $this->assertTrue( $copy->hasInternalId( $site->getInternalId() ) );
                }
        }
-
 }
index cf4ce94..cf652e9 100644 (file)
@@ -119,5 +119,4 @@ class SiteSQLStoreTest extends MediaWikiTestCase {
                $sites = $store->getSites();
                $this->assertEquals( 0, $sites->count() );
        }
-
 }
index 8033784..b453e74 100644 (file)
@@ -263,5 +263,4 @@ class SiteTest extends MediaWikiTestCase {
 
                $this->assertEquals( $serialization, serialize( $newInstance ) );
        }
-
 }
index a5656a7..f224b7d 100644 (file)
@@ -97,5 +97,4 @@ class TestSites {
                $sitesTable->clear();
                $sitesTable->saveSites( TestSites::getSites() );
        }
-
 }
index add830b..436eb2e 100644 (file)
@@ -42,7 +42,6 @@ class SpecialRecentchangesTest extends MediaWikiTestCase {
        /** return false if condition begin with 'rc_timestamp ' */
        private static function filterOutRcTimestampCondition( $var ) {
                return ( false === strpos( $var, 'rc_timestamp ' ) );
-
        }
 
        public function testRcNsFilter() {
@@ -123,5 +122,4 @@ class SpecialRecentchangesTest extends MediaWikiTestCase {
                        array( NS_TALK, NS_MAIN ),
                );
        }
-
 }
index 15a11ed..c737f05 100644 (file)
@@ -53,7 +53,6 @@ class SpecialSearchTest extends MediaWikiTestCase {
                        )
                        , $message
                );
-
        }
 
        public static function provideSearchOptionsTests() {
@@ -105,6 +104,7 @@ class SpecialSearchTest extends MediaWikiTestCase {
                foreach ( $opt as $name => $value ) {
                        $u->setOption( $name, $value );
                }
+
                return $u;
        }
 
@@ -135,6 +135,5 @@ class SpecialSearchTest extends MediaWikiTestCase {
                        $pageTitle,
                        "Search term '{$term}' should not be expanded in Special:Search <title>"
                );
-
        }
 }
index ac93aa7..a75fba6 100644 (file)
@@ -6,7 +6,6 @@
  * @group Database
  */
 class UploadFromUrlTest extends ApiTestCase {
-
        protected function setUp() {
                parent::setUp();
 
@@ -31,6 +30,7 @@ class UploadFromUrlTest extends ApiTestCase {
                $module->execute();
 
                wfSetupSession( $sessionId );
+
                return array( $module->getResultData(), $req );
        }
 
@@ -175,7 +175,6 @@ class UploadFromUrlTest extends ApiTestCase {
 
                $this->user->addGroup( 'users' );
 
-
                $data = $this->doAsyncUpload( $token );
 
                $this->assertEquals( $data[0]['upload']['result'], 'Warning' );
@@ -236,7 +235,7 @@ class UploadFromUrlTest extends ApiTestCase {
 
                $this->assertFalse( (bool)$talk->getArticleID( Title::GAID_FOR_UPDATE ), 'User talk does not exist' );
 
-               $data = $this->doApiRequest( array(
+               $this->doApiRequest( array(
                        'action' => 'upload',
                        'filename' => 'UploadFromUrlTest.png',
                        'url' => 'http://bits.wikimedia.org/skins-1.5/common/images/poweredby_mediawiki_88x31.png',
@@ -260,7 +259,7 @@ class UploadFromUrlTest extends ApiTestCase {
 
                $exception = false;
                try {
-                       $data = $this->doApiRequest( array(
+                       $this->doApiRequest( array(
                                'action' => 'upload',
                                'filename' => 'UploadFromUrlTest.png',
                                'url' => 'http://bits.wikimedia.org/skins-1.5/common/images/poweredby_mediawiki_88x31.png',
@@ -278,7 +277,6 @@ class UploadFromUrlTest extends ApiTestCase {
                $this->assertFalse( $job );
 
                return;
-
                /*
                // Broken until using leavemessage with ignorewarnings is supported
                $job->run();
@@ -331,7 +329,6 @@ class UploadFromUrlTest extends ApiTestCase {
                return $data;
        }
 
-
        /**
         *
         */
index b809d32..94c78dc 100644 (file)
@@ -130,15 +130,15 @@ class UploadTest extends MediaWikiTestCase {
 }
 
 class UploadTestHandler extends UploadBase {
-       public function initializeFromRequest( &$request ) {}
+       public function initializeFromRequest( &$request ) {
+       }
 
        public function testTitleValidation( $name ) {
                $this->mTitle = false;
                $this->mDesiredDestName = $name;
                $this->mTitleError = UploadBase::OK;
                $this->getTitle();
+
                return $this->mTitleError;
        }
-
-
 }
index 6659dad..4274335 100644 (file)
@@ -96,5 +96,4 @@ abstract class LanguageClassesTestCase extends MediaWikiTestCase {
                unset( $this->languageObject );
                parent::tearDown();
        }
-
 }
index d5dbfb2..80f76a5 100644 (file)
@@ -202,7 +202,6 @@ class LanguageTest extends LanguageClassesTestCase {
                                'formatTimePeriod() rounding, recursion, (>48h)'
                        ),
                );
-
        }
 
        function testTruncate() {
index 464a310..6358ac0 100644 (file)
@@ -56,5 +56,4 @@ class LanguageTrTest extends LanguageClassesTestCase {
 
                );
        }
-
 }
index 73d5dcc..3bf7414 100644 (file)
@@ -89,7 +89,7 @@ class CLDRPluralRuleEvaluatorTest extends MediaWikiTestCase {
                        array( 'n', 'just n' ),
                        array( 'n is in 5', 'is in' ),
                );
+
                return $tests;
        }
-
 }
index f82898f..78a5153 100644 (file)
@@ -124,6 +124,7 @@ abstract class DumpTestCase extends MediaWikiLangTestCase {
                                return true;
                        }
                }
+
                return false;
        }
 
@@ -145,6 +146,7 @@ abstract class DumpTestCase extends MediaWikiLangTestCase {
                                return true;
                        }
                }
+
                return false;
        }
 
@@ -271,7 +273,6 @@ abstract class DumpTestCase extends MediaWikiLangTestCase {
                $this->assertTextNode( "title", $name );
                $this->assertTextNode( "ns", $ns );
                $this->assertTextNode( "id", $id );
-
        }
 
        /**
@@ -299,8 +300,8 @@ abstract class DumpTestCase extends MediaWikiLangTestCase {
         * @param $parentid int|false: (optional) id of the parent revision
         */
        protected function assertRevision( $id, $summary, $text_id, $text_bytes, $text_sha1, $text = false, $parentid = false,
-                                                                          $model = CONTENT_MODEL_WIKITEXT, $format = CONTENT_FORMAT_WIKITEXT ) {
-
+               $model = CONTENT_MODEL_WIKITEXT, $format = CONTENT_FORMAT_WIKITEXT
+       ) {
                $this->assertNodeStart( "revision" );
                $this->skipWhitespace();
 
index 741f8b7..f4b61af 100644 (file)
@@ -128,7 +128,6 @@ class MaintenanceFixup extends Maintenance {
        public function execute() {
                $this->testCase->fail( __METHOD__ . " called unexpectedly" );
        }
-
 }
 
 class MaintenanceTest extends MediaWikiTestCase {
@@ -186,7 +185,6 @@ class MaintenanceTest extends MediaWikiTestCase {
        // test.*Intermittent.* tests), the objective of these tests is not to describe
        // consistent behavior, but rather currently existing behavior.
 
-
        function testOutputEmpty() {
                $this->m->output( "" );
                $this->assertOutputPrePostShutdown( "", false );
@@ -815,6 +813,4 @@ class MaintenanceTest extends MediaWikiTestCase {
                $m2->simulateShutdown();
                $this->assertOutputPrePostShutdown( "foobar\n\n", false );
        }
-
-
 }
index cc00e6e..bc2d737 100644 (file)
@@ -36,7 +36,6 @@ class BaseDumpTest extends MediaWikiTestCase {
        private function assertPrefetchEquals( $expected, $page, $revision ) {
                $this->assertEquals( $expected, $this->dump->prefetch( $page, $revision ),
                        "Prefetch of page $page revision $revision" );
-
        }
 
        function testSequential() {
@@ -181,7 +180,6 @@ class BaseDumpTest extends MediaWikiTestCase {
   </siteinfo>
 ';
 
-
                // An array holding the pages that are available for prefetch
                $available_pages = array();
 
@@ -274,5 +272,4 @@ class BaseDumpTest extends MediaWikiTestCase {
 
                return $fname;
        }
-
 }
index 0962344..7fe48dd 100644 (file)
@@ -80,7 +80,6 @@ class TextPassDumperTest extends DumpTestCase {
                        // DumpTestCase
                        $this->exceptionFromAddDBData = $e;
                }
-
        }
 
        protected function setUp() {
@@ -94,7 +93,6 @@ class TextPassDumperTest extends DumpTestCase {
                        array( $this->pageId2, $this->pageId3, $this->pageId4 ),
                        array( $this->pageId1 + 1, $this->pageId2 + 1, $this->pageId3 + 1 ),
                        "Page ids increasing without holes" );
-
        }
 
        function testPlain() {
@@ -214,7 +212,6 @@ class TextPassDumperTest extends DumpTestCase {
                $this->assertPageEnd();
 
                $this->assertDumpEnd();
-
        }
 
        /**
@@ -239,7 +236,6 @@ class TextPassDumperTest extends DumpTestCase {
                $minDuration = 2; // We want the dump to take at least this many seconds
                $checkpointAfter = 0.5; // Generate checkpoint after this many seconds
 
-
                // Until a dump takes at least $minDuration seconds, perform a dump and check
                // duration. If the dump did not take long enough increase the iteration
                // count, to generate a bigger stub file next time.
@@ -579,6 +575,7 @@ class TextPassDumperTest extends DumpTestCase {
                $content .= $tail;
                $this->assertEquals( strlen( $content ), file_put_contents(
                        $fname, $content ), "Length of prepared stub" );
+
                return $fname;
        }
 }
index 5cf172e..98d8165 100644 (file)
@@ -39,6 +39,7 @@ class BackupDumperLoggerTest extends DumpTestCase {
                if ( $parameters !== null ) {
                        $logEntry->setParameters( $parameters );
                }
+
                return $logEntry->insert();
        }
 
@@ -75,14 +76,12 @@ class BackupDumperLoggerTest extends DumpTestCase {
                                $user2, NS_MAIN, "PageA", "SomeOtherComment",
                                array( 'key1' => 1, 3 => 'value3' ) );
                        $this->assertGreaterThan( 0, $this->logId3 );
-
                } catch ( Exception $e ) {
                        // We'd love to pass $e directly. However, ... see
                        // documentation of exceptionFromAddDBData in
                        // DumpTestCase
                        $this->exceptionFromAddDBData = $e;
                }
-
        }
 
 
@@ -226,5 +225,4 @@ class BackupDumperLoggerTest extends DumpTestCase {
                // the following statement to catch good output
                $this->expectOutputString( '' );
        }
-
 }
index 07c7670..535e61e 100644 (file)
@@ -79,7 +79,6 @@ class BackupDumperPageTest extends DumpTestCase {
                        // DumpTestCase
                        $this->exceptionFromAddDBData = $e;
                }
-
        }
 
        protected function setUp() {
@@ -93,7 +92,6 @@ class BackupDumperPageTest extends DumpTestCase {
                        array( $this->pageId2, $this->pageId3, $this->pageId4 ),
                        array( $this->pageId1 + 1, $this->pageId2 + 1, $this->pageId3 + 1 ),
                        "Page ids increasing without holes" );
-
        }
 
        function testFullTextPlain() {
@@ -403,6 +401,4 @@ class BackupDumperPageTest extends DumpTestCase {
 
                $this->expectETAOutput();
        }
-
-
 }
index 4d1d45d..e8df199 100644 (file)
@@ -63,7 +63,6 @@ class SemiMockedFetchText extends FetchText {
 
                return fopen( 'data://text/plain,' . $this->mockStdinText, 'r' );
        }
-
 }
 
 /**
@@ -236,5 +235,4 @@ class FetchTextTest extends MediaWikiTestCase {
                                $this->textId3 . "\n23\nFetchTextTestPage2Text2"
                        ) ) );
        }
-
 }
index 699571b..2c84886 100644 (file)
@@ -64,6 +64,4 @@ class GetSlaveServerTest extends MediaWikiTestCase {
                $this->expectOutputRegex( "/^[[:space:]]*\[wgDBprefix\][[:space:]]*=> "
                        . $wgDBprefix . "$/m" );
        }
-
-
 }
index 2a1ebc3..b425d86 100755 (executable)
@@ -89,7 +89,6 @@ class PHPUnitMaintClass extends Maintenance {
                        unset( $_SERVER['argv'][$key] ); // the option
                        unset( $_SERVER['argv'][$key + 1] ); // its value
                        $_SERVER['argv'] = array_values( $_SERVER['argv'] );
-
                }
        }
 
index 71b8c67..3af805a 100644 (file)
@@ -91,7 +91,7 @@ class ResourcesTest extends MediaWikiTestCase {
                                $property = $reflectedModule->getProperty( $propName );
                                $property->setAccessible( true );
                                $lists = $property->getValue( $module );
-                               foreach ( $lists as $group => $list ) {
+                               foreach ( $lists as $list ) {
                                        foreach ( $list as $key => $value ) {
                                                // We need the same filter as for 'lists',
                                                // due to 'skinStyles'.
@@ -116,7 +116,6 @@ class ResourcesTest extends MediaWikiTestCase {
                                        $file,
                                );
                        }
-
                }
 
                // Restore settings
@@ -124,5 +123,4 @@ class ResourcesTest extends MediaWikiTestCase {
 
                return $cases;
        }
-
 }
index 876876b..850d39c 100644 (file)
@@ -100,7 +100,6 @@ class SideBarTest extends MediaWikiLangTestCase {
 ** http://valid.no.desc.org/
 '
                );
-
        }
 
        /**
index 3200e0b..b1496a9 100644 (file)
@@ -57,7 +57,6 @@ class UploadFromUrlTestSuite extends PHPUnit_Framework_TestSuite {
                $wgNamespaceAliases['Image'] = NS_FILE;
                $wgNamespaceAliases['Image_talk'] = NS_FILE_TALK;
 
-
                $wgEnableParserCache = false;
                DeferredUpdates::clearPendingUpdates();
                $wgMemc = wfGetMainCache();
@@ -185,6 +184,7 @@ class UploadFromUrlTestSuite extends PHPUnit_Framework_TestSuite {
 
                if ( file_exists( $dir ) ) {
                        wfDebug( "Already exists!\n" );
+
                        return $dir;
                }
 
@@ -202,6 +202,7 @@ class UploadFromUrlTestSuite extends PHPUnit_Framework_TestSuite {
                // the UploadFromUrlTest class
                class_exists( 'UploadFromUrlTest' );
                $suite = new UploadFromUrlTestSuite( 'UploadFromUrlTest' );
+
                return $suite;
        }
 }
index 2803ff2..1237bb5 100644 (file)
@@ -105,8 +105,6 @@ class AddContentToNewPageTestCase extends SeleniumTestCase {
 
        // Add level 2 headline and verify output in the preview
        public function testAddLevel2HeadLine() {
-               $blnElementPresent = false;
-               $blnTextPresent = false;
                $this->getExistingPage();
                $this->clickEditLink();
                $this->loadWikiEditor();
index 02fcf24..88e5885 100644 (file)
  * @ingroup Testing
  */
 
-class TestRecorder {
+/**
+ * Interface to record parser test results.
+ *
+ * The ITestRecorder is a very simple interface to record the result of
+ * MediaWiki parser tests. One should call start() before running the
+ * full parser tests and end() once all the tests have been finished.
+ * After each test, you should use record() to keep track of your tests
+ * results. Finally, report() is used to generate a summary of your
+ * test run, one could dump it to the console for human consumption or
+ * register the result in a database for tracking purposes.
+ *
+ * @since 1.22
+ */
+interface ITestRecorder {
+
+       /** Called at beginning of the parser test run */
+       public function start();
+
+       /** Called after each test */
+       public function record( $test, $result );
+
+       /** Called before finishing the test run */
+       public function report();
+
+       /** Called at the end of the parser test run */
+       public function end();
+
+}
+
+class TestRecorder implements ITestRecorder {
        var $parent;
        var $term;
 
@@ -481,7 +510,7 @@ class TestFileIterator implements Iterator {
                                        return true;
                                }
 
-                               if ( isset ( $this->sectionData[$this->section] ) ) {
+                               if ( isset( $this->sectionData[$this->section] ) ) {
                                        throw new MWException( "duplicate section '$this->section' at line {$this->lineNum} of $this->file\n" );
                                }