Merge "Fixed spacing"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Sun, 20 Jul 2014 20:03:01 +0000 (20:03 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Sun, 20 Jul 2014 20:03:01 +0000 (20:03 +0000)
44 files changed:
img_auth.php
includes/Block.php
includes/CategoryViewer.php
includes/EditPage.php
includes/HtmlFormatter.php
includes/Linker.php
includes/Title.php
includes/User.php
includes/UserMailer.php
includes/api/ApiExpandTemplates.php
includes/api/ApiQuerySiteinfo.php
includes/config/ConfigException.php
includes/filebackend/FSFileBackend.php
includes/filebackend/FileBackendStore.php
includes/jobqueue/Job.php
includes/media/DjVu.php
includes/page/WikiPage.php
includes/site/MediaWikiSite.php
includes/specials/SpecialWantedfiles.php
languages/messages/MessagesCrh_cyrl.php
languages/messages/MessagesCrh_latn.php
languages/messages/MessagesDsb.php
languages/messages/MessagesEn.php
languages/messages/MessagesFa.php
languages/messages/MessagesFrp.php
languages/messages/MessagesHsb.php
languages/messages/MessagesKsh.php
languages/messages/MessagesLzh.php
languages/messages/MessagesNds_nl.php
languages/messages/MessagesSr_ec.php
languages/messages/MessagesTt_cyrl.php
languages/messages/MessagesTt_latn.php
tests/phpunit/includes/ArrayUtilsTest.php
tests/phpunit/includes/HtmlFormatterTest.php
tests/phpunit/includes/ImportTest.php
tests/phpunit/includes/StatusTest.php
tests/phpunit/includes/WebRequestTest.php
tests/phpunit/includes/actions/ActionTest.php
tests/phpunit/includes/config/ConfigFactoryTest.php
tests/phpunit/includes/diff/ArrayDiffFormatterTest.php
tests/phpunit/includes/title/MediaWikiPageLinkRendererTest.php
tests/phpunit/includes/title/MediaWikiTitleCodecTest.php
tests/phpunit/phpunit.php
thumb.php

index 6f449c6..55f17ac 100644 (file)
@@ -114,7 +114,7 @@ function wfImageAuthMain() {
        // be under a folder that has the source file name.
        if ( $zone === 'thumb' || $zone === 'transcoded' ) {
                $name = wfBaseName( dirname( $path ) );
-               $filename = $repo->getZonePath( $zone ) . substr( $path, strlen( "/".$zone ) );
+               $filename = $repo->getZonePath( $zone ) . substr( $path, strlen( "/" . $zone ) );
                // Check to see if the file exists
                if ( !$repo->fileExists( $filename ) ) {
                        wfForbidden( 'img-auth-accessdenied', 'img-auth-nofile', $filename );
index 1a585b9..aaabec9 100644 (file)
@@ -967,7 +967,7 @@ class Block {
 
                $method = __METHOD__;
                $dbw = wfGetDB( DB_MASTER );
-               $dbw->onTransactionIdle( function() use ( $dbw, $method ) {
+               $dbw->onTransactionIdle( function () use ( $dbw, $method ) {
                        $dbw->delete( 'ipblocks',
                                array( 'ipb_expiry < ' . $dbw->addQuotes( $dbw->timestamp() ) ), $method );
                } );
@@ -1123,7 +1123,7 @@ class Block {
 
                // Sort hard blocks before soft ones and secondarily sort blocks
                // that disable account creation before those that don't.
-               usort( $blocks, function( Block $a, Block $b ) {
+               usort( $blocks, function ( Block $a, Block $b ) {
                        $aWeight = (int)$a->isHardblock() . (int)$a->prevents( 'createaccount' );
                        $bWeight = (int)$b->isHardblock() . (int)$b->prevents( 'createaccount' );
                        return strcmp( $bWeight, $aWeight ); // highest weight first
index cd9eaa9..d6755c2 100644 (file)
@@ -708,7 +708,7 @@ class CategoryViewer extends ContextSource {
                        // quick due to the small number of entries.
                        $totalcnt = $rescnt;
                        $category = $this->cat;
-                       wfGetDB( DB_MASTER )->onTransactionIdle( function() use ( $category ) {
+                       wfGetDB( DB_MASTER )->onTransactionIdle( function () use ( $category ) {
                                $category->refreshCounts();
                        } );
                } else {
index 88c49a7..a8a6811 100644 (file)
@@ -2017,7 +2017,7 @@ class EditPage {
 
                        // Do this in its own transaction to reduce contention...
                        $dbw = wfGetDB( DB_MASTER );
-                       $dbw->onTransactionIdle( function() use ( $dbw, $title, $watch, $wgUser, $fname ) {
+                       $dbw->onTransactionIdle( function () use ( $dbw, $title, $watch, $wgUser, $fname ) {
                                $dbw->begin( $fname );
                                WatchAction::doWatchOrUnwatch( $watch, $title, $wgUser );
                                $dbw->commit( $fname );
index 38aa392..ebced70 100644 (file)
@@ -138,7 +138,7 @@ class HtmlFormatter {
 
                // Bail out early if nothing to do
                if ( array_reduce( $removals,
-                       function( $carry, $item ) {
+                       function ( $carry, $item ) {
                                return $carry && !$item;
                        },
                        true
index 7d88f25..1991694 100644 (file)
@@ -1379,7 +1379,7 @@ class Linker {
                                                . '<span dir="auto">' . $auto . $post . '</span>';
                                }
                                return $comment;
-               },
+                       },
                        $comment
                );
        }
@@ -1418,7 +1418,11 @@ class Linker {
 
                                # fix up urlencoded title texts (copied from Parser::replaceInternalLinks)
                                if ( strpos( $match[1], '%' ) !== false ) {
-                                       $match[1] = str_replace( array( '<', '>' ), array( '&lt;', '&gt;' ), rawurldecode( $match[1] ) );
+                                       $match[1] = str_replace(
+                                               array( '<', '>' ),
+                                               array( '&lt;', '&gt;' ),
+                                               rawurldecode( $match[1] )
+                                       );
                                }
 
                                # Handle link renaming [[foo|text]] will show link as "text"
index b66e3e4..8466581 100644 (file)
@@ -2983,7 +2983,7 @@ class Title {
 
                $method = __METHOD__;
                $dbw = wfGetDB( DB_MASTER );
-               $dbw->onTransactionIdle( function() use ( $dbw, $method ) {
+               $dbw->onTransactionIdle( function () use ( $dbw, $method ) {
                        $dbw->delete(
                                'page_restrictions',
                                array( 'pr_expiry < ' . $dbw->addQuotes( $dbw->timestamp() ) ),
@@ -4667,7 +4667,7 @@ class Title {
                $method = __METHOD__;
                $dbw = wfGetDB( DB_MASTER );
                $conds = $this->pageCond();
-               $dbw->onTransactionIdle( function() use ( $dbw, $conds, $method ) {
+               $dbw->onTransactionIdle( function () use ( $dbw, $conds, $method ) {
                        $dbw->update(
                                'page',
                                array( 'page_touched' => $dbw->timestamp() ),
index 7a642c6..ce3ea74 100644 (file)
@@ -2176,7 +2176,7 @@ class User implements IDBAccessObject {
                        $userid = $this->mId;
                        $touched = $this->mTouched;
                        $method = __METHOD__;
-                       $dbw->onTransactionIdle( function() use ( $dbw, $userid, $touched, $method ) {
+                       $dbw->onTransactionIdle( function () use ( $dbw, $userid, $touched, $method ) {
                                // Prevent contention slams by checking user_touched first
                                $encTouched = $dbw->addQuotes( $dbw->timestamp( $touched ) );
                                $needsPurge = $dbw->selectField( 'user', '1',
index c9db90f..2fe9213 100644 (file)
@@ -553,7 +553,7 @@ class EmailNotification {
                                // Update wl_notificationtimestamp for all watching users except the editor
                                $fname = __METHOD__;
                                $dbw->onTransactionIdle(
-                                       function() use ( $dbw, $timestamp, $watchers, $title, $fname ) {
+                                       function () use ( $dbw, $timestamp, $watchers, $title, $fname ) {
                                                $dbw->update( 'watchlist',
                                                        array( /* SET */
                                                                'wl_notificationtimestamp' => $dbw->timestamp( $timestamp )
index 82d303f..b3a9d83 100644 (file)
@@ -42,8 +42,10 @@ class ApiExpandTemplates extends ApiBase {
                $this->requireMaxOneParameter( $params, 'prop', 'generatexml' );
 
                if ( $params['prop'] === null ) {
-                       $this->setWarning( 'Because no values have been specified for the prop parameter, a legacy format has been used for the output.'
-                                . ' This format is deprecated, and in the future, a default value will be set for the prop parameter, causing the new format to always be used.' );
+                       $this->setWarning( 'Because no values have been specified for the prop parameter, a ' .
+                               'legacy format has been used for the output. This format is deprecated, and in ' .
+                               'the future, a default value will be set for the prop parameter, causing the new' .
+                               'format to always be used.' );
                        $prop = array();
                } else {
                        $prop = array_flip( $params['prop'] );
@@ -159,9 +161,12 @@ class ApiExpandTemplates extends ApiBase {
                        'prop' => array(
                                'Which pieces of information to get',
                                ' wikitext   - The expanded wikitext',
-                               ' categories - Any categories present in the input that are not represented in the wikitext output',
-                               ' volatile   - Whether the output is volatile and should not be reused elsewhere within the page',
-                               ' ttl        - The maximum time after which caches of the result should be invalidated',
+                               ' categories - Any categories present in the input that are not represented in ' .
+                                       'the wikitext output',
+                               ' volatile   - Whether the output is volatile and should not be reused ' .
+                                       'elsewhere within the page',
+                               ' ttl        - The maximum time after which caches of the result should be ' .
+                                       'invalidated',
                                ' parsetree  - The XML parse tree of the input',
                                'Note that if no values are selected, the result will contain the wikitext,',
                                'but the output will be in a deprecated format.',
index ab737d1..30201fc 100644 (file)
@@ -262,8 +262,8 @@ class ApiQuerySiteinfo extends ApiQueryBase {
                        $data['imagelimits'][$k] = array( 'width' => $limit[0], 'height' => $limit[1] );
                }
 
-                $favicon = $config->get( 'Favicon' );
-                if ( !empty( $favicon ) ) {
+               $favicon = $config->get( 'Favicon' );
+               if ( !empty( $favicon ) ) {
                        // wgFavicon can either be a relative or an absolute path
                        // make sure we always return an absolute path
                        $data['favicon'] = wfExpandUrl( $favicon, PROTO_RELATIVE );
@@ -314,7 +314,8 @@ class ApiQuerySiteinfo extends ApiQueryBase {
 
        protected function appendNamespaceAliases( $property ) {
                global $wgContLang;
-               $aliases = array_merge( $this->getConfig()->get( 'NamespaceAliases' ), $wgContLang->getNamespaceAliases() );
+               $aliases = array_merge( $this->getConfig()->get( 'NamespaceAliases' ),
+                       $wgContLang->getNamespaceAliases() );
                $namespaces = $wgContLang->getNamespaces();
                $data = array();
                foreach ( $aliases as $title => $ns ) {
index 368ca5a..75cd5ee 100644 (file)
@@ -25,4 +25,5 @@
  *
  * @since 1.23
  */
-class ConfigException extends MWException {}
+class ConfigException extends MWException {
+}
index e7c1f6f..2b0c3c2 100644 (file)
@@ -213,7 +213,7 @@ class FSFileBackend extends FileBackendStore {
                                wfEscapeShellArg( $this->cleanPathSlashes( $tempFile->getPath() ) ),
                                wfEscapeShellArg( $this->cleanPathSlashes( $dest ) )
                        ) );
-                       $handler = function( $errors, Status $status, array $params, $cmd ) {
+                       $handler = function ( $errors, Status $status, array $params, $cmd ) {
                                if ( $errors !== '' && !( wfIsWindows() && $errors[0] === " " ) ) {
                                        $status->fatal( 'backend-fail-create', $params['dst'] );
                                        trigger_error( "$cmd\n$errors", E_USER_WARNING ); // command output
@@ -252,7 +252,7 @@ class FSFileBackend extends FileBackendStore {
                                wfEscapeShellArg( $this->cleanPathSlashes( $params['src'] ) ),
                                wfEscapeShellArg( $this->cleanPathSlashes( $dest ) )
                        ) );
-                       $handler = function( $errors, Status $status, array $params, $cmd ) {
+                       $handler = function ( $errors, Status $status, array $params, $cmd ) {
                                if ( $errors !== '' && !( wfIsWindows() && $errors[0] === " " ) ) {
                                        $status->fatal( 'backend-fail-store', $params['src'], $params['dst'] );
                                        trigger_error( "$cmd\n$errors", E_USER_WARNING ); // command output
@@ -310,7 +310,7 @@ class FSFileBackend extends FileBackendStore {
                                wfEscapeShellArg( $this->cleanPathSlashes( $source ) ),
                                wfEscapeShellArg( $this->cleanPathSlashes( $dest ) )
                        ) );
-                       $handler = function( $errors, Status $status, array $params, $cmd ) {
+                       $handler = function ( $errors, Status $status, array $params, $cmd ) {
                                if ( $errors !== '' && !( wfIsWindows() && $errors[0] === " " ) ) {
                                        $status->fatal( 'backend-fail-copy', $params['src'], $params['dst'] );
                                        trigger_error( "$cmd\n$errors", E_USER_WARNING ); // command output
@@ -370,7 +370,7 @@ class FSFileBackend extends FileBackendStore {
                                wfEscapeShellArg( $this->cleanPathSlashes( $source ) ),
                                wfEscapeShellArg( $this->cleanPathSlashes( $dest ) )
                        ) );
-                       $handler = function( $errors, Status $status, array $params, $cmd ) {
+                       $handler = function ( $errors, Status $status, array $params, $cmd ) {
                                if ( $errors !== '' && !( wfIsWindows() && $errors[0] === " " ) ) {
                                        $status->fatal( 'backend-fail-move', $params['src'], $params['dst'] );
                                        trigger_error( "$cmd\n$errors", E_USER_WARNING ); // command output
@@ -415,7 +415,7 @@ class FSFileBackend extends FileBackendStore {
                                wfIsWindows() ? 'DEL' : 'unlink',
                                wfEscapeShellArg( $this->cleanPathSlashes( $source ) )
                        ) );
-                       $handler = function( $errors, Status $status, array $params, $cmd ) {
+                       $handler = function ( $errors, Status $status, array $params, $cmd ) {
                                if ( $errors !== '' && !( wfIsWindows() && $errors[0] === " " ) ) {
                                        $status->fatal( 'backend-fail-delete', $params['src'] );
                                        trigger_error( "$cmd\n$errors", E_USER_WARNING ); // command output
index ee9a49d..a1ff1f4 100644 (file)
@@ -1696,7 +1696,7 @@ abstract class FileBackendStore extends FileBackend {
                if ( !$this->memCache->add( $key, $val, $ttl ) && !empty( $val['latest'] ) ) {
                        $this->memCache->merge(
                                $key,
-                               function( BagOStuff $cache, $key, $cValue ) use ( $val ) {
+                               function ( BagOStuff $cache, $key, $cValue ) use ( $val ) {
                                        return ( is_array( $cValue ) && empty( $cValue['latest'] ) )
                                                ? $val // update the stat cache with the lastest info
                                                : false; // do nothing (cache is salted or some error happened)
index 35b4f13..c11df93 100644 (file)
@@ -291,7 +291,7 @@ abstract class Job implements IJobSpecification {
         * @return string
         */
        public function toString() {
-               $truncFunc = function( $value ) {
+               $truncFunc = function ( $value ) {
                        $value = (string)$value;
                        if ( mb_strlen( $value ) > 1024 ) {
                                $value = "string(" . mb_strlen( $value ) . ")";
index 200d526..299252b 100644 (file)
@@ -188,7 +188,7 @@ class DjVuHandler extends ImageHandler {
                if ( $image->getSize() >= 1e7 ) { // 10MB
                        $work = new PoolCounterWorkViaCallback( 'GetLocalFileCopy', sha1( $image->getName() ),
                                array(
-                                       'doWork' => function() use ( $image ) {
+                                       'doWork' => function () use ( $image ) {
                                                return $image->getLocalRefPath();
                                        }
                                )
index 31f0ed0..fc269d8 100644 (file)
@@ -2047,7 +2047,7 @@ class WikiPage implements Page, IDBAccessObject {
                wfRunHooks( 'PageContentSaveComplete', $hook_args );
 
                // Promote user to any groups they meet the criteria for
-               $dbw->onTransactionIdle( function() use ( $user ) {
+               $dbw->onTransactionIdle( function () use ( $user ) {
                        $user->addAutopromoteOnceGroups( 'onEdit' );
                } );
 
@@ -2887,7 +2887,7 @@ class WikiPage implements Page, IDBAccessObject {
                $logEntry->setComment( $reason );
                $logid = $logEntry->insert();
 
-               $dbw->onTransactionPreCommitOrIdle( function() use ( $dbw, $logEntry, $logid ) {
+               $dbw->onTransactionPreCommitOrIdle( function () use ( $dbw, $logEntry, $logid ) {
                        // Bug 56776: avoid deadlocks (especially from FileDeleteForm)
                        $logEntry->publish( $logid );
                } );
@@ -3347,7 +3347,7 @@ class WikiPage implements Page, IDBAccessObject {
 
                // Do this at the end of the commit to reduce lock wait timeouts
                $dbw->onTransactionPreCommitOrIdle(
-                       function() use ( $dbw, $that, $method, $added, $deleted ) {
+                       function () use ( $dbw, $that, $method, $added, $deleted ) {
                                $ns = $that->getTitle()->getNamespace();
 
                                $addFields = array( 'cat_pages = cat_pages + 1' );
index 4854bcb..9711f04 100644 (file)
@@ -215,7 +215,7 @@ class MediaWikiSite extends Site {
                        // Filter the substructure down to what we actually are using.
                        $collectedHits = array_filter(
                                array_values( $externalData['query'][$listId] ),
-                               function( $a ) use ( $fieldId, $pageTitle ) {
+                               function ( $a ) use ( $fieldId, $pageTitle ) {
                                        return $a[$fieldId] === $pageTitle;
                                }
                        );
index ea526de..8269b01 100644 (file)
@@ -111,7 +111,7 @@ class WantedFilesPage extends WantedQueryPage {
                                'img1.img_name' => null,
                                // We also need to exclude file redirects
                                'img2.img_name' => null,
-                        ),
+                       ),
                        'options' => array( 'GROUP BY' => 'il_to' ),
                        'join_conds' => array(
                                'img1' => array( 'LEFT JOIN',
index 3729a78..1618bdb 100644 (file)
@@ -57,43 +57,43 @@ $namespaceAliases = array(
 $namespaceGenderAliases = array();
 
 $datePreferences = array(
-    'default',
-    'mdy',
-    'dmy',
-    'ymd',
-    'yyyy-mm-dd',
-    'ISO 8601',
+       'default',
+       'mdy',
+       'dmy',
+       'ymd',
+       'yyyy-mm-dd',
+       'ISO 8601',
 );
 
 $defaultDateFormat = 'ymd';
 
 $datePreferenceMigrationMap = array(
-    'default',
-    'mdy',
-    'dmy',
-    'ymd'
+       'default',
+       'mdy',
+       'dmy',
+       'ymd'
 );
 
 $dateFormats = array(
-    'mdy time' => 'H:i',
-    'mdy date' => 'F j Y "с."',
-    'mdy both' => 'H:i, F j Y "с."',
+       'mdy time' => 'H:i',
+       'mdy date' => 'F j Y "с."',
+       'mdy both' => 'H:i, F j Y "с."',
 
-    'dmy time' => 'H:i',
-    'dmy date' => 'j F Y "с."',
-    'dmy both' => 'H:i, j F Y "с."',
+       'dmy time' => 'H:i',
+       'dmy date' => 'j F Y "с."',
+       'dmy both' => 'H:i, j F Y "с."',
 
-    'ymd time' => 'H:i',
-    'ymd date' => 'Y "с." xg j',
-    'ymd both' => 'H:i, Y "с." xg j',
+       'ymd time' => 'H:i',
+       'ymd date' => 'Y "с." xg j',
+       'ymd both' => 'H:i, Y "с." xg j',
 
-    'yyyy-mm-dd time' => 'xnH:xni:xns',
-    'yyyy-mm-dd date' => 'xnY-xnm-xnd',
-    'yyyy-mm-dd both' => 'xnH:xni:xns, xnY-xnm-xnd',
+       'yyyy-mm-dd time' => 'xnH:xni:xns',
+       'yyyy-mm-dd date' => 'xnY-xnm-xnd',
+       'yyyy-mm-dd both' => 'xnH:xni:xns, xnY-xnm-xnd',
 
-    'ISO 8601 time' => 'xnH:xni:xns',
-    'ISO 8601 date' => 'xnY.xnm.xnd',
-    'ISO 8601 both' => 'xnY.xnm.xnd"T"xnH:xni:xns',
+       'ISO 8601 time' => 'xnH:xni:xns',
+       'ISO 8601 date' => 'xnY.xnm.xnd',
+       'ISO 8601 both' => 'xnY.xnm.xnd"T"xnH:xni:xns',
 );
 
 $separatorTransformTable = array( ','  => '.', '.' => ',' );
index 7fb5df0..6b852b7 100644 (file)
@@ -52,43 +52,43 @@ $namespaceAliases = array(
 );
 
 $datePreferences = array(
-    'default',
-    'mdy',
-    'dmy',
-    'ymd',
-    'yyyy-mm-dd',
-    'ISO 8601',
+       'default',
+       'mdy',
+       'dmy',
+       'ymd',
+       'yyyy-mm-dd',
+       'ISO 8601',
 );
 
 $defaultDateFormat = 'ymd';
 
 $datePreferenceMigrationMap = array(
-    'default',
-    'mdy',
-    'dmy',
-    'ymd'
+       'default',
+       'mdy',
+       'dmy',
+       'ymd'
 );
 
 $dateFormats = array(
-    'mdy time' => 'H:i',
-    'mdy date' => 'F j Y "s."',
-    'mdy both' => 'H:i, F j Y "s."',
+       'mdy time' => 'H:i',
+       'mdy date' => 'F j Y "s."',
+       'mdy both' => 'H:i, F j Y "s."',
 
-    'dmy time' => 'H:i',
-    'dmy date' => 'j F Y "s."',
-    'dmy both' => 'H:i, j F Y "s."',
+       'dmy time' => 'H:i',
+       'dmy date' => 'j F Y "s."',
+       'dmy both' => 'H:i, j F Y "s."',
 
-    'ymd time' => 'H:i',
-    'ymd date' => 'Y "s." xg j',
-    'ymd both' => 'H:i, Y "s." xg j',
+       'ymd time' => 'H:i',
+       'ymd date' => 'Y "s." xg j',
+       'ymd both' => 'H:i, Y "s." xg j',
 
-    'yyyy-mm-dd time' => 'xnH:xni:xns',
-    'yyyy-mm-dd date' => 'xnY-xnm-xnd',
-    'yyyy-mm-dd both' => 'xnH:xni:xns, xnY-xnm-xnd',
+       'yyyy-mm-dd time' => 'xnH:xni:xns',
+       'yyyy-mm-dd date' => 'xnY-xnm-xnd',
+       'yyyy-mm-dd both' => 'xnH:xni:xns, xnY-xnm-xnd',
 
-    'ISO 8601 time' => 'xnH:xni:xns',
-    'ISO 8601 date' => 'xnY.xnm.xnd',
-    'ISO 8601 both' => 'xnY.xnm.xnd"T"xnH:xni:xns',
+       'ISO 8601 time' => 'xnH:xni:xns',
+       'ISO 8601 date' => 'xnY.xnm.xnd',
+       'ISO 8601 both' => 'xnY.xnm.xnd"T"xnH:xni:xns',
 );
 
 $separatorTransformTable = array( ',' => '.', '.' => ',' );
index 4cffd2b..d6f268f 100644 (file)
@@ -35,8 +35,8 @@ $namespaceAliases = array(
 );
 
 $namespaceGenderAliases = array(
-        NS_USER => array( 'male' => 'Wužywaŕ', 'female' => 'Wužywarka' ),
-        NS_USER_TALK => array( 'male' => 'Diskusija_wužywarja', 'female' => 'Diskusija_wužywarki' ),
+       NS_USER => array( 'male' => 'Wužywaŕ', 'female' => 'Wužywarka' ),
+       NS_USER_TALK => array( 'male' => 'Diskusija_wužywarja', 'female' => 'Diskusija_wužywarki' ),
 );
 
 $specialPageAliases = array(
index 6a18ea1..0797bcf 100644 (file)
@@ -202,175 +202,175 @@ $bookstoreList = array(
  * This array can be modified at runtime with the LanguageGetMagic hook
  */
 $magicWords = array(
-#   ID                                  CASE  SYNONYMS
-       'redirect'                => array( 0,    '#REDIRECT' ),
-       'notoc'                   => array( 0,    '__NOTOC__' ),
-       'nogallery'               => array( 0,    '__NOGALLERY__' ),
-       'forcetoc'                => array( 0,    '__FORCETOC__' ),
-       'toc'                     => array( 0,    '__TOC__' ),
-       'noeditsection'           => array( 0,    '__NOEDITSECTION__' ),
-       '!'                       => array( 1,    '!' ),
-       'currentmonth'            => array( 1,    'CURRENTMONTH', 'CURRENTMONTH2' ),
-       'currentmonth1'           => array( 1,    'CURRENTMONTH1' ),
-       'currentmonthname'        => array( 1,    'CURRENTMONTHNAME' ),
-       'currentmonthnamegen'     => array( 1,    'CURRENTMONTHNAMEGEN' ),
-       'currentmonthabbrev'      => array( 1,    'CURRENTMONTHABBREV' ),
-       'currentday'              => array( 1,    'CURRENTDAY' ),
-       'currentday2'             => array( 1,    'CURRENTDAY2' ),
-       'currentdayname'          => array( 1,    'CURRENTDAYNAME' ),
-       'currentyear'             => array( 1,    'CURRENTYEAR' ),
-       'currenttime'             => array( 1,    'CURRENTTIME' ),
-       'currenthour'             => array( 1,    'CURRENTHOUR' ),
-       'localmonth'              => array( 1,    'LOCALMONTH', 'LOCALMONTH2' ),
-       'localmonth1'             => array( 1,    'LOCALMONTH1' ),
-       'localmonthname'          => array( 1,    'LOCALMONTHNAME' ),
-       'localmonthnamegen'       => array( 1,    'LOCALMONTHNAMEGEN' ),
-       'localmonthabbrev'        => array( 1,    'LOCALMONTHABBREV' ),
-       'localday'                => array( 1,    'LOCALDAY' ),
-       'localday2'               => array( 1,    'LOCALDAY2' ),
-       'localdayname'            => array( 1,    'LOCALDAYNAME' ),
-       'localyear'               => array( 1,    'LOCALYEAR' ),
-       'localtime'               => array( 1,    'LOCALTIME' ),
-       'localhour'               => array( 1,    'LOCALHOUR' ),
-       'numberofpages'           => array( 1,    'NUMBEROFPAGES' ),
-       'numberofarticles'        => array( 1,    'NUMBEROFARTICLES' ),
-       'numberoffiles'           => array( 1,    'NUMBEROFFILES' ),
-       'numberofusers'           => array( 1,    'NUMBEROFUSERS' ),
-       'numberofactiveusers'     => array( 1,    'NUMBEROFACTIVEUSERS' ),
-       'numberofedits'           => array( 1,    'NUMBEROFEDITS' ),
-       'numberofviews'           => array( 1,    'NUMBEROFVIEWS' ),
-       'pagename'                => array( 1,    'PAGENAME' ),
-       'pagenamee'               => array( 1,    'PAGENAMEE' ),
-       'namespace'               => array( 1,    'NAMESPACE' ),
-       'namespacee'              => array( 1,    'NAMESPACEE' ),
-       'namespacenumber'         => array( 1,    'NAMESPACENUMBER' ),
-       'talkspace'               => array( 1,    'TALKSPACE' ),
-       'talkspacee'              => array( 1,    'TALKSPACEE' ),
-       'subjectspace'            => array( 1,    'SUBJECTSPACE', 'ARTICLESPACE' ),
-       'subjectspacee'           => array( 1,    'SUBJECTSPACEE', 'ARTICLESPACEE' ),
-       'fullpagename'            => array( 1,    'FULLPAGENAME' ),
-       'fullpagenamee'           => array( 1,    'FULLPAGENAMEE' ),
-       'subpagename'             => array( 1,    'SUBPAGENAME' ),
-       'subpagenamee'            => array( 1,    'SUBPAGENAMEE' ),
-       'rootpagename'            => array( 1,    'ROOTPAGENAME' ),
-       'rootpagenamee'           => array( 1,    'ROOTPAGENAMEE' ),
-       'basepagename'            => array( 1,    'BASEPAGENAME' ),
-       'basepagenamee'           => array( 1,    'BASEPAGENAMEE' ),
-       'talkpagename'            => array( 1,    'TALKPAGENAME' ),
-       'talkpagenamee'           => array( 1,    'TALKPAGENAMEE' ),
-       'subjectpagename'         => array( 1,    'SUBJECTPAGENAME', 'ARTICLEPAGENAME' ),
-       'subjectpagenamee'        => array( 1,    'SUBJECTPAGENAMEE', 'ARTICLEPAGENAMEE' ),
-       'msg'                     => array( 0,    'MSG:' ),
-       'subst'                   => array( 0,    'SUBST:' ),
-       'safesubst'               => array( 0,    'SAFESUBST:' ),
-       'msgnw'                   => array( 0,    'MSGNW:' ),
-       'img_thumbnail'           => array( 1,    'thumbnail', 'thumb' ),
-       'img_manualthumb'         => array( 1,    'thumbnail=$1', 'thumb=$1' ),
-       'img_right'               => array( 1,    'right' ),
-       'img_left'                => array( 1,    'left' ),
-       'img_none'                => array( 1,    'none' ),
-       'img_width'               => array( 1,    '$1px' ),
-       'img_center'              => array( 1,    'center', 'centre' ),
-       'img_framed'              => array( 1,    'framed', 'enframed', 'frame' ),
-       'img_frameless'           => array( 1,    'frameless' ),
-       'img_lang'                => array( 1,    'lang=$1' ),
-       'img_page'                => array( 1,    'page=$1', 'page $1' ),
-       'img_upright'             => array( 1,    'upright', 'upright=$1', 'upright $1' ),
-       'img_border'              => array( 1,    'border' ),
-       'img_baseline'            => array( 1,    'baseline' ),
-       'img_sub'                 => array( 1,    'sub' ),
-       'img_super'               => array( 1,    'super', 'sup' ),
-       'img_top'                 => array( 1,    'top' ),
-       'img_text_top'            => array( 1,    'text-top' ),
-       'img_middle'              => array( 1,    'middle' ),
-       'img_bottom'              => array( 1,    'bottom' ),
-       'img_text_bottom'         => array( 1,    'text-bottom' ),
-       'img_link'                => array( 1,    'link=$1' ),
-       'img_alt'                 => array( 1,    'alt=$1' ),
-       'img_class'               => array( 1,    'class=$1' ),
-       'int'                     => array( 0,    'INT:' ),
-       'sitename'                => array( 1,    'SITENAME' ),
-       'ns'                      => array( 0,    'NS:' ),
-       'nse'                     => array( 0,    'NSE:' ),
-       'localurl'                => array( 0,    'LOCALURL:' ),
-       'localurle'               => array( 0,    'LOCALURLE:' ),
-       'articlepath'             => array( 0,    'ARTICLEPATH' ),
-       'pageid'                  => array( 0,    'PAGEID' ),
-       'server'                  => array( 0,    'SERVER' ),
-       'servername'              => array( 0,    'SERVERNAME' ),
-       'scriptpath'              => array( 0,    'SCRIPTPATH' ),
-       'stylepath'               => array( 0,    'STYLEPATH' ),
-       'grammar'                 => array( 0,    'GRAMMAR:' ),
-       'gender'                  => array( 0,    'GENDER:' ),
-       'notitleconvert'          => array( 0,    '__NOTITLECONVERT__', '__NOTC__' ),
-       'nocontentconvert'        => array( 0,    '__NOCONTENTCONVERT__', '__NOCC__' ),
-       'currentweek'             => array( 1,    'CURRENTWEEK' ),
-       'currentdow'              => array( 1,    'CURRENTDOW' ),
-       'localweek'               => array( 1,    'LOCALWEEK' ),
-       'localdow'                => array( 1,    'LOCALDOW' ),
-       'revisionid'              => array( 1,    'REVISIONID' ),
-       'revisionday'             => array( 1,    'REVISIONDAY' ),
-       'revisionday2'            => array( 1,    'REVISIONDAY2' ),
-       'revisionmonth'           => array( 1,    'REVISIONMONTH' ),
-       'revisionmonth1'          => array( 1,    'REVISIONMONTH1' ),
-       'revisionyear'            => array( 1,    'REVISIONYEAR' ),
-       'revisiontimestamp'       => array( 1,    'REVISIONTIMESTAMP' ),
-       'revisionuser'            => array( 1,    'REVISIONUSER' ),
-       'revisionsize'            => array( 1,    'REVISIONSIZE' ),
-       'plural'                  => array( 0,    'PLURAL:' ),
-       'fullurl'                 => array( 0,    'FULLURL:' ),
-       'fullurle'                => array( 0,    'FULLURLE:' ),
-       'canonicalurl'            => array( 0,    'CANONICALURL:' ),
-       'canonicalurle'           => array( 0,    'CANONICALURLE:' ),
-       'lcfirst'                 => array( 0,    'LCFIRST:' ),
-       'ucfirst'                 => array( 0,    'UCFIRST:' ),
-       'lc'                      => array( 0,    'LC:' ),
-       'uc'                      => array( 0,    'UC:' ),
-       'raw'                     => array( 0,    'RAW:' ),
-       'displaytitle'            => array( 1,    'DISPLAYTITLE' ),
-       'rawsuffix'               => array( 1,    'R' ),
-       'nocommafysuffix'         => array( 0,    'NOSEP' ),
-       'newsectionlink'          => array( 1,    '__NEWSECTIONLINK__' ),
-       'nonewsectionlink'        => array( 1,    '__NONEWSECTIONLINK__' ),
-       'currentversion'          => array( 1,    'CURRENTVERSION' ),
-       'urlencode'               => array( 0,    'URLENCODE:' ),
-       'anchorencode'            => array( 0,    'ANCHORENCODE' ),
-       'currenttimestamp'        => array( 1,    'CURRENTTIMESTAMP' ),
-       'localtimestamp'          => array( 1,    'LOCALTIMESTAMP' ),
-       'directionmark'           => array( 1,    'DIRECTIONMARK', 'DIRMARK' ),
-       'language'                => array( 0,    '#LANGUAGE:' ),
-       'contentlanguage'         => array( 1,    'CONTENTLANGUAGE', 'CONTENTLANG' ),
-       'pagesinnamespace'        => array( 1,    'PAGESINNAMESPACE:', 'PAGESINNS:' ),
-       'numberofadmins'          => array( 1,    'NUMBEROFADMINS' ),
-       'formatnum'               => array( 0,    'FORMATNUM' ),
-       'padleft'                 => array( 0,    'PADLEFT' ),
-       'padright'                => array( 0,    'PADRIGHT' ),
-       'special'                 => array( 0,    'special' ),
-       'speciale'                => array( 0,    'speciale' ),
-       'defaultsort'             => array( 1,    'DEFAULTSORT:', 'DEFAULTSORTKEY:', 'DEFAULTCATEGORYSORT:' ),
-       'filepath'                => array( 0,    'FILEPATH:' ),
-       'tag'                     => array( 0,    'tag' ),
-       'hiddencat'               => array( 1,    '__HIDDENCAT__' ),
-       'pagesincategory'         => array( 1,    'PAGESINCATEGORY', 'PAGESINCAT' ),
-       'pagesize'                => array( 1,    'PAGESIZE' ),
-       'index'                   => array( 1,    '__INDEX__' ),
-       'noindex'                 => array( 1,    '__NOINDEX__' ),
-       'numberingroup'           => array( 1,    'NUMBERINGROUP', 'NUMINGROUP' ),
-       'staticredirect'          => array( 1,    '__STATICREDIRECT__' ),
-       'protectionlevel'         => array( 1,    'PROTECTIONLEVEL' ),
-       'cascadingsources'        => array( 1,    'CASCADINGSOURCES' ),
-       'formatdate'              => array( 0,    'formatdate', 'dateformat' ),
-       'url_path'                => array( 0,    'PATH' ),
-       'url_wiki'                => array( 0,    'WIKI' ),
-       'url_query'               => array( 0,    'QUERY' ),
-       'defaultsort_noerror'     => array( 0,    'noerror' ),
-       'defaultsort_noreplace'   => array( 0,    'noreplace' ),
-       'displaytitle_noerror'    => array( 0,    'noerror' ),
-       'displaytitle_noreplace'  => array( 0,    'noreplace' ),
-       'pagesincategory_all'     => array( 0,    'all' ),
-       'pagesincategory_pages'   => array( 0,    'pages' ),
-       'pagesincategory_subcats' => array( 0,    'subcats' ),
-       'pagesincategory_files'   => array( 0,    'files' ),
+#   ID                               CASE  SYNONYMS
+       'redirect'                => array( 0, '#REDIRECT' ),
+       'notoc'                   => array( 0, '__NOTOC__' ),
+       'nogallery'               => array( 0, '__NOGALLERY__' ),
+       'forcetoc'                => array( 0, '__FORCETOC__' ),
+       'toc'                     => array( 0, '__TOC__' ),
+       'noeditsection'           => array( 0, '__NOEDITSECTION__' ),
+       '!'                       => array( 1, '!' ),
+       'currentmonth'            => array( 1, 'CURRENTMONTH', 'CURRENTMONTH2' ),
+       'currentmonth1'           => array( 1, 'CURRENTMONTH1' ),
+       'currentmonthname'        => array( 1, 'CURRENTMONTHNAME' ),
+       'currentmonthnamegen'     => array( 1, 'CURRENTMONTHNAMEGEN' ),
+       'currentmonthabbrev'      => array( 1, 'CURRENTMONTHABBREV' ),
+       'currentday'              => array( 1, 'CURRENTDAY' ),
+       'currentday2'             => array( 1, 'CURRENTDAY2' ),
+       'currentdayname'          => array( 1, 'CURRENTDAYNAME' ),
+       'currentyear'             => array( 1, 'CURRENTYEAR' ),
+       'currenttime'             => array( 1, 'CURRENTTIME' ),
+       'currenthour'             => array( 1, 'CURRENTHOUR' ),
+       'localmonth'              => array( 1, 'LOCALMONTH', 'LOCALMONTH2' ),
+       'localmonth1'             => array( 1, 'LOCALMONTH1' ),
+       'localmonthname'          => array( 1, 'LOCALMONTHNAME' ),
+       'localmonthnamegen'       => array( 1, 'LOCALMONTHNAMEGEN' ),
+       'localmonthabbrev'        => array( 1, 'LOCALMONTHABBREV' ),
+       'localday'                => array( 1, 'LOCALDAY' ),
+       'localday2'               => array( 1, 'LOCALDAY2' ),
+       'localdayname'            => array( 1, 'LOCALDAYNAME' ),
+       'localyear'               => array( 1, 'LOCALYEAR' ),
+       'localtime'               => array( 1, 'LOCALTIME' ),
+       'localhour'               => array( 1, 'LOCALHOUR' ),
+       'numberofpages'           => array( 1, 'NUMBEROFPAGES' ),
+       'numberofarticles'        => array( 1, 'NUMBEROFARTICLES' ),
+       'numberoffiles'           => array( 1, 'NUMBEROFFILES' ),
+       'numberofusers'           => array( 1, 'NUMBEROFUSERS' ),
+       'numberofactiveusers'     => array( 1, 'NUMBEROFACTIVEUSERS' ),
+       'numberofedits'           => array( 1, 'NUMBEROFEDITS' ),
+       'numberofviews'           => array( 1, 'NUMBEROFVIEWS' ),
+       'pagename'                => array( 1, 'PAGENAME' ),
+       'pagenamee'               => array( 1, 'PAGENAMEE' ),
+       'namespace'               => array( 1, 'NAMESPACE' ),
+       'namespacee'              => array( 1, 'NAMESPACEE' ),
+       'namespacenumber'         => array( 1, 'NAMESPACENUMBER' ),
+       'talkspace'               => array( 1, 'TALKSPACE' ),
+       'talkspacee'              => array( 1, 'TALKSPACEE' ),
+       'subjectspace'            => array( 1, 'SUBJECTSPACE', 'ARTICLESPACE' ),
+       'subjectspacee'           => array( 1, 'SUBJECTSPACEE', 'ARTICLESPACEE' ),
+       'fullpagename'            => array( 1, 'FULLPAGENAME' ),
+       'fullpagenamee'           => array( 1, 'FULLPAGENAMEE' ),
+       'subpagename'             => array( 1, 'SUBPAGENAME' ),
+       'subpagenamee'            => array( 1, 'SUBPAGENAMEE' ),
+       'rootpagename'            => array( 1, 'ROOTPAGENAME' ),
+       'rootpagenamee'           => array( 1, 'ROOTPAGENAMEE' ),
+       'basepagename'            => array( 1, 'BASEPAGENAME' ),
+       'basepagenamee'           => array( 1, 'BASEPAGENAMEE' ),
+       'talkpagename'            => array( 1, 'TALKPAGENAME' ),
+       'talkpagenamee'           => array( 1, 'TALKPAGENAMEE' ),
+       'subjectpagename'         => array( 1, 'SUBJECTPAGENAME', 'ARTICLEPAGENAME' ),
+       'subjectpagenamee'        => array( 1, 'SUBJECTPAGENAMEE', 'ARTICLEPAGENAMEE' ),
+       'msg'                     => array( 0, 'MSG:' ),
+       'subst'                   => array( 0, 'SUBST:' ),
+       'safesubst'               => array( 0, 'SAFESUBST:' ),
+       'msgnw'                   => array( 0, 'MSGNW:' ),
+       'img_thumbnail'           => array( 1, 'thumbnail', 'thumb' ),
+       'img_manualthumb'         => array( 1, 'thumbnail=$1', 'thumb=$1' ),
+       'img_right'               => array( 1, 'right' ),
+       'img_left'                => array( 1, 'left' ),
+       'img_none'                => array( 1, 'none' ),
+       'img_width'               => array( 1, '$1px' ),
+       'img_center'              => array( 1, 'center', 'centre' ),
+       'img_framed'              => array( 1, 'framed', 'enframed', 'frame' ),
+       'img_frameless'           => array( 1, 'frameless' ),
+       'img_lang'                => array( 1, 'lang=$1' ),
+       'img_page'                => array( 1, 'page=$1', 'page $1' ),
+       'img_upright'             => array( 1, 'upright', 'upright=$1', 'upright $1' ),
+       'img_border'              => array( 1, 'border' ),
+       'img_baseline'            => array( 1, 'baseline' ),
+       'img_sub'                 => array( 1, 'sub' ),
+       'img_super'               => array( 1, 'super', 'sup' ),
+       'img_top'                 => array( 1, 'top' ),
+       'img_text_top'            => array( 1, 'text-top' ),
+       'img_middle'              => array( 1, 'middle' ),
+       'img_bottom'              => array( 1, 'bottom' ),
+       'img_text_bottom'         => array( 1, 'text-bottom' ),
+       'img_link'                => array( 1, 'link=$1' ),
+       'img_alt'                 => array( 1, 'alt=$1' ),
+       'img_class'               => array( 1, 'class=$1' ),
+       'int'                     => array( 0, 'INT:' ),
+       'sitename'                => array( 1, 'SITENAME' ),
+       'ns'                      => array( 0, 'NS:' ),
+       'nse'                     => array( 0, 'NSE:' ),
+       'localurl'                => array( 0, 'LOCALURL:' ),
+       'localurle'               => array( 0, 'LOCALURLE:' ),
+       'articlepath'             => array( 0, 'ARTICLEPATH' ),
+       'pageid'                  => array( 0, 'PAGEID' ),
+       'server'                  => array( 0, 'SERVER' ),
+       'servername'              => array( 0, 'SERVERNAME' ),
+       'scriptpath'              => array( 0, 'SCRIPTPATH' ),
+       'stylepath'               => array( 0, 'STYLEPATH' ),
+       'grammar'                 => array( 0, 'GRAMMAR:' ),
+       'gender'                  => array( 0, 'GENDER:' ),
+       'notitleconvert'          => array( 0, '__NOTITLECONVERT__', '__NOTC__' ),
+       'nocontentconvert'        => array( 0, '__NOCONTENTCONVERT__', '__NOCC__' ),
+       'currentweek'             => array( 1, 'CURRENTWEEK' ),
+       'currentdow'              => array( 1, 'CURRENTDOW' ),
+       'localweek'               => array( 1, 'LOCALWEEK' ),
+       'localdow'                => array( 1, 'LOCALDOW' ),
+       'revisionid'              => array( 1, 'REVISIONID' ),
+       'revisionday'             => array( 1, 'REVISIONDAY' ),
+       'revisionday2'            => array( 1, 'REVISIONDAY2' ),
+       'revisionmonth'           => array( 1, 'REVISIONMONTH' ),
+       'revisionmonth1'          => array( 1, 'REVISIONMONTH1' ),
+       'revisionyear'            => array( 1, 'REVISIONYEAR' ),
+       'revisiontimestamp'       => array( 1, 'REVISIONTIMESTAMP' ),
+       'revisionuser'            => array( 1, 'REVISIONUSER' ),
+       'revisionsize'            => array( 1, 'REVISIONSIZE' ),
+       'plural'                  => array( 0, 'PLURAL:' ),
+       'fullurl'                 => array( 0, 'FULLURL:' ),
+       'fullurle'                => array( 0, 'FULLURLE:' ),
+       'canonicalurl'            => array( 0, 'CANONICALURL:' ),
+       'canonicalurle'           => array( 0, 'CANONICALURLE:' ),
+       'lcfirst'                 => array( 0, 'LCFIRST:' ),
+       'ucfirst'                 => array( 0, 'UCFIRST:' ),
+       'lc'                      => array( 0, 'LC:' ),
+       'uc'                      => array( 0, 'UC:' ),
+       'raw'                     => array( 0, 'RAW:' ),
+       'displaytitle'            => array( 1, 'DISPLAYTITLE' ),
+       'rawsuffix'               => array( 1, 'R' ),
+       'nocommafysuffix'         => array( 0, 'NOSEP' ),
+       'newsectionlink'          => array( 1, '__NEWSECTIONLINK__' ),
+       'nonewsectionlink'        => array( 1, '__NONEWSECTIONLINK__' ),
+       'currentversion'          => array( 1, 'CURRENTVERSION' ),
+       'urlencode'               => array( 0, 'URLENCODE:' ),
+       'anchorencode'            => array( 0, 'ANCHORENCODE' ),
+       'currenttimestamp'        => array( 1, 'CURRENTTIMESTAMP' ),
+       'localtimestamp'          => array( 1, 'LOCALTIMESTAMP' ),
+       'directionmark'           => array( 1, 'DIRECTIONMARK', 'DIRMARK' ),
+       'language'                => array( 0, '#LANGUAGE:' ),
+       'contentlanguage'         => array( 1, 'CONTENTLANGUAGE', 'CONTENTLANG' ),
+       'pagesinnamespace'        => array( 1, 'PAGESINNAMESPACE:', 'PAGESINNS:' ),
+       'numberofadmins'          => array( 1, 'NUMBEROFADMINS' ),
+       'formatnum'               => array( 0, 'FORMATNUM' ),
+       'padleft'                 => array( 0, 'PADLEFT' ),
+       'padright'                => array( 0, 'PADRIGHT' ),
+       'special'                 => array( 0, 'special' ),
+       'speciale'                => array( 0, 'speciale' ),
+       'defaultsort'             => array( 1, 'DEFAULTSORT:', 'DEFAULTSORTKEY:', 'DEFAULTCATEGORYSORT:' ),
+       'filepath'                => array( 0, 'FILEPATH:' ),
+       'tag'                     => array( 0, 'tag' ),
+       'hiddencat'               => array( 1, '__HIDDENCAT__' ),
+       'pagesincategory'         => array( 1, 'PAGESINCATEGORY', 'PAGESINCAT' ),
+       'pagesize'                => array( 1, 'PAGESIZE' ),
+       'index'                   => array( 1, '__INDEX__' ),
+       'noindex'                 => array( 1, '__NOINDEX__' ),
+       'numberingroup'           => array( 1, 'NUMBERINGROUP', 'NUMINGROUP' ),
+       'staticredirect'          => array( 1, '__STATICREDIRECT__' ),
+       'protectionlevel'         => array( 1, 'PROTECTIONLEVEL' ),
+       'cascadingsources'        => array( 1, 'CASCADINGSOURCES' ),
+       'formatdate'              => array( 0, 'formatdate', 'dateformat' ),
+       'url_path'                => array( 0, 'PATH' ),
+       'url_wiki'                => array( 0, 'WIKI' ),
+       'url_query'               => array( 0, 'QUERY' ),
+       'defaultsort_noerror'     => array( 0, 'noerror' ),
+       'defaultsort_noreplace'   => array( 0, 'noreplace' ),
+       'displaytitle_noerror'    => array( 0, 'noerror' ),
+       'displaytitle_noreplace'  => array( 0, 'noreplace' ),
+       'pagesincategory_all'     => array( 0, 'all' ),
+       'pagesincategory_pages'   => array( 0, 'pages' ),
+       'pagesincategory_subcats' => array( 0, 'subcats' ),
+       'pagesincategory_files'   => array( 0, 'files' ),
 );
 
 /**
index 88afbe7..da3eb7a 100644 (file)
@@ -371,7 +371,7 @@ $datePreferenceMigrationMap = array(
  * overridden.
  */
 $dateFormats = array(
-    # Please be cautious not to delete the invisible RLM from the beginning of the strings.
+       # Please be cautious not to delete the invisible RLM from the beginning of the strings.
        'mdy time' => '‏H:i',
        'mdy date' => '‏n/j/Y میلادی',
        'mdy both' => '‏n/j/Y میلادی، ساعت H:i',
index ac16028..3836ad9 100644 (file)
 $fallback = 'fr';
 
 $bookstoreList = array(
-    'Amazon.fr'    => 'http://www.amazon.fr/exec/obidos/ISBN=$1',
-    'alapage.fr'   => 'http://www.alapage.com/mx/?tp=F&type=101&l_isbn=$1&donnee_appel=ALASQ&devise=&',
-    'fnac.com'     => 'http://www3.fnac.com/advanced/book.do?isbn=$1',
-    'chapitre.com' => 'http://www.chapitre.com/frame_rec.asp?isbn=$1',
+       'Amazon.fr'    => 'http://www.amazon.fr/exec/obidos/ISBN=$1',
+       'alapage.fr'   => 'http://www.alapage.com/mx/?tp=F&type=101&l_isbn=$1&donnee_appel=ALASQ&devise=&',
+       'fnac.com'     => 'http://www3.fnac.com/advanced/book.do?isbn=$1',
+       'chapitre.com' => 'http://www.chapitre.com/frame_rec.asp?isbn=$1',
 );
 
 $namespaceNames = array(
index 947e6b1..38e5b0a 100644 (file)
@@ -35,8 +35,8 @@ $namespaceAliases = array(
 );
 
 $namespaceGenderAliases = array(
-        NS_USER => array( 'male' => 'Wužiwar', 'female' => 'Wužiwarka' ),
-        NS_USER_TALK => array( 'male' => 'Diskusija_z_wužiwarjom', 'female' => 'Diskusija_z_wužiwarku' ),
+       NS_USER => array( 'male' => 'Wužiwar', 'female' => 'Wužiwarka' ),
+       NS_USER_TALK => array( 'male' => 'Diskusija_z_wužiwarjom', 'female' => 'Diskusija_z_wužiwarku' ),
 );
 
 $datePreferences = array(
index 23cf2ba..ef0d72c 100644 (file)
@@ -206,6 +206,6 @@ $magicWords = array(
 );
 
 $imageFiles = array(
-    'button-italic'   => 'ksh/button_S_italic.png',
+       'button-italic'   => 'ksh/button_S_italic.png',
 );
 
index d5437da..85c0c26 100644 (file)
@@ -126,9 +126,9 @@ $defaultDateFormat = 'zh';
  * overridden.
  */
 $dateFormats = array(
-        'zh time' => 'H時i分',
-        'zh date' => 'Y年n月j日 (l)',
-        'zh both' => 'Y年n月j日 (D) H時i分',
+       'zh time' => 'H時i分',
+       'zh date' => 'Y年n月j日 (l)',
+       'zh both' => 'Y年n月j日 (D) H時i分',
 );
 
 $digitTransformTable = array(
index fdb33e4..49268f6 100644 (file)
@@ -70,7 +70,7 @@ $dateFormats = array(
 );
 
 $bookstoreList = array(
-        'Koninklijke Bibliotheek' => 'http://opc4.kb.nl/DB=1/SET=5/TTL=1/CMD?ACT=SRCH&IKT=1007&SRT=RLV&TRM=$1'
+       'Koninklijke Bibliotheek' => 'http://opc4.kb.nl/DB=1/SET=5/TTL=1/CMD?ACT=SRCH&IKT=1007&SRT=RLV&TRM=$1'
 );
 
 #!!# Translation <b>HLEERSTE:</b> is used more than once for <a href="#mw-sp-magic-lcfirst">lcfirst</a> and <a href="#mw-sp-magic-ucfirst">ucfirst</a>.
index 017b4d0..839a5de 100644 (file)
@@ -51,7 +51,7 @@ $namespaceNames = array(
 );
 
 $namespaceAliases = array(
-        # Aliases for Latin script namespaces
+       # Aliases for Latin script namespaces
        "Medija"                  => NS_MEDIA,
        "Posebno"                 => NS_SPECIAL,
        "Razgovor"                => NS_TALK,
index bc26d31..49a8891 100644 (file)
@@ -34,18 +34,18 @@ $datePreferences = false;
 $defaultDateFormat = 'dmy';
 
 $dateFormats = array(
-        'mdy time' => 'H:i',
-        'mdy date' => 'M j, Y',
-        'mdy both' => 'H:i, M j, Y',
-        'dmy time' => 'H:i',
-        'dmy date' => 'j M Y',
-        'dmy both' => 'j M Y, H:i',
-        'ymd time' => 'H:i',
-        'ymd date' => 'Y M j',
-        'ymd both' => 'H:i, Y M j',
-        'ISO 8601 time' => 'xnH:xni:xns',
-        'ISO 8601 date' => 'xnY-xnm-xnd',
-        'ISO 8601 both' => 'xnY-xnm-xnd"T"xnH:xni:xns',
+       'mdy time' => 'H:i',
+       'mdy date' => 'M j, Y',
+       'mdy both' => 'H:i, M j, Y',
+       'dmy time' => 'H:i',
+       'dmy date' => 'j M Y',
+       'dmy both' => 'j M Y, H:i',
+       'ymd time' => 'H:i',
+       'ymd date' => 'Y M j',
+       'ymd both' => 'H:i, Y M j',
+       'ISO 8601 time' => 'xnH:xni:xns',
+       'ISO 8601 date' => 'xnY-xnm-xnd',
+       'ISO 8601 both' => 'xnY-xnm-xnd"T"xnH:xni:xns',
 );
 
 $namespaceNames = array(
index 09b5590..8846f79 100644 (file)
@@ -45,18 +45,18 @@ $datePreferences = false;
 $defaultDateFormat = 'dmy';
 
 $dateFormats = array(
-        'mdy time' => 'H:i',
-        'mdy date' => 'M j, Y',
-        'mdy both' => 'H:i, M j, Y',
-        'dmy time' => 'H:i',
-        'dmy date' => 'j M Y',
-        'dmy both' => 'j M Y, H:i',
-        'ymd time' => 'H:i',
-        'ymd date' => 'Y M j',
-        'ymd both' => 'H:i, Y M j',
-        'ISO 8601 time' => 'xnH:xni:xns',
-        'ISO 8601 date' => 'xnY-xnm-xnd',
-        'ISO 8601 both' => 'xnY-xnm-xnd"T"xnH:xni:xns',
+       'mdy time' => 'H:i',
+       'mdy date' => 'M j, Y',
+       'mdy both' => 'H:i, M j, Y',
+       'dmy time' => 'H:i',
+       'dmy date' => 'j M Y',
+       'dmy both' => 'j M Y, H:i',
+       'ymd time' => 'H:i',
+       'ymd date' => 'Y M j',
+       'ymd both' => 'H:i, Y M j',
+       'ISO 8601 time' => 'xnH:xni:xns',
+       'ISO 8601 date' => 'xnY-xnm-xnd',
+       'ISO 8601 both' => 'xnY-xnm-xnd"T"xnH:xni:xns',
 );
 
 $magicWords = array(
index 3e5ebb7..7bdb1ca 100644 (file)
@@ -24,14 +24,14 @@ class ArrayUtilsTest extends MediaWikiTestCase {
 
        function provideFindLowerBound() {
                $self = $this;
-               $indexValueCallback = function( $size ) use ( $self ) {
-                       return function( $val ) use ( $self, $size ) {
+               $indexValueCallback = function ( $size ) use ( $self ) {
+                       return function ( $val ) use ( $self, $size ) {
                                $self->assertTrue( $val >= 0 );
                                $self->assertTrue( $val < $size );
                                return $val;
                        };
                };
-               $comparisonCallback = function( $a, $b ) {
+               $comparisonCallback = function ( $a, $b ) {
                        return $a - $b;
                };
 
index c1b637b..ae5c9c4 100644 (file)
@@ -40,16 +40,16 @@ class HtmlFormatterTest extends MediaWikiTestCase {
        }
 
        public function getHtmlData() {
-               $removeImages = function( HtmlFormatter $f ) {
+               $removeImages = function ( HtmlFormatter $f ) {
                        $f->setRemoveMedia();
                };
-               $removeTags = function( HtmlFormatter $f ) {
+               $removeTags = function ( HtmlFormatter $f ) {
                        $f->remove( array( 'table', '.foo', '#bar', 'div.baz' ) );
                };
-               $flattenSomeStuff = function( HtmlFormatter $f ) {
+               $flattenSomeStuff = function ( HtmlFormatter $f ) {
                        $f->flatten( array( 's', 'div' ) );
                };
-               $flattenEverything = function( HtmlFormatter $f ) {
+               $flattenEverything = function ( HtmlFormatter $f ) {
                        $f->flattenAllTags();
                };
                return array(
index 70014bf..f82a756 100644 (file)
@@ -27,7 +27,7 @@ class ImportTest extends MediaWikiLangTestCase {
                $source = $this->getInputStreamSource( $xml );
 
                $redirect = null;
-               $callback = function( $title, $origTitle, $revCount, $sRevCount, $pageInfo ) use ( &$redirect ) {
+               $callback = function ( $title, $origTitle, $revCount, $sRevCount, $pageInfo ) use ( &$redirect ) {
                        if ( array_key_exists( 'redirect', $pageInfo ) ) {
                                $redirect = $pageInfo['redirect'];
                        }
index 3829f90..9e2f5b8 100644 (file)
@@ -286,7 +286,7 @@ class StatusTest extends MediaWikiLangTestCase {
        }
 
        public static function provideCleanParams() {
-               $cleanCallback = function( $value ) {
+               $cleanCallback = function ( $value ) {
                        return '-' . $value . '-';
                };
 
@@ -538,7 +538,7 @@ class StatusTest extends MediaWikiLangTestCase {
         */
        public function testWakeUpSanitizesCallback() {
                $status = new Status();
-               $status->cleanCallback = function( $value ) {
+               $status->cleanCallback = function ( $value ) {
                        return '-' . $value . '-';
                };
                $status->__wakeup();
index 7b12a4a..12d7d2a 100644 (file)
@@ -115,7 +115,7 @@ class WebRequestTest extends MediaWikiTestCase {
                        'wgUsePrivateIPs' => $private,
                        'wgHooks' => array(
                                'IsTrustedProxy' => array(
-                                       function( &$ip, &$trusted ) use ( $xffList ) {
+                                       function ( &$ip, &$trusted ) use ( $xffList ) {
                                                $trusted = $trusted || in_array( $ip, $xffList );
                                                return true;
                                        }
index 4a927ed..0c67db7 100644 (file)
@@ -105,14 +105,18 @@ class DummyAction extends Action {
                return get_called_class();
        }
 
-       public function show() { }
-
-       public function execute() { }
+       public function show() {
+       }
 
+       public function execute() {
+       }
 }
 
-class NamedDummyAction extends DummyAction { }
+class NamedDummyAction extends DummyAction {
+}
 
-class CalledDummyAction extends DummyAction { }
+class CalledDummyAction extends DummyAction {
+}
 
-class InstantiatedDummyAction extends DummyAction { }
+class InstantiatedDummyAction extends DummyAction {
+}
index 11bce51..611d304 100644 (file)
@@ -37,7 +37,7 @@ class ConfigFactoryTest extends MediaWikiTestCase {
         */
        public function testMakeConfigWithInvalidCallback() {
                $factory = new ConfigFactory();
-               $factory->register( 'unittest', function() {
+               $factory->register( 'unittest', function () {
                        return true; // Not a Config object
                } );
                $this->setExpectedException( 'UnexpectedValueException' );
index e914c72..188ad3f 100644 (file)
@@ -44,7 +44,7 @@ class ArrayDiffFormatterTest extends MediaWikiTestCase {
                        $diffOp->expects( $this->any() )
                                ->method( 'getClosing' )
                                ->with( $this->isType( 'integer' ) )
-                               ->will( $this->returnCallback( function() {
+                               ->will( $this->returnCallback( function () {
                                        return 'mockLine';
                                } ) );
                } else {
index 358b0fe..f1425ef 100644 (file)
@@ -155,7 +155,7 @@ class MediaWikiPageLinkRendererTest extends MediaWikiTestCase {
                $formatter->expects( $this->any() )
                        ->method( 'getFullText' )
                        ->will( $this->returnCallback(
-                               function( TitleValue $title ) {
+                               function ( TitleValue $title ) {
                                        return str_replace( '_', ' ', "$title" );
                                }
                        ));
index 2cf8663..bf06e3b 100644 (file)
@@ -72,7 +72,7 @@ class MediaWikiTitleCodecTest extends MediaWikiTestCase {
 
                $genderCache->expects( $this->any() )
                        ->method( 'getGenderOf' )
-                       ->will( $this->returnCallback( function( $userName ) {
+                       ->will( $this->returnCallback( function ( $userName ) {
                                return preg_match( '/^[^- _]+a( |_|$)/u', $userName ) ? 'female' : 'male';
                        } ) );
 
index bed9c9e..c7491d3 100755 (executable)
@@ -151,7 +151,7 @@ if ( !class_exists( 'PHPUnit_TextUI_Command' ) ) {
 if ( version_compare( PHP_VERSION, '5.4.0', '<' )
        && version_compare( PHP_VERSION, '5.3.0', '>=' )
 ) {
-       register_shutdown_function( function() {
+       register_shutdown_function( function () {
                gc_collect_cycles();
                gc_disable();
        } );
index 89cc834..9a4b332 100644 (file)
--- a/thumb.php
+++ b/thumb.php
@@ -376,7 +376,7 @@ function wfGenerateThumbnail( File $file, array $params, $thumbName, $thumbPath
 
        $done = false;
        // Record failures on PHP fatals in addition to caching exceptions
-       register_shutdown_function( function() use ( &$done, $key ) {
+       register_shutdown_function( function () use ( &$done, $key ) {
                if ( !$done ) { // transform() gave a fatal
                        global $wgMemc;
                        // Randomize TTL to reduce stampedes
@@ -399,17 +399,17 @@ function wfGenerateThumbnail( File $file, array $params, $thumbName, $thumbPath
        try {
                $work = new PoolCounterWorkViaCallback( $poolCounterType, sha1( $file->getName() ),
                        array(
-                               'doWork' => function() use ( $file, $params ) {
+                               'doWork' => function () use ( $file, $params ) {
                                        return $file->transform( $params, File::RENDER_NOW );
                                },
-                               'getCachedWork' => function() use ( $file, $params, $thumbPath ) {
+                               'getCachedWork' => function () use ( $file, $params, $thumbPath ) {
                                        // If the worker that finished made this thumbnail then use it.
                                        // Otherwise, it probably made a different thumbnail for this file.
                                        return $file->getRepo()->fileExists( $thumbPath )
                                                ? $file->transform( $params, File::RENDER_NOW )
                                                : false; // retry once more in exclusive mode
                                },
-                               'fallback' => function() {
+                               'fallback' => function () {
                                        return wfMessage( 'generic-pool-error' )->parse();
                                },
                                'error' => function ( $status ) {