From: umherirrender Date: Thu, 7 Mar 2013 16:50:43 +0000 (+0100) Subject: fix some spacing X-Git-Tag: 1.31.0-rc.0~20438^2 X-Git-Url: https://git.heureux-cyclage.org/?a=commitdiff_plain;h=d63121016d894e3fccf3308a26704472e69ec08f;p=lhc%2Fweb%2Fwiklou.git fix some spacing Added/removed spaces around logical/arithmetic operator Reduced multiple empty lines to one empty line Removed wrong tabs before comments at end of line Removed too many spaces in assigments Change-Id: I2bba4e72f9b5f88c53324d7b70e6042f1aad8f6b --- diff --git a/includes/Article.php b/includes/Article.php index 812bbae842..d0a972562f 100644 --- a/includes/Article.php +++ b/includes/Article.php @@ -393,7 +393,6 @@ class Article implements Page { return $this->mContent; } - /** * Get text content object * Does *NOT* follow redirects. diff --git a/includes/AutoLoader.php b/includes/AutoLoader.php index ed72b2ff77..b1431a2cb0 100644 --- a/includes/AutoLoader.php +++ b/includes/AutoLoader.php @@ -182,7 +182,7 @@ $wgAutoloadLocalClasses = array( 'MWNamespace' => 'includes/Namespace.php', 'OldChangesList' => 'includes/ChangesList.php', 'OutputPage' => 'includes/OutputPage.php', - 'Page' => 'includes/WikiPage.php', + 'Page' => 'includes/WikiPage.php', 'PageQueryPage' => 'includes/PageQueryPage.php', 'Pager' => 'includes/Pager.php', 'PasswordError' => 'includes/User.php', @@ -276,9 +276,9 @@ $wgAutoloadLocalClasses = array( 'WikiError' => 'includes/WikiError.php', 'WikiErrorMsg' => 'includes/WikiError.php', 'WikiExporter' => 'includes/Export.php', - 'WikiFilePage' => 'includes/WikiFilePage.php', + 'WikiFilePage' => 'includes/WikiFilePage.php', 'WikiImporter' => 'includes/Import.php', - 'WikiPage' => 'includes/WikiPage.php', + 'WikiPage' => 'includes/WikiPage.php', 'WikiRevision' => 'includes/Import.php', 'WikiMap' => 'includes/WikiMap.php', 'WikiReference' => 'includes/WikiMap.php', @@ -578,8 +578,8 @@ $wgAutoloadLocalClasses = array( 'LSLockManager' => 'includes/filebackend/lockmanager/LSLockManager.php', 'MemcLockManager' => 'includes/filebackend/lockmanager/MemcLockManager.php', 'QuorumLockManager' => 'includes/filebackend/lockmanager/QuorumLockManager.php', - 'MySqlLockManager'=> 'includes/filebackend/lockmanager/DBLockManager.php', - 'PostgreSqlLockManager'=> 'includes/filebackend/lockmanager/DBLockManager.php', + 'MySqlLockManager' => 'includes/filebackend/lockmanager/DBLockManager.php', + 'PostgreSqlLockManager' => 'includes/filebackend/lockmanager/DBLockManager.php', 'NullLockManager' => 'includes/filebackend/lockmanager/LockManager.php', 'FileOp' => 'includes/filebackend/FileOp.php', 'FileOpBatch' => 'includes/filebackend/FileOpBatch.php', diff --git a/includes/Block.php b/includes/Block.php index 1d1e2c06bb..e20b5fdb41 100644 --- a/includes/Block.php +++ b/includes/Block.php @@ -307,7 +307,7 @@ class Block { # This has the nice property that a /32 block is ranked equally with a # single-IP block, which is exactly what it is... - $score = self::TYPE_RANGE - 1 + ( $size / 128 ); + $score = self::TYPE_RANGE - 1 + ( $size / 128 ); } else { $score = $block->getType(); diff --git a/includes/Cdb.php b/includes/Cdb.php index 1c4587a2ec..a142c7cb2f 100644 --- a/includes/Cdb.php +++ b/includes/Cdb.php @@ -144,7 +144,6 @@ class CdbReader_DBA { } } - /** * Writer class which uses the DBA extension */ diff --git a/includes/ChangesList.php b/includes/ChangesList.php index a9b9c3140e..2f715bfdbf 100644 --- a/includes/ChangesList.php +++ b/includes/ChangesList.php @@ -579,7 +579,6 @@ class ChangesList extends ContextSource { } } - /** * Generate a list of changes using the good old system (no javascript) */ @@ -692,7 +691,6 @@ class OldChangesList extends ChangesList { } } - /** * Generate a list of changes using an Enhanced system (uses javascript). */ diff --git a/includes/Collation.php b/includes/Collation.php index 0ace6ba9e2..13084b84a7 100644 --- a/includes/Collation.php +++ b/includes/Collation.php @@ -148,7 +148,6 @@ class IdentityCollation extends Collation { } } - class IcuCollation extends Collation { var $primaryCollator, $mainCollator, $locale; var $firstLetterData; diff --git a/includes/ConfEditor.php b/includes/ConfEditor.php index 699e83a091..e5c2e5c810 100644 --- a/includes/ConfEditor.php +++ b/includes/ConfEditor.php @@ -66,7 +66,6 @@ class ConfEditor { */ var $stateStack; - /** * The path stack is a stack of associative arrays with the following elements: * name The name of top level of the path diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php index 7e4a68b0c7..eb87e7b613 100644 --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@ -135,7 +135,6 @@ $wgUsePathInfo = ( strpos( PHP_SAPI, 'cgi' ) === false ) && */ $wgScriptExtension = '.php'; - /**@}*/ /************************************************************************//** @@ -1022,7 +1021,6 @@ $wgAntivirusSetup = array( ), ); - /** Determines if a failed virus scan (AV_SCAN_FAILED) will cause the file to be rejected. */ $wgAntivirusRequired = true; @@ -1599,7 +1597,6 @@ $wgOldChangeTagsIndex = false; /**@}*/ # End of DB settings } - /************************************************************************//** * @name Text storage * @{ @@ -2853,7 +2850,6 @@ $wgBetterDirectionality = true; */ $wgSend404Code = true; - /** * The $wgShowRollbackEditCount variable is used to show how many edits will be * rollback. The numeric value of the varible are the limit up to are counted. @@ -3058,7 +3054,6 @@ $wgResourceLoaderExperimentalAsyncLoading = false; /** @} */ # End of resource loader settings } - /*************************************************************************//** * @name Page title and interwiki link settings * @{ @@ -3345,7 +3340,6 @@ $wgMaxPPNodeCount = 1000000; */ $wgMaxGeneratedPPNodeCount = 1000000; - /** * Maximum recursion depth for templates within templates. * The current parser adds two levels to the PHP call stack for each template, @@ -3927,7 +3921,7 @@ $wgGroupPermissions['*']['edit'] = true; $wgGroupPermissions['*']['createpage'] = true; $wgGroupPermissions['*']['createtalk'] = true; $wgGroupPermissions['*']['writeapi'] = true; -//$wgGroupPermissions['*']['patrolmarks'] = false; // let anons see what was patrolled +#$wgGroupPermissions['*']['patrolmarks'] = false; // let anons see what was patrolled // Implicit group for all logged-in accounts $wgGroupPermissions['user']['move'] = true; @@ -3958,7 +3952,7 @@ $wgGroupPermissions['bot']['autopatrol'] = true; $wgGroupPermissions['bot']['suppressredirect'] = true; $wgGroupPermissions['bot']['apihighlimits'] = true; $wgGroupPermissions['bot']['writeapi'] = true; -#$wgGroupPermissions['bot']['editprotected'] = true; // can edit all protected pages without cascade protection enabled +#$wgGroupPermissions['bot']['editprotected'] = true; // can edit all protected pages without cascade protection enabled // Most extra permission abilities go to this group $wgGroupPermissions['sysop']['block'] = true; @@ -3995,8 +3989,8 @@ $wgGroupPermissions['sysop']['noratelimit'] = true; $wgGroupPermissions['sysop']['movefile'] = true; $wgGroupPermissions['sysop']['unblockself'] = true; $wgGroupPermissions['sysop']['suppressredirect'] = true; -#$wgGroupPermissions['sysop']['upload_by_url'] = true; -#$wgGroupPermissions['sysop']['mergehistory'] = true; +#$wgGroupPermissions['sysop']['upload_by_url'] = true; +#$wgGroupPermissions['sysop']['mergehistory'] = true; // Permission to change users' group assignments $wgGroupPermissions['bureaucrat']['userrights'] = true; @@ -4006,8 +4000,8 @@ $wgGroupPermissions['bureaucrat']['noratelimit'] = true; // Permission to export pages including linked pages regardless of $wgExportMaxLinkDepth #$wgGroupPermissions['bureaucrat']['override-export-depth'] = true; -#$wgGroupPermissions['sysop']['deletelogentry'] = true; -#$wgGroupPermissions['sysop']['deleterevision'] = true; +#$wgGroupPermissions['sysop']['deletelogentry'] = true; +#$wgGroupPermissions['sysop']['deleterevision'] = true; // To hide usernames from users and Sysops #$wgGroupPermissions['suppress']['hideuser'] = true; // To hide revisions/log items from users and Sysops @@ -4446,7 +4440,6 @@ $wgCookieExpiration = 180 * 86400; */ $wgCookieDomain = ''; - /** * Set this variable if you want to restrict cookies to a certain path within * the domain specified by $wgCookieDomain. @@ -4787,7 +4780,6 @@ $wgJavaScriptTestConfig = array( ), ); - /** * Overwrite the caching key prefix with custom value. * @since 1.19 diff --git a/includes/Defines.php b/includes/Defines.php index c4b0b472ae..31235488d7 100644 --- a/includes/Defines.php +++ b/includes/Defines.php @@ -61,7 +61,6 @@ define( 'DB_READ', -1 ); define( 'DB_WRITE', -2 ); define( 'DB_LAST', -3 ); # deprecated since 2008, usage throws exception - /**@{ * Virtual namespaces; don't appear in the page database */ diff --git a/includes/EditPage.php b/includes/EditPage.php index 5dfb97bef7..1bb165f1db 100644 --- a/includes/EditPage.php +++ b/includes/EditPage.php @@ -40,90 +40,90 @@ class EditPage { /** * Status: Article successfully updated */ - const AS_SUCCESS_UPDATE = 200; + const AS_SUCCESS_UPDATE = 200; /** * Status: Article successfully created */ - const AS_SUCCESS_NEW_ARTICLE = 201; + const AS_SUCCESS_NEW_ARTICLE = 201; /** * Status: Article update aborted by a hook function */ - const AS_HOOK_ERROR = 210; + const AS_HOOK_ERROR = 210; /** * Status: A hook function returned an error */ - const AS_HOOK_ERROR_EXPECTED = 212; + const AS_HOOK_ERROR_EXPECTED = 212; /** * Status: User is blocked from editting this page */ - const AS_BLOCKED_PAGE_FOR_USER = 215; + const AS_BLOCKED_PAGE_FOR_USER = 215; /** * Status: Content too big (> $wgMaxArticleSize) */ - const AS_CONTENT_TOO_BIG = 216; + const AS_CONTENT_TOO_BIG = 216; /** * Status: User cannot edit? (not used) */ - const AS_USER_CANNOT_EDIT = 217; + const AS_USER_CANNOT_EDIT = 217; /** * Status: this anonymous user is not allowed to edit this page */ - const AS_READ_ONLY_PAGE_ANON = 218; + const AS_READ_ONLY_PAGE_ANON = 218; /** * Status: this logged in user is not allowed to edit this page */ - const AS_READ_ONLY_PAGE_LOGGED = 219; + const AS_READ_ONLY_PAGE_LOGGED = 219; /** * Status: wiki is in readonly mode (wfReadOnly() == true) */ - const AS_READ_ONLY_PAGE = 220; + const AS_READ_ONLY_PAGE = 220; /** * Status: rate limiter for action 'edit' was tripped */ - const AS_RATE_LIMITED = 221; + const AS_RATE_LIMITED = 221; /** * Status: article was deleted while editting and param wpRecreate == false or form * was not posted */ - const AS_ARTICLE_WAS_DELETED = 222; + const AS_ARTICLE_WAS_DELETED = 222; /** * Status: user tried to create this page, but is not allowed to do that * ( Title->usercan('create') == false ) */ - const AS_NO_CREATE_PERMISSION = 223; + const AS_NO_CREATE_PERMISSION = 223; /** * Status: user tried to create a blank page */ - const AS_BLANK_ARTICLE = 224; + const AS_BLANK_ARTICLE = 224; /** * Status: (non-resolvable) edit conflict */ - const AS_CONFLICT_DETECTED = 225; + const AS_CONFLICT_DETECTED = 225; /** * Status: no edit summary given and the user has forceeditsummary set and the user is not * editting in his own userspace or talkspace and wpIgnoreBlankSummary == false */ - const AS_SUMMARY_NEEDED = 226; + const AS_SUMMARY_NEEDED = 226; /** * Status: user tried to create a new section without content */ - const AS_TEXTBOX_EMPTY = 228; + const AS_TEXTBOX_EMPTY = 228; /** * Status: article is too big (> $wgMaxArticleSize), after merging in the new section @@ -133,37 +133,37 @@ class EditPage { /** * not used */ - const AS_OK = 230; + const AS_OK = 230; /** * Status: WikiPage::doEdit() was unsuccessfull */ - const AS_END = 231; + const AS_END = 231; /** * Status: summary contained spam according to one of the regexes in $wgSummarySpamRegex */ - const AS_SPAM_ERROR = 232; + const AS_SPAM_ERROR = 232; /** * Status: anonymous user is not allowed to upload (User::isAllowed('upload') == false) */ - const AS_IMAGE_REDIRECT_ANON = 233; + const AS_IMAGE_REDIRECT_ANON = 233; /** * Status: logged in user is not allowed to upload (User::isAllowed('upload') == false) */ - const AS_IMAGE_REDIRECT_LOGGED = 234; + const AS_IMAGE_REDIRECT_LOGGED = 234; /** * Status: can't parse content */ - const AS_PARSE_ERROR = 240; + const AS_PARSE_ERROR = 240; /** * HTML id and name for the beginning of the edit form. */ - const EDITFORM_ID = 'editform'; + const EDITFORM_ID = 'editform'; /** * Prefix of key for cookie used to pass post-edit state. @@ -397,9 +397,9 @@ class EditPage { $this->isConflict = false; // css / js subpages of user pages get a special treatment - $this->isCssJsSubpage = $this->mTitle->isCssJsSubpage(); - $this->isCssSubpage = $this->mTitle->isCssSubpage(); - $this->isJsSubpage = $this->mTitle->isJsSubpage(); + $this->isCssJsSubpage = $this->mTitle->isCssJsSubpage(); + $this->isCssSubpage = $this->mTitle->isCssSubpage(); + $this->isJsSubpage = $this->mTitle->isJsSubpage(); $this->isWrongCaseCssJsPage = $this->isWrongCaseCssJsPage(); # Show applicable editing introductions @@ -714,7 +714,7 @@ class EditPage { $this->starttime = null; } - $this->recreate = $request->getCheck( 'wpRecreate' ); + $this->recreate = $request->getCheck( 'wpRecreate' ); $this->minoredit = $request->getCheck( 'wpMinoredit' ); $this->watchthis = $request->getCheck( 'wpWatchthis' ); @@ -732,18 +732,18 @@ class EditPage { } else { # Not a posted form? Start with nothing. wfDebug( __METHOD__ . ": Not a posted form.\n" ); - $this->textbox1 = ''; - $this->summary = ''; + $this->textbox1 = ''; + $this->summary = ''; $this->sectiontitle = ''; - $this->edittime = ''; - $this->starttime = wfTimestampNow(); - $this->edit = false; - $this->preview = false; - $this->save = false; - $this->diff = false; - $this->minoredit = false; - $this->watchthis = $request->getBool( 'watchthis', false ); // Watch may be overriden by request parameters - $this->recreate = false; + $this->edittime = ''; + $this->starttime = wfTimestampNow(); + $this->edit = false; + $this->preview = false; + $this->save = false; + $this->diff = false; + $this->minoredit = false; + $this->watchthis = $request->getBool( 'watchthis', false ); // Watch may be overriden by request parameters + $this->recreate = false; // When creating a new section, we can preload a section title by passing it as the // preloadtitle parameter in the URL (Bug 13100) @@ -1006,7 +1006,7 @@ class EditPage { $rev = $this->mArticle->getRevision(); $content = $rev ? $rev->getContent( Revision::RAW ) : null; - if ( $content === false || $content === null ) { + if ( $content === false || $content === null ) { if ( !$this->contentModel ) $this->contentModel = $this->getTitle()->getContentModel(); $handler = ContentHandler::getForModelID( $this->contentModel ); @@ -1020,7 +1020,6 @@ class EditPage { } } - /** * Use this method before edit() to preload some text into the edit box * @@ -2427,7 +2426,6 @@ class EditPage { $this->showHeaderCopyrightWarning(); } - /** * Standard summary input and label (wgSummary), abstracted so EditPage * subclasses may reorganize the form. diff --git a/includes/Exception.php b/includes/Exception.php index 81d1a9ba42..2764ea9da7 100644 --- a/includes/Exception.php +++ b/includes/Exception.php @@ -83,7 +83,7 @@ class MWException extends Exception { $callargs = array_merge( array( $this ), $args ); foreach ( $hooks as $hook ) { - if ( is_string( $hook ) || ( is_array( $hook ) && count( $hook ) >= 2 && is_string( $hook[0] ) ) ) { // 'function' or array( 'class', hook' ) + if ( is_string( $hook ) || ( is_array( $hook ) && count( $hook ) >= 2 && is_string( $hook[0] ) ) ) { // 'function' or array( 'class', hook' ) $result = call_user_func_array( $hook, $callargs ); } else { $result = null; diff --git a/includes/Export.php b/includes/Export.php index 924857531f..85f2368247 100644 --- a/includes/Export.php +++ b/includes/Export.php @@ -429,7 +429,7 @@ class WikiExporter { foreach ( $resultset as $row ) { if ( $last === null || $last->page_namespace != $row->page_namespace || - $last->page_title != $row->page_title ) { + $last->page_title != $row->page_title ) { if ( $last !== null ) { $output = ''; if ( $this->dumpUploads ) { @@ -649,7 +649,7 @@ class XmlDumpWriter { } if ( isset( $row->rev_minor_edit ) && $row->rev_minor_edit ) { - $out .= " \n"; + $out .= " \n"; } if ( isset( $row->rev_deleted ) && ( $row->rev_deleted & Revision::DELETED_COMMENT ) ) { $out .= " " . Xml::element( 'comment', array( 'deleted' => 'deleted' ) ) . "\n"; @@ -871,7 +871,6 @@ class XmlDumpWriter { } } - /** * Base class for output stream; prints to stdout or buffer or whereever. * @ingroup Dump @@ -1399,7 +1398,6 @@ class DumpNamespaceFilter extends DumpFilter { } } - /** * Dump output filter to include only the last revision in each page sequence. * @ingroup Dump diff --git a/includes/Fallback.php b/includes/Fallback.php index b51765682d..a26410a510 100644 --- a/includes/Fallback.php +++ b/includes/Fallback.php @@ -149,7 +149,6 @@ class Fallback { return $total; } - /** * Fallback implementation of mb_strpos, hardcoded to UTF-8. * @param $haystack String diff --git a/includes/GlobalFunctions.php b/includes/GlobalFunctions.php index cdd0ae9e46..e95f0110bc 100644 --- a/includes/GlobalFunctions.php +++ b/includes/GlobalFunctions.php @@ -94,7 +94,6 @@ if( !function_exists( 'mb_strrpos' ) ) { } } - // Support for Wietse Venema's taint feature if ( !function_exists( 'istainted' ) ) { /** @@ -851,8 +850,6 @@ function wfExpandIRI_callback( $matches ) { return urldecode( $matches[1] ); } - - /** * Make URL indexes, appropriate for the el_index field of externallinks. * @@ -1965,10 +1962,8 @@ function wfFormatStackFrame( $frame ) { $frame['function']; } - /* Some generic result counters, pulled out of SearchEngine */ - /** * @todo document * diff --git a/includes/HTMLForm.php b/includes/HTMLForm.php index 5af813ba94..06e7ee46cd 100644 --- a/includes/HTMLForm.php +++ b/includes/HTMLForm.php @@ -2357,7 +2357,6 @@ class HTMLSelectAndOtherField extends HTMLSelectField { */ class HTMLRadioField extends HTMLFormField { - function validate( $value, $alldata ) { $p = parent::validate( $value, $alldata ); diff --git a/includes/HistoryBlob.php b/includes/HistoryBlob.php index 597417328b..a2f1d9502a 100644 --- a/includes/HistoryBlob.php +++ b/includes/HistoryBlob.php @@ -183,7 +183,6 @@ class ConcatenatedGzipHistoryBlob implements HistoryBlob } } - /** * Pointer object for an item within a CGZ blob stored in the text table. */ @@ -285,7 +284,6 @@ class HistoryBlobStub { } } - /** * To speed up conversion from 1.4 to 1.5 schema, text rows can refer to the * leftover cur table as the backend. This avoids expensively copying hundreds diff --git a/includes/Hooks.php b/includes/Hooks.php index a29e5fe506..bf27fde8c9 100644 --- a/includes/Hooks.php +++ b/includes/Hooks.php @@ -57,7 +57,6 @@ class Hooks { unset( self::$handlers[$name] ); } - /** * Attach an event handler to a given hook * diff --git a/includes/HttpFunctions.php b/includes/HttpFunctions.php index 892e0ed0bf..9ef6748753 100644 --- a/includes/HttpFunctions.php +++ b/includes/HttpFunctions.php @@ -506,7 +506,6 @@ class MWHttpRequest { return (int)$this->respStatus; } - /** * Returns true if the last status code was a redirect. * @@ -643,7 +642,7 @@ class MWHttpRequest { if ( isset( $url['host'] ) ) { $domain = $url[ 'scheme' ] . '://' . $url[ 'host' ]; - break; //found correct URI (with host) + break; //found correct URI (with host) } else { $foundRelativeURI = true; } diff --git a/includes/IP.php b/includes/IP.php index 5c50c22f44..8b7a8881d5 100644 --- a/includes/IP.php +++ b/includes/IP.php @@ -742,7 +742,7 @@ class IP { return long2ip( ( hexdec( $m[1] ) << 16 ) + hexdec( $m[2] ) ); } - return null; // give up + return null; // give up } /** diff --git a/includes/LinkFilter.php b/includes/LinkFilter.php index 28379c77c4..9d49cb5c19 100644 --- a/includes/LinkFilter.php +++ b/includes/LinkFilter.php @@ -20,7 +20,6 @@ * @file */ - /** * Some functions to help implement an external link filter for spam control. * diff --git a/includes/Linker.php b/includes/Linker.php index 2434a708c5..a9bf93428c 100644 --- a/includes/Linker.php +++ b/includes/Linker.php @@ -1166,7 +1166,6 @@ class Linker { return self::userToolLinks( $userId, $userText, true, 0, $edits ); } - /** * @param $userId Integer: user id in database. * @param $userText String: user name in database. diff --git a/includes/MagicWord.php b/includes/MagicWord.php index 257a46daea..7b66924904 100644 --- a/includes/MagicWord.php +++ b/includes/MagicWord.php @@ -464,7 +464,6 @@ class MagicWord { } } - /** * Returns true if the text matches the word, and alters the * input string, removing all instances of the word diff --git a/includes/MimeMagic.php b/includes/MimeMagic.php index e787fbd54d..6b76fc5f15 100644 --- a/includes/MimeMagic.php +++ b/includes/MimeMagic.php @@ -413,7 +413,6 @@ class MimeMagic { return $m; } - /** * Tests if the extension matches the given mime type. Returns true if a * match was found, null if the mime type is unknown, and false if the @@ -427,7 +426,7 @@ class MimeMagic { $ext = $this->getExtensionsForType( $mime ); if ( !$ext ) { - return null; // Unknown mime type + return null; // Unknown mime type } $ext = explode( ' ', $ext ); diff --git a/includes/OutputPage.php b/includes/OutputPage.php index 6309ecb8d1..62219e2870 100644 --- a/includes/OutputPage.php +++ b/includes/OutputPage.php @@ -1597,7 +1597,6 @@ class OutputPage extends ContextSource { $this->addHTML( $text ); } - /** * Add the output of a QuickTemplate to the output buffer * @@ -2952,7 +2951,6 @@ $templates $this->mJsConfigVars[$keys] = $value; } - /** * Get an array containing the variables to be set in mw.config in JavaScript. * @@ -3223,7 +3221,6 @@ $templates ) ); } - # Language variants if ( !$wgDisableLangConversion && $wgCanonicalLanguageLinks ) { $lang = $this->getTitle()->getPageLanguage(); diff --git a/includes/Pager.php b/includes/Pager.php index 746b02eb2a..c9f9015cb1 100644 --- a/includes/Pager.php +++ b/includes/Pager.php @@ -709,7 +709,6 @@ abstract class IndexPager extends ContextSource implements Pager { protected function getDefaultDirections() { return false; } } - /** * IndexPager with an alphabetic list and a formatted navigation bar * @ingroup Pager diff --git a/includes/PoolCounter.php b/includes/PoolCounter.php index 452dbc547f..2ebef04e3e 100644 --- a/includes/PoolCounter.php +++ b/includes/PoolCounter.php @@ -42,15 +42,15 @@ abstract class PoolCounter { /* Return codes */ - const LOCKED = 1; /* Lock acquired */ + const LOCKED = 1; /* Lock acquired */ const RELEASED = 2; /* Lock released */ - const DONE = 3; /* Another worker did the work for you */ + const DONE = 3; /* Another worker did the work for you */ - const ERROR = -1; /* Indeterminate error */ + const ERROR = -1; /* Indeterminate error */ const NOT_LOCKED = -2; /* Called release() with no lock held */ const QUEUE_FULL = -3; /* There are already maxqueue workers on this lock */ - const TIMEOUT = -4; /* Timeout exceeded */ - const LOCK_HELD = -5; /* Cannot acquire another lock while you have one lock held */ + const TIMEOUT = -4; /* Timeout exceeded */ + const LOCK_HELD = -5; /* Cannot acquire another lock while you have one lock held */ /** * I want to do this task and I need to do it myself. @@ -107,9 +107,9 @@ abstract class PoolCounter { protected function __construct( $conf, $type, $key ) { $this->key = $key; - $this->workers = $conf['workers']; + $this->workers = $conf['workers']; $this->maxqueue = $conf['maxqueue']; - $this->timeout = $conf['timeout']; + $this->timeout = $conf['timeout']; } } diff --git a/includes/Preferences.php b/includes/Preferences.php index f35d754063..cb91153ff4 100644 --- a/includes/Preferences.php +++ b/includes/Preferences.php @@ -202,7 +202,7 @@ class Preferences { // Skip the default * group, seems useless here continue; } - $groupName = User::getGroupName( $ueg ); + $groupName = User::getGroupName( $ueg ); $userGroups[] = User::makeGroupLinkHTML( $ueg, $groupName ); $memberName = User::getGroupMember( $ueg, $userName ); @@ -397,7 +397,6 @@ class Preferences { ); } - $defaultPreferences['emailaddress'] = array( 'type' => 'info', 'raw' => true, @@ -826,7 +825,6 @@ class Preferences { 'label-message' => 'tog-forceeditsummary', ); - $defaultPreferences['uselivepreview'] = array( 'type' => 'toggle', 'section' => 'editing/advancedediting', @@ -1009,7 +1007,6 @@ class Preferences { 'min' => 0, ); - if ( $wgVectorUseSimpleSearch ) { $defaultPreferences['vector-simplesearch'] = array( 'type' => 'toggle', diff --git a/includes/ProtectionForm.php b/includes/ProtectionForm.php index 17e43728d5..b6077a7f00 100644 --- a/includes/ProtectionForm.php +++ b/includes/ProtectionForm.php @@ -482,7 +482,7 @@ class ProtectionForm { # Add manual and custom reason field/selects as well as submit if( !$this->disabled ) { - $out .= Xml::openElement( 'table', array( 'id' => 'mw-protect-table3' ) ) . + $out .= Xml::openElement( 'table', array( 'id' => 'mw-protect-table3' ) ) . Xml::openElement( 'tbody' ); $out .= " diff --git a/includes/QueryPage.php b/includes/QueryPage.php index a01ac68ebb..e41285beef 100644 --- a/includes/QueryPage.php +++ b/includes/QueryPage.php @@ -72,7 +72,6 @@ global $wgDisableCounters; if ( !$wgDisableCounters ) $wgQueryPages[] = array( 'PopularPagesPage', 'Popularpages' ); - /** * This is a class for doing query pages; since they're almost all the same, * we factor out some of the functionality into a superclass, and let diff --git a/includes/RecentChange.php b/includes/RecentChange.php index 6af7597f4d..557efadb0b 100644 --- a/includes/RecentChange.php +++ b/includes/RecentChange.php @@ -459,7 +459,7 @@ class RecentChange { 'rc_params' => '' ); - $rc->mExtra = array( + $rc->mExtra = array( 'prefixedDBkey' => $title->getPrefixedDBkey(), 'lastTimestamp' => $lastTimestamp, 'oldSize' => $oldSize, @@ -518,7 +518,7 @@ class RecentChange { 'rc_params' => '' ); - $rc->mExtra = array( + $rc->mExtra = array( 'prefixedDBkey' => $title->getPrefixedDBkey(), 'lastTimestamp' => 0, 'oldSize' => 0, @@ -627,7 +627,7 @@ class RecentChange { 'rc_params' => $params ); - $rc->mExtra = array( + $rc->mExtra = array( 'prefixedDBkey' => $title->getPrefixedDBkey(), 'lastTimestamp' => 0, 'actionComment' => $actionComment, // the comment appended to the action, passed from LogPage diff --git a/includes/Revision.php b/includes/Revision.php index 1ec0ef09a5..dd415657a9 100644 --- a/includes/Revision.php +++ b/includes/Revision.php @@ -558,7 +558,6 @@ class Revision implements IDBAccessObject { // Build a new revision to be saved... global $wgUser; // ugh - # if we have a content object, use it to set the model and type if ( !empty( $row['content'] ) ) { //@todo: when is that set? test with external store setup! check out insertOn() [dk] diff --git a/includes/Sanitizer.php b/includes/Sanitizer.php index ff79c5949c..2e09e687cf 100644 --- a/includes/Sanitizer.php +++ b/includes/Sanitizer.php @@ -1758,7 +1758,7 @@ class Sanitizer { // Please note strings below are enclosed in brackets [], this make the // hyphen "-" a range indicator. Hence it is double backslashed below. // See bug 26948 - $rfc5322_atext = "a-z0-9!#$%&'*+\\-\/=?^_`{|}~"; + $rfc5322_atext = "a-z0-9!#$%&'*+\\-\/=?^_`{|}~"; $rfc1034_ldh_str = "a-z0-9\\-"; $HTML5_email_regexp = "/ diff --git a/includes/Setup.php b/includes/Setup.php index 0853df124f..e87b200f54 100644 --- a/includes/Setup.php +++ b/includes/Setup.php @@ -70,7 +70,7 @@ if ( !empty( $wgActionPaths ) && !isset( $wgActionPaths['view'] ) ) { if ( $wgStylePath === false ) $wgStylePath = "$wgScriptPath/skins"; if ( $wgLocalStylePath === false ) $wgLocalStylePath = "$wgScriptPath/skins"; -if ( $wgStyleDirectory === false ) $wgStyleDirectory = "$IP/skins"; +if ( $wgStyleDirectory === false ) $wgStyleDirectory = "$IP/skins"; if ( $wgExtensionAssetsPath === false ) $wgExtensionAssetsPath = "$wgScriptPath/extensions"; if ( $wgLogo === false ) $wgLogo = "$wgStylePath/common/images/wiki.png"; diff --git a/includes/Skin.php b/includes/Skin.php index 723ede4d04..3e6b72f53b 100644 --- a/includes/Skin.php +++ b/includes/Skin.php @@ -613,7 +613,6 @@ abstract class Skin extends ContextSource { ( $this->getTitle()->getArticleID() == 0 || $action == 'history' ) ) { $n = $this->getTitle()->isDeleted(); - if ( $n ) { if ( $this->getUser()->isAllowed( 'undelete' ) ) { $msg = 'thisisdeleted'; diff --git a/includes/SkinTemplate.php b/includes/SkinTemplate.php index 86972ee9e2..e1aec17f03 100644 --- a/includes/SkinTemplate.php +++ b/includes/SkinTemplate.php @@ -273,7 +273,7 @@ class SkinTemplate extends Skin { $userLang = $this->getLanguage(); $userLangCode = $userLang->getHtmlCode(); - $userLangDir = $userLang->getDir(); + $userLangDir = $userLang->getDir(); $tpl->set( 'lang', $userLangCode ); $tpl->set( 'dir', $userLangDir ); diff --git a/includes/Title.php b/includes/Title.php index 86d15525f1..46b0524c9e 100644 --- a/includes/Title.php +++ b/includes/Title.php @@ -88,7 +88,6 @@ class Title { var $mHasSubpage; // /< Whether a page has any subpages // @} - /** * Constructor */ @@ -3212,10 +3211,10 @@ class Title { strpos( $dbkey, '.' ) !== false && ( $dbkey === '.' || $dbkey === '..' || - strpos( $dbkey, './' ) === 0 || + strpos( $dbkey, './' ) === 0 || strpos( $dbkey, '../' ) === 0 || strpos( $dbkey, '/./' ) !== false || - strpos( $dbkey, '/../' ) !== false || + strpos( $dbkey, '/../' ) !== false || substr( $dbkey, -2 ) == '/.' || substr( $dbkey, -3 ) == '/..' ) @@ -3446,7 +3445,6 @@ class Title { return $retVal; } - /** * Get a list of URLs to purge from the Squid cache when this * page changes diff --git a/includes/User.php b/includes/User.php index e3c11ccb56..4daa5d684f 100644 --- a/includes/User.php +++ b/includes/User.php @@ -574,7 +574,6 @@ class User { return false; } - // Ensure that the name can't be misresolved as a different title, // such as with extra namespace keys at the start. $parsed = Title::newFromText( $name ); @@ -1265,7 +1264,6 @@ class User { } } - /** * Get blocking information * @param $bFromSlave Bool Whether to check the slave database first. To @@ -3309,7 +3307,7 @@ class User { // since it disables the parser cache, its value will always // be 0 when this function is called by parsercache. - $confstr = $this->getOption( 'math' ); + $confstr = $this->getOption( 'math' ); $confstr .= '!' . $this->getStubThreshold(); $confstr .= '!' . ( $this->getOption( 'numberheadings' ) ? '1' : '' ); $confstr .= '!' . $wgLang->getCode(); diff --git a/includes/UserMailer.php b/includes/UserMailer.php index 7d11342ce1..03667464fd 100644 --- a/includes/UserMailer.php +++ b/includes/UserMailer.php @@ -24,7 +24,6 @@ * @author Luke Welling lwelling@wikimedia.org */ - /** * Stores a single person's name and email address. * These are passed in via the constructor, and will be returned in SMTP @@ -78,7 +77,6 @@ class MailAddress { } } - /** * Collection of static functions for sending mail */ @@ -270,7 +268,7 @@ class UserMailer { $mime = new Mail_mime( array( 'eol' => $endl ) ); $mime->setTXTBody( $body['text'] ); $mime->setHTMLBody( $body['html'] ); - $body = $mime->get(); // must call get() before headers() + $body = $mime->get(); // must call get() before headers() $headers = $mime->headers( $headers ); } } diff --git a/includes/Wiki.php b/includes/Wiki.php index 21a7d9a027..6e1795d482 100644 --- a/includes/Wiki.php +++ b/includes/Wiki.php @@ -356,10 +356,10 @@ class MediaWiki { // Check for redirects ... $action = $request->getVal( 'action', 'view' ); $file = ( $title->getNamespace() == NS_FILE ) ? $article->getFile() : null; - if ( ( $action == 'view' || $action == 'render' ) // ... for actions that show content - && !$request->getVal( 'oldid' ) && // ... and are not old revisions - !$request->getVal( 'diff' ) && // ... and not when showing diff - $request->getVal( 'redirect' ) != 'no' && // ... unless explicitly told not to + if ( ( $action == 'view' || $action == 'render' ) // ... for actions that show content + && !$request->getVal( 'oldid' ) && // ... and are not old revisions + !$request->getVal( 'diff' ) && // ... and not when showing diff + $request->getVal( 'redirect' ) != 'no' && // ... unless explicitly told not to // ... and the article is not a non-redirect image page with associated file !( is_object( $file ) && $file->exists() && !$file->getRedirected() ) ) { diff --git a/includes/WikiPage.php b/includes/WikiPage.php index 392c2d6224..4e398161ea 100644 --- a/includes/WikiPage.php +++ b/includes/WikiPage.php @@ -386,11 +386,11 @@ class WikiPage implements Page, IDBAccessObject { // Old-fashioned restrictions $this->mTitle->loadRestrictions( $data->page_restrictions ); - $this->mId = intval( $data->page_id ); - $this->mCounter = intval( $data->page_counter ); - $this->mTouched = wfTimestamp( TS_MW, $data->page_touched ); - $this->mIsRedirect = intval( $data->page_is_redirect ); - $this->mLatest = intval( $data->page_latest ); + $this->mId = intval( $data->page_id ); + $this->mCounter = intval( $data->page_counter ); + $this->mTouched = wfTimestamp( TS_MW, $data->page_touched ); + $this->mIsRedirect = intval( $data->page_is_redirect ); + $this->mLatest = intval( $data->page_latest ); // Bug 37225: $latest may no longer match the cached latest Revision object. // Double-check the ID of any cached latest Revision object for consistency. if ( $this->mLastRevision && $this->mLastRevision->getId() != $this->mLatest ) { @@ -1704,7 +1704,7 @@ class WikiPage implements Page, IDBAccessObject { $editInfo = $this->prepareContentForEdit( $content, null, $user, $serialisation_format ); $serialized = $editInfo->pst; $content = $editInfo->pstContent; - $newsize = $content->getSize(); + $newsize = $content->getSize(); $dbw = wfGetDB( DB_MASTER ); $now = wfTimestampNow(); @@ -3043,7 +3043,7 @@ class WikiPage implements Page, IDBAccessObject { } $dbw->insert( 'category', $insertRows, __METHOD__, 'IGNORE' ); - $addFields = array( 'cat_pages = cat_pages + 1' ); + $addFields = array( 'cat_pages = cat_pages + 1' ); $removeFields = array( 'cat_pages = cat_pages - 1' ); if ( $ns == NS_CATEGORY ) { diff --git a/includes/Xml.php b/includes/Xml.php index 158a6b5b10..db48cb01f3 100644 --- a/includes/Xml.php +++ b/includes/Xml.php @@ -39,7 +39,7 @@ class Xml { public static function element( $element, $attribs = null, $contents = '', $allowShortTag = true ) { $out = '<' . $element; if( !is_null( $attribs ) ) { - $out .= self::expandAttributes( $attribs ); + $out .= self::expandAttributes( $attribs ); } if( is_null( $contents ) ) { $out .= '>'; diff --git a/includes/actions/HistoryAction.php b/includes/actions/HistoryAction.php index d26228a35b..20eb30783a 100644 --- a/includes/actions/HistoryAction.php +++ b/includes/actions/HistoryAction.php @@ -145,9 +145,9 @@ class HistoryAction extends FormlessAction { /** * Add date selector to quickly get to a certain time */ - $year = $request->getInt( 'year' ); - $month = $request->getInt( 'month' ); - $tagFilter = $request->getVal( 'tagfilter' ); + $year = $request->getInt( 'year' ); + $month = $request->getInt( 'month' ); + $tagFilter = $request->getVal( 'tagfilter' ); $tagSelector = ChangeTags::buildTagFilterSelector( $tagFilter ); /** diff --git a/includes/api/ApiBase.php b/includes/api/ApiBase.php index 9e48e3a1a0..b82aadf80c 100644 --- a/includes/api/ApiBase.php +++ b/includes/api/ApiBase.php @@ -135,7 +135,6 @@ abstract class ApiBase extends ContextSource { return $this->mModuleName; } - /** * Get the module manager, or null if this module has no sub-modules * @since 1.21 @@ -429,7 +428,7 @@ abstract class ApiBase extends ContextSource { if ( $t === '' ) { $nothingPrompt = 'Can be empty, or '; } else { - $choices[] = $t; + $choices[] = $t; } } $desc .= $paramPrefix . $nothingPrompt . $prompt; diff --git a/includes/api/ApiEditPage.php b/includes/api/ApiEditPage.php index 1b9df68e1f..dc449b88b0 100644 --- a/includes/api/ApiEditPage.php +++ b/includes/api/ApiEditPage.php @@ -257,7 +257,7 @@ class ApiEditPage extends ApiBase { if ( !is_null( $params['starttimestamp'] ) && $params['starttimestamp'] != '' ) { $requestArray['wpStarttime'] = wfTimestamp( TS_MW, $params['starttimestamp'] ); } else { - $requestArray['wpStarttime'] = wfTimestampNow(); // Fake wpStartime + $requestArray['wpStarttime'] = wfTimestampNow(); // Fake wpStartime } if ( $params['minor'] || ( !$params['notminor'] && $user->getOption( 'minordefault' ) ) ) { diff --git a/includes/api/ApiLogin.php b/includes/api/ApiLogin.php index 3df952fa9f..ad048fe57e 100644 --- a/includes/api/ApiLogin.php +++ b/includes/api/ApiLogin.php @@ -147,7 +147,7 @@ class ApiLogin extends ApiBase { case LoginForm::ABORTED: $result['result'] = 'Aborted'; - $result['reason'] = $loginForm->mAbortLoginErrorMsg; + $result['reason'] = $loginForm->mAbortLoginErrorMsg; break; default: diff --git a/includes/api/ApiPageSet.php b/includes/api/ApiPageSet.php index c225b1ba7d..acf0b0c583 100644 --- a/includes/api/ApiPageSet.php +++ b/includes/api/ApiPageSet.php @@ -650,7 +650,7 @@ class ApiPageSet extends ApiBase { $this->profileDBOut(); } - $this->initFromQueryResult( $res, $remaining, false ); // process PageIDs + $this->initFromQueryResult( $res, $remaining, false ); // process PageIDs // Resolve any found redirects $this->resolvePendingRedirects(); @@ -911,7 +911,7 @@ class ApiPageSet extends ApiBase { // Variants checking global $wgContLang; if ( $this->mConvertTitles && - count( $wgContLang->getVariants() ) > 1 && + count( $wgContLang->getVariants() ) > 1 && !$titleObj->exists() ) { // Language::findVariantLink will modify titleText and titleObj into // the canonical variant if possible diff --git a/includes/api/ApiQueryAllUsers.php b/includes/api/ApiQueryAllUsers.php index 37f2b0f33f..fe19790563 100644 --- a/includes/api/ApiQueryAllUsers.php +++ b/includes/api/ApiQueryAllUsers.php @@ -161,7 +161,7 @@ class ApiQueryAllUsers extends ApiQueryBase { $this->addFields( array( 'recentedits' => 'COUNT(*)' ) ); $this->addWhere( 'rc_log_type IS NULL OR rc_log_type != ' . $db->addQuotes( 'newusers' ) ); - $timestamp = $db->timestamp( wfTimestamp( TS_UNIX ) - $wgActiveUserDays*24*3600 ); + $timestamp = $db->timestamp( wfTimestamp( TS_UNIX ) - $wgActiveUserDays * 24 * 3600 ); $this->addWhere( 'rc_timestamp >= ' . $db->addQuotes( $timestamp ) ); $this->addOption( 'GROUP BY', $userFieldToSort ); @@ -279,7 +279,7 @@ class ApiQueryAllUsers extends ApiQueryBase { if ( $fld_rights ) { if ( !isset( $lastUserData['rights'] ) ) { if ( $lastUserObj ) { - $lastUserData['rights'] = User::getGroupPermissions( $lastUserObj->getAutomaticGroups() ); + $lastUserData['rights'] = User::getGroupPermissions( $lastUserObj->getAutomaticGroups() ); } else { // This should not normally happen $lastUserData['rights'] = array(); diff --git a/includes/api/ApiQueryBacklinks.php b/includes/api/ApiQueryBacklinks.php index 0df2899792..0006da9fac 100644 --- a/includes/api/ApiQueryBacklinks.php +++ b/includes/api/ApiQueryBacklinks.php @@ -246,7 +246,7 @@ class ApiQueryBacklinks extends ApiQueryGeneratorBase { $this->params = $this->extractRequestParams( false ); $this->redirect = isset( $this->params['redirect'] ) && $this->params['redirect']; $userMax = ( $this->redirect ? ApiBase::LIMIT_BIG1 / 2 : ApiBase::LIMIT_BIG1 ); - $botMax = ( $this->redirect ? ApiBase::LIMIT_BIG2 / 2 : ApiBase::LIMIT_BIG2 ); + $botMax = ( $this->redirect ? ApiBase::LIMIT_BIG2 / 2 : ApiBase::LIMIT_BIG2 ); $result = $this->getResult(); diff --git a/includes/api/ApiQueryCategories.php b/includes/api/ApiQueryCategories.php index 2b48eb0c0c..69a6441567 100644 --- a/includes/api/ApiQueryCategories.php +++ b/includes/api/ApiQueryCategories.php @@ -53,7 +53,7 @@ class ApiQueryCategories extends ApiQueryGeneratorBase { */ private function run( $resultPageSet = null ) { if ( $this->getPageSet()->getGoodTitleCount() == 0 ) { - return; // nothing to do + return; // nothing to do } $params = $this->extractRequestParams(); diff --git a/includes/api/ApiQueryCategoryMembers.php b/includes/api/ApiQueryCategoryMembers.php index fd9d4c5785..9dbd85937c 100644 --- a/includes/api/ApiQueryCategoryMembers.php +++ b/includes/api/ApiQueryCategoryMembers.php @@ -78,7 +78,7 @@ class ApiQueryCategoryMembers extends ApiQueryGeneratorBase { $this->addFieldsIf( 'cl_timestamp', $fld_timestamp || $params['sort'] == 'timestamp' ); - $this->addTables( array( 'page', 'categorylinks' ) ); // must be in this order for 'USE INDEX' + $this->addTables( array( 'page', 'categorylinks' ) ); // must be in this order for 'USE INDEX' $this->addWhereFld( 'cl_to', $categoryTitle->getDBkey() ); $queryTypes = $params['type']; diff --git a/includes/api/ApiQueryDeletedrevs.php b/includes/api/ApiQueryDeletedrevs.php index 819c1bf8e8..31ca1ef592 100644 --- a/includes/api/ApiQueryDeletedrevs.php +++ b/includes/api/ApiQueryDeletedrevs.php @@ -116,7 +116,7 @@ class ApiQueryDeletedrevs extends ApiQueryBase { } // Check limits $userMax = $fld_content ? ApiBase::LIMIT_SML1 : ApiBase::LIMIT_BIG1; - $botMax = $fld_content ? ApiBase::LIMIT_SML2 : ApiBase::LIMIT_BIG2; + $botMax = $fld_content ? ApiBase::LIMIT_SML2 : ApiBase::LIMIT_BIG2; $limit = $params['limit']; diff --git a/includes/api/ApiQueryExtLinksUsage.php b/includes/api/ApiQueryExtLinksUsage.php index 98380d66c7..eb9cdf9e92 100644 --- a/includes/api/ApiQueryExtLinksUsage.php +++ b/includes/api/ApiQueryExtLinksUsage.php @@ -55,7 +55,7 @@ class ApiQueryExtLinksUsage extends ApiQueryGeneratorBase { $query = $params['query']; $protocol = self::getProtocolPrefix( $params['protocol'] ); - $this->addTables( array( 'page', 'externallinks' ) ); // must be in this order for 'USE INDEX' + $this->addTables( array( 'page', 'externallinks' ) ); // must be in this order for 'USE INDEX' $this->addOption( 'USE INDEX', 'el_index' ); $this->addWhere( 'page_id=el_from' ); diff --git a/includes/api/ApiQueryFilearchive.php b/includes/api/ApiQueryFilearchive.php index 8718371909..021074a9fb 100644 --- a/includes/api/ApiQueryFilearchive.php +++ b/includes/api/ApiQueryFilearchive.php @@ -207,7 +207,6 @@ class ApiQueryFilearchive extends ApiQueryBase { $file['suppressed'] = ''; } - $fit = $result->addValue( array( 'query', $this->getModuleName() ), null, $file ); if ( !$fit ) { $this->setContinueEnumParameter( 'continue', $row->fa_name ); diff --git a/includes/api/ApiQueryImages.php b/includes/api/ApiQueryImages.php index aa7359b967..f2bf0a7b48 100644 --- a/includes/api/ApiQueryImages.php +++ b/includes/api/ApiQueryImages.php @@ -49,7 +49,7 @@ class ApiQueryImages extends ApiQueryGeneratorBase { */ private function run( $resultPageSet = null ) { if ( $this->getPageSet()->getGoodTitleCount() == 0 ) { - return; // nothing to do + return; // nothing to do } $params = $this->extractRequestParams(); diff --git a/includes/api/ApiQueryLinks.php b/includes/api/ApiQueryLinks.php index 69d81ae365..937f4f1376 100644 --- a/includes/api/ApiQueryLinks.php +++ b/includes/api/ApiQueryLinks.php @@ -79,7 +79,7 @@ class ApiQueryLinks extends ApiQueryGeneratorBase { */ private function run( $resultPageSet = null ) { if ( $this->getPageSet()->getGoodTitleCount() == 0 ) { - return; // nothing to do + return; // nothing to do } $params = $this->extractRequestParams(); diff --git a/includes/api/ApiQueryRevisions.php b/includes/api/ApiQueryRevisions.php index 9b54ee5194..518266fad4 100644 --- a/includes/api/ApiQueryRevisions.php +++ b/includes/api/ApiQueryRevisions.php @@ -95,7 +95,6 @@ class ApiQueryRevisions extends ApiQueryBase { !is_null( $params['endid'] ) || $params['dir'] === 'newer' || !is_null( $params['start'] ) || !is_null( $params['end'] ) ); - $pageSet = $this->getPageSet(); $pageCount = $pageSet->getGoodTitleCount(); $revCount = $pageSet->getRevisionCount(); @@ -168,7 +167,7 @@ class ApiQueryRevisions extends ApiQueryBase { $index = array(); $userMax = ( $this->fld_content ? ApiBase::LIMIT_SML1 : ApiBase::LIMIT_BIG1 ); - $botMax = ( $this->fld_content ? ApiBase::LIMIT_SML2 : ApiBase::LIMIT_BIG2 ); + $botMax = ( $this->fld_content ? ApiBase::LIMIT_SML2 : ApiBase::LIMIT_BIG2 ); $limit = $params['limit']; if ( $limit == 'max' ) { $limit = $this->getMain()->canApiHighLimits() ? $botMax : $userMax; diff --git a/includes/api/ApiQueryUserInfo.php b/includes/api/ApiQueryUserInfo.php index 963c8f8d8d..1a491eca29 100644 --- a/includes/api/ApiQueryUserInfo.php +++ b/includes/api/ApiQueryUserInfo.php @@ -77,18 +77,18 @@ class ApiQueryUserInfo extends ApiQueryBase { if ( isset( $this->prop['groups'] ) ) { $vals['groups'] = $user->getEffectiveGroups(); - $result->setIndexedTagName( $vals['groups'], 'g' ); // even if empty + $result->setIndexedTagName( $vals['groups'], 'g' ); // even if empty } if ( isset( $this->prop['implicitgroups'] ) ) { $vals['implicitgroups'] = $user->getAutomaticGroups(); - $result->setIndexedTagName( $vals['implicitgroups'], 'g' ); // even if empty + $result->setIndexedTagName( $vals['implicitgroups'], 'g' ); // even if empty } if ( isset( $this->prop['rights'] ) ) { // User::getRights() may return duplicate values, strip them $vals['rights'] = array_values( array_unique( $user->getRights() ) ); - $result->setIndexedTagName( $vals['rights'], 'r' ); // even if empty + $result->setIndexedTagName( $vals['rights'], 'r' ); // even if empty } if ( isset( $this->prop['changeablegroups'] ) ) { diff --git a/includes/api/ApiUpload.php b/includes/api/ApiUpload.php index 05d3b5afa5..e2e53f8fd8 100644 --- a/includes/api/ApiUpload.php +++ b/includes/api/ApiUpload.php @@ -515,7 +515,6 @@ class ApiUpload extends ApiBase { } } - /** * Check warnings. * Returns a suitable array for inclusion into API results if there were warnings @@ -553,7 +552,6 @@ class ApiUpload extends ApiBase { return $warnings; } - /** * Perform the actual upload. Returns a suitable result array on success; * dies on failure. diff --git a/includes/cache/BacklinkCache.php b/includes/cache/BacklinkCache.php index a4aa79efc5..11e1e7bbb1 100644 --- a/includes/cache/BacklinkCache.php +++ b/includes/cache/BacklinkCache.php @@ -222,11 +222,11 @@ class BacklinkCache { */ protected function getPrefix( $table ) { static $prefixes = array( - 'pagelinks' => 'pl', - 'imagelinks' => 'il', + 'pagelinks' => 'pl', + 'imagelinks' => 'il', 'categorylinks' => 'cl', 'templatelinks' => 'tl', - 'redirect' => 'rd', + 'redirect' => 'rd', ); if ( isset( $prefixes[$table] ) ) { @@ -259,14 +259,14 @@ class BacklinkCache { case 'templatelinks': $conds = array( "{$prefix}_namespace" => $this->title->getNamespace(), - "{$prefix}_title" => $this->title->getDBkey(), + "{$prefix}_title" => $this->title->getDBkey(), "page_id={$prefix}_from" ); break; case 'redirect': $conds = array( "{$prefix}_namespace" => $this->title->getNamespace(), - "{$prefix}_title" => $this->title->getDBkey(), + "{$prefix}_title" => $this->title->getDBkey(), $this->getDb()->makeList( array( "{$prefix}_interwiki" => '', "{$prefix}_interwiki IS NULL", @@ -394,7 +394,6 @@ class BacklinkCache { return $cacheEntry['batches']; } - // 4) ... finally fetch from the slow database :( $this->getLinks( $table ); $cacheEntry = $this->partitionResult( $this->fullResultCache[$table], $batchSize ); diff --git a/includes/cache/LocalisationCache.php b/includes/cache/LocalisationCache.php index dc3151e8b3..49be39dfb0 100644 --- a/includes/cache/LocalisationCache.php +++ b/includes/cache/LocalisationCache.php @@ -538,7 +538,6 @@ class LocalisationCache { } } - /** * Load a plural XML file with the given filename, compile the relevant * rules, and save the compiled rules in a process-local cache. diff --git a/includes/cache/SquidUpdate.php b/includes/cache/SquidUpdate.php index 784e30eec8..54c5909a49 100644 --- a/includes/cache/SquidUpdate.php +++ b/includes/cache/SquidUpdate.php @@ -61,7 +61,7 @@ class SquidUpdate { array( 'page_namespace', 'page_title' ), array( 'pl_namespace' => $title->getNamespace(), - 'pl_title' => $title->getDBkey(), + 'pl_title' => $title->getDBkey(), 'pl_from=page_id' ), __METHOD__ ); $blurlArr = $title->getSquidURLs(); diff --git a/includes/content/AbstractContent.php b/includes/content/AbstractContent.php index e14fb56f7d..68092c380c 100644 --- a/includes/content/AbstractContent.php +++ b/includes/content/AbstractContent.php @@ -203,7 +203,6 @@ abstract class AbstractContent implements Content { return $this->getNativeData() === $that->getNativeData(); } - /** * Returns a list of DataUpdate objects for recording information about this * Content in some secondary data store. @@ -243,7 +242,6 @@ abstract class AbstractContent implements Content { return $parserOutput->getSecondaryDataUpdates( $title, $recursive ); } - /** * @see Content::getRedirectChain * diff --git a/includes/content/CssContent.php b/includes/content/CssContent.php index 3d4eb241fb..75f1aa0cd0 100644 --- a/includes/content/CssContent.php +++ b/includes/content/CssContent.php @@ -54,7 +54,6 @@ class CssContent extends TextContent { return new CssContent( $pst ); } - protected function getHtml( ) { $html = ""; $html .= "
\n";
diff --git a/includes/content/JavaScriptContent.php b/includes/content/JavaScriptContent.php
index 7508079a2e..52211683db 100644
--- a/includes/content/JavaScriptContent.php
+++ b/includes/content/JavaScriptContent.php
@@ -55,7 +55,6 @@ class JavaScriptContent extends TextContent {
 		return new JavaScriptContent( $pst );
 	}
 
-
 	protected function getHtml( ) {
 		$html = "";
 		$html .= "
\n";
diff --git a/includes/content/TextContent.php b/includes/content/TextContent.php
index 0f7a53152c..23d21ec48d 100644
--- a/includes/content/TextContent.php
+++ b/includes/content/TextContent.php
@@ -186,7 +186,6 @@ class TextContent extends AbstractContent {
 		return $diff;
 	}
 
-
 	/**
 	 * Returns a generic ParserOutput object, wrapping the HTML returned by
 	 * getHtml().
diff --git a/includes/content/WikitextContentHandler.php b/includes/content/WikitextContentHandler.php
index f78ccbb53d..e1dcc668e0 100644
--- a/includes/content/WikitextContentHandler.php
+++ b/includes/content/WikitextContentHandler.php
@@ -49,7 +49,6 @@ class WikitextContentHandler extends TextContentHandler {
 		return new WikitextContent( '' );
 	}
 
-
 	/**
 	 * Returns a WikitextContent object representing a redirect to the given destination page.
 	 *
diff --git a/includes/dao/IDBAccessObject.php b/includes/dao/IDBAccessObject.php
index f847b98e9f..4eb6ff3ed2 100644
--- a/includes/dao/IDBAccessObject.php
+++ b/includes/dao/IDBAccessObject.php
@@ -46,7 +46,7 @@
  */
 interface IDBAccessObject {
 	// Constants for object loading bitfield flags (higher => higher QoS)
-	const READ_LATEST  = 1; // read from the master
+	const READ_LATEST = 1; // read from the master
 	const READ_LOCKING = 3; // READ_LATEST and "FOR UPDATE"
 
 	// Convenience constant for callers to explicitly request slave data
diff --git a/includes/db/Database.php b/includes/db/Database.php
index ff2f7f7593..275a94c3e7 100644
--- a/includes/db/Database.php
+++ b/includes/db/Database.php
@@ -282,7 +282,6 @@ abstract class DatabaseBase implements DatabaseType {
 	 */
 	protected $fileHandle = null;
 
-
 # ------------------------------------------------------------------------------
 # Accessors
 # ------------------------------------------------------------------------------
@@ -2070,7 +2069,7 @@ abstract class DatabaseBase implements DatabaseType {
 				&& in_array( $table, $wgSharedTables ) # A shared table is selected
 			) {
 				$database = $wgSharedDB;
-				$prefix   = $wgSharedPrefix === null ? $this->mTablePrefix : $wgSharedPrefix;
+				$prefix = $wgSharedPrefix === null ? $this->mTablePrefix : $wgSharedPrefix;
 			} else {
 				$database = null;
 				$prefix = $this->mTablePrefix; # Default prefix
diff --git a/includes/db/DatabaseError.php b/includes/db/DatabaseError.php
index 18b2733e8c..65dd5412e6 100644
--- a/includes/db/DatabaseError.php
+++ b/includes/db/DatabaseError.php
@@ -153,7 +153,7 @@ class DBConnectionError extends DBError {
 
 		$sorry = htmlspecialchars( $this->msg( 'dberr-problems', 'Sorry! This site is experiencing technical difficulties.' ) );
 		$again = htmlspecialchars( $this->msg( 'dberr-again', 'Try waiting a few minutes and reloading.' ) );
-		$info  = htmlspecialchars( $this->msg( 'dberr-info', '(Can\'t contact the database server: $1)' ) );
+		$info = htmlspecialchars( $this->msg( 'dberr-info', '(Can\'t contact the database server: $1)' ) );
 
 		# No database access
 		MessageCache::singleton()->disable();
diff --git a/includes/db/DatabaseMssql.php b/includes/db/DatabaseMssql.php
index 1c920cb96b..f329f8c0c9 100644
--- a/includes/db/DatabaseMssql.php
+++ b/includes/db/DatabaseMssql.php
@@ -813,8 +813,6 @@ class DatabaseMssql extends DatabaseBase {
 						TO $newUser
 						;
 					" );
-
-
 	}
 
 	function encodeBlob( $b ) {
diff --git a/includes/db/DatabasePostgres.php b/includes/db/DatabasePostgres.php
index 2cbcc4b277..6f7d1fa9aa 100644
--- a/includes/db/DatabasePostgres.php
+++ b/includes/db/DatabasePostgres.php
@@ -482,7 +482,6 @@ class DatabasePostgres extends DatabaseBase {
 		parent::reportQueryError( $error, $errno, $sql, $fname, false );
 	}
 
-
 	function queryIgnore( $sql, $fname = 'DatabasePostgres::queryIgnore' ) {
 		return $this->query( $sql, $fname, true );
 	}
@@ -703,7 +702,6 @@ __INDEXATTR__;
 		return $a;
 	}
 
-
 	function indexUnique( $table, $index, $fname = 'DatabasePostgres::indexUnique' ) {
 		$sql = "SELECT indexname FROM pg_indexes WHERE tablename='{$table}'".
 			" AND indexdef LIKE 'CREATE UNIQUE%(" .
@@ -1062,7 +1060,6 @@ __INDEXATTR__;
 		return '[http://www.postgresql.org/ PostgreSQL]';
 	}
 
-
 	/**
 	 * Return current schema (executes SELECT current_schema())
 	 * Needs transaction
@@ -1466,7 +1463,7 @@ SQL;
 	 */
 	public function lock( $lockName, $method, $timeout = 5 ) {
 		$key = $this->addQuotes( $this->bigintFromLockName( $lockName ) );
-		for ( $attempts=1; $attempts <= $timeout; ++$attempts ) {
+		for ( $attempts = 1; $attempts <= $timeout; ++$attempts ) {
 			$result = $this->query(
 				"SELECT pg_try_advisory_lock($key) AS lockstatus", $method );
 			$row = $this->fetchObject( $result );
diff --git a/includes/db/DatabaseSqlite.php b/includes/db/DatabaseSqlite.php
index 74bd9b7a8d..320f088f79 100644
--- a/includes/db/DatabaseSqlite.php
+++ b/includes/db/DatabaseSqlite.php
@@ -597,7 +597,7 @@ class DatabaseSqlite extends DatabaseBase {
 	 * @return bool
 	 */
 	function wasErrorReissuable() {
-		return $this->lastErrno() ==  17; // SQLITE_SCHEMA;
+		return $this->lastErrno() == 17; // SQLITE_SCHEMA;
 	}
 
 	/**
@@ -831,7 +831,6 @@ class DatabaseSqlite extends DatabaseBase {
 		return $this->query( $sql, $fname );
 	}
 
-
 	/**
 	 * List all tables on the database
 	 *
diff --git a/includes/db/DatabaseUtility.php b/includes/db/DatabaseUtility.php
index 5e110767a3..3f310d9136 100644
--- a/includes/db/DatabaseUtility.php
+++ b/includes/db/DatabaseUtility.php
@@ -219,9 +219,9 @@ class ResultWrapper implements Iterator {
  * doesn't go anywhere near an actual database.
  */
 class FakeResultWrapper extends ResultWrapper {
-	var $result     = array();
-	var $db         = null;	// And it's going to stay that way :D
-	var $pos        = 0;
+	var $result = array();
+	var $db = null; // And it's going to stay that way :D
+	var $pos = 0;
 	var $currentRow = null;
 
 	function __construct( $array ) {
diff --git a/includes/db/IORMRow.php b/includes/db/IORMRow.php
index 6a7a5bb3aa..6bc0cdd27f 100644
--- a/includes/db/IORMRow.php
+++ b/includes/db/IORMRow.php
@@ -33,7 +33,6 @@
 
 interface IORMRow {
 
-
 	/**
 	 * Constructor.
 	 *
diff --git a/includes/db/IORMTable.php b/includes/db/IORMTable.php
index e46dbc0078..d8e7130f3f 100644
--- a/includes/db/IORMTable.php
+++ b/includes/db/IORMTable.php
@@ -311,7 +311,6 @@ interface IORMTable {
 	 */
 	public function setReadDb( $db );
 
-
 	/**
 	 * Get the ID of the any foreign wiki to use as a target for database operations
 	 *
diff --git a/includes/db/LBFactory_Multi.php b/includes/db/LBFactory_Multi.php
index 88b7500245..1c33cdc5f1 100644
--- a/includes/db/LBFactory_Multi.php
+++ b/includes/db/LBFactory_Multi.php
@@ -21,7 +21,6 @@
  * @ingroup Database
  */
 
-
 /**
  * A multi-wiki, multi-master factory for Wikimedia and similar installations.
  * Ignores the old configuration globals
diff --git a/includes/db/LoadBalancer.php b/includes/db/LoadBalancer.php
index 20d9ca9aed..cbd79c348d 100644
--- a/includes/db/LoadBalancer.php
+++ b/includes/db/LoadBalancer.php
@@ -323,7 +323,7 @@ class LoadBalancer {
 					$this->mServers[$i]['slave pos'] = $conn->getSlavePos();
 				}
 			}
-			if ( $this->mReadIndex <=0 && $this->mLoads[$i]>0 && $i !== false ) {
+			if ( $this->mReadIndex <= 0 && $this->mLoads[$i] > 0 && $i !== false ) {
 				$this->mReadIndex = $i;
 			}
 		}
diff --git a/includes/db/ORMTable.php b/includes/db/ORMTable.php
index 06f88c1829..085c9c5ab5 100644
--- a/includes/db/ORMTable.php
+++ b/includes/db/ORMTable.php
@@ -201,7 +201,7 @@ class ORMTable extends DBAccessBase implements IORMTable {
 	 * @return ORMResult
 	 */
 	public function select( $fields = null, array $conditions = array(),
-							array $options = array(), $functionName  = null ) {
+							array $options = array(), $functionName = null ) {
 		$res = $this->rawSelect( $fields, $conditions, $options, $functionName );
 		return new ORMResult( $this, $res );
 	}
@@ -221,7 +221,7 @@ class ORMTable extends DBAccessBase implements IORMTable {
 	 * @throws DBQueryError if the query failed (even if the database was in ignoreErrors mode).
 	 */
 	public function selectObjects( $fields = null, array $conditions = array(),
-								   array $options = array(), $functionName  = null ) {
+								   array $options = array(), $functionName = null ) {
 		$result = $this->selectFields( $fields, $conditions, $options, false, $functionName );
 
 		$objects = array();
@@ -247,7 +247,7 @@ class ORMTable extends DBAccessBase implements IORMTable {
 	 * @throws DBQueryError if the quey failed (even if the database was in ignoreErrors mode).
 	 */
 	public function rawSelect( $fields = null, array $conditions = array(),
-							   array $options = array(), $functionName  = null ) {
+							   array $options = array(), $functionName = null ) {
 		if ( is_null( $fields ) ) {
 			$fields = array_keys( $this->getFields() );
 		}
@@ -313,7 +313,7 @@ class ORMTable extends DBAccessBase implements IORMTable {
 	 * @return array of array
 	 */
 	public function selectFields( $fields = null, array $conditions = array(),
-								  array $options = array(), $collapse = true, $functionName  = null ) {
+								  array $options = array(), $collapse = true, $functionName = null ) {
 		$objects = array();
 
 		$result = $this->rawSelect( $fields, $conditions, $options, $functionName );
diff --git a/includes/diff/DairikiDiff.php b/includes/diff/DairikiDiff.php
index 6ef5fcbade..94ffc06674 100644
--- a/includes/diff/DairikiDiff.php
+++ b/includes/diff/DairikiDiff.php
@@ -780,7 +780,6 @@ class Diff {
 			trigger_error( "Reversed closing doesn't match", E_USER_ERROR );
 		}
 
-
 		$prevtype = 'none';
 		foreach ( $this->edits as $edit ) {
 			if ( $prevtype == $edit->type ) {
diff --git a/includes/diff/DifferenceEngine.php b/includes/diff/DifferenceEngine.php
index c8f1d7f54d..c6e745b457 100644
--- a/includes/diff/DifferenceEngine.php
+++ b/includes/diff/DifferenceEngine.php
@@ -887,7 +887,6 @@ class DifferenceEngine extends ContextSource {
 		return $this->msg( 'lineno' )->numParams( $matches[1] )->escaped();
 	}
 
-
 	/**
 	 * If there are revisions between the ones being compared, return a note saying so.
 	 * @return string
diff --git a/includes/diff/WikiDiff3.php b/includes/diff/WikiDiff3.php
index 4ce9f19055..10a6d451b4 100644
--- a/includes/diff/WikiDiff3.php
+++ b/includes/diff/WikiDiff3.php
@@ -490,7 +490,6 @@ class WikiDiff3 {
 
 		$temp = array( 0, 0, 0 );
 
-
 		$max_progress = array_fill( 0, ceil( max( $forward_end_diag - $forward_start_diag,
 				$backward_end_diag - $backward_start_diag ) / 2 ), $temp );
 		$num_progress = 0; // the 1st entry is current, it is initialized
diff --git a/includes/filebackend/FSFileBackend.php b/includes/filebackend/FSFileBackend.php
index a1d46c13d4..9cdb8568a0 100644
--- a/includes/filebackend/FSFileBackend.php
+++ b/includes/filebackend/FSFileBackend.php
@@ -70,7 +70,7 @@ class FSFileBackend extends FileBackendStore {
 		if ( isset( $config['containerPaths'] ) ) {
 			$this->containerPaths = (array)$config['containerPaths'];
 			foreach ( $this->containerPaths as &$path ) {
-				$path = rtrim( $path, '/' );  // remove trailing slash
+				$path = rtrim( $path, '/' ); // remove trailing slash
 			}
 		}
 
diff --git a/includes/filebackend/FileBackendMultiWrite.php b/includes/filebackend/FileBackendMultiWrite.php
index a5f507397d..e6fe147f37 100644
--- a/includes/filebackend/FileBackendMultiWrite.php
+++ b/includes/filebackend/FileBackendMultiWrite.php
@@ -303,8 +303,8 @@ class FileBackendMultiWrite extends FileBackend {
 
 		$mBackend = $this->backends[$this->masterIndex];
 		foreach ( $paths as $path ) {
-			$mPath  = $this->substPaths( $path, $mBackend );
-			$mSha1  = $mBackend->getFileSha1Base36( array( 'src' => $mPath ) );
+			$mPath = $this->substPaths( $path, $mBackend );
+			$mSha1 = $mBackend->getFileSha1Base36( array( 'src' => $mPath ) );
 			$mExist = $mBackend->fileExists( array( 'src' => $mPath ) );
 			// Check if the master backend is available...
 			if ( $mExist === null ) {
diff --git a/includes/filebackend/FileBackendStore.php b/includes/filebackend/FileBackendStore.php
index 53c2698e0d..35384c7fee 100644
--- a/includes/filebackend/FileBackendStore.php
+++ b/includes/filebackend/FileBackendStore.php
@@ -57,8 +57,8 @@ abstract class FileBackendStore extends FileBackend {
 	 */
 	public function __construct( array $config ) {
 		parent::__construct( $config );
-		$this->memCache       = new EmptyBagOStuff(); // disabled by default
-		$this->cheapCache     = new ProcessCacheLRU( 300 );
+		$this->memCache = new EmptyBagOStuff(); // disabled by default
+		$this->cheapCache = new ProcessCacheLRU( 300 );
 		$this->expensiveCache = new ProcessCacheLRU( 5 );
 	}
 
diff --git a/includes/filebackend/SwiftFileBackend.php b/includes/filebackend/SwiftFileBackend.php
index 9c271ea2d2..429822106c 100644
--- a/includes/filebackend/SwiftFileBackend.php
+++ b/includes/filebackend/SwiftFileBackend.php
@@ -201,7 +201,7 @@ class SwiftFileBackend extends FileBackendStore {
 		$res = '';
 		foreach ( explode( ';', $disposition ) as $part ) {
 			$part = trim( $part );
-			$new  = ( $res === '' ) ? $part : "{$res};{$part}";
+			$new = ( $res === '' ) ? $part : "{$res};{$part}";
 			if ( strlen( $new ) <= 255 ) {
 				$res = $new;
 			} else {
diff --git a/includes/filerepo/FileRepo.php b/includes/filerepo/FileRepo.php
index 6dbe2458d4..03d6ea97e0 100644
--- a/includes/filerepo/FileRepo.php
+++ b/includes/filerepo/FileRepo.php
@@ -775,7 +775,7 @@ class FileRepo {
 				throw new MWException( 'Validation error in $dstRel' );
 			}
 			$dstPath = "$root/$dstRel";
-			$dstDir  = dirname( $dstPath );
+			$dstDir = dirname( $dstPath );
 			// Create destination directories for this triplet
 			if ( !$this->initDirectory( $dstDir )->isOK() ) {
 				return $this->newFatal( 'directorycreateerror', $dstDir );
@@ -965,10 +965,10 @@ class FileRepo {
 	public function storeTemp( $originalName, $srcPath ) {
 		$this->assertWritableRepo(); // fail out if read-only
 
-		$date       = gmdate( "YmdHis" );
-		$hashPath   = $this->getHashPath( $originalName );
-		$dstRel     = "{$hashPath}{$date}!{$originalName}";
-		$dstUrlRel  = $hashPath . $date . '!' . rawurlencode( $originalName );
+		$date = gmdate( "YmdHis" );
+		$hashPath = $this->getHashPath( $originalName );
+		$dstRel = "{$hashPath}{$date}!{$originalName}";
+		$dstUrlRel = $hashPath . $date . '!' . rawurlencode( $originalName );
 		$virtualUrl = $this->getVirtualUrl( 'temp' ) . '/' . $dstUrlRel;
 
 		$result = $this->quickImport( $srcPath, $virtualUrl );
@@ -1622,7 +1622,7 @@ class FileRepo {
 	 */
 	public function nameForThumb( $name ) {
 		if ( strlen( $name ) > $this->abbrvThreshold ) {
-			$ext  = FileBackend::extensionFromPath( $name );
+			$ext = FileBackend::extensionFromPath( $name );
 			$name = ( $ext == '' ) ? 'thumbnail' : "thumbnail.$ext";
 		}
 		return $name;
diff --git a/includes/filerepo/ForeignAPIRepo.php b/includes/filerepo/ForeignAPIRepo.php
index 98a21f741c..48a3598eee 100644
--- a/includes/filerepo/ForeignAPIRepo.php
+++ b/includes/filerepo/ForeignAPIRepo.php
@@ -320,7 +320,6 @@ class ForeignAPIRepo extends FileRepo {
 			return false;
 		}
 
-
 		# @todo FIXME: Delete old thumbs that aren't being used. Maintenance script?
 		$backend->prepare( array( 'dir' => dirname( $localFilename ) ) );
 		$params = array( 'dst' => $localFilename, 'content' => $thumb );
diff --git a/includes/filerepo/LocalRepo.php b/includes/filerepo/LocalRepo.php
index 229f8bf668..5121c4dd45 100644
--- a/includes/filerepo/LocalRepo.php
+++ b/includes/filerepo/LocalRepo.php
@@ -168,7 +168,7 @@ class LocalRepo extends FileRepo {
 			$expiry = 86400; // has invalidation, 1 day
 		}
 		$cachedValue = $wgMemc->get( $memcKey );
-		if ( $cachedValue === ' '  || $cachedValue === '' ) {
+		if ( $cachedValue === ' ' || $cachedValue === '' ) {
 			// Does not exist
 			return false;
 		} elseif ( strval( $cachedValue ) !== '' ) {
@@ -217,7 +217,7 @@ class LocalRepo extends FileRepo {
 				'page_namespace' => $title->getNamespace(),
 				'page_title' => $title->getDBkey(),
 			),
-			__METHOD__  //Function name
+			__METHOD__ //Function name
 		);
 		return $id;
 	}
diff --git a/includes/filerepo/file/LocalFile.php b/includes/filerepo/file/LocalFile.php
index 11eab1e482..d9ba4e47cd 100644
--- a/includes/filerepo/file/LocalFile.php
+++ b/includes/filerepo/file/LocalFile.php
@@ -266,7 +266,7 @@ class LocalFile extends File {
 		// If the cache value gets to large it will not fit in memcached and nothing will
 		// get cached at all, causing master queries for any file access.
 		foreach ( $this->getLazyCacheFields( '' ) as $field ) {
-			if ( isset( $cache[$field] ) && strlen( $cache[$field] ) > 100*1024 ) {
+			if ( isset( $cache[$field] ) && strlen( $cache[$field] ) > 100 * 1024 ) {
 				unset( $cache[$field] ); // don't let the value get too big
 			}
 		}
@@ -2634,7 +2634,7 @@ class LocalFileMoveBatch {
 	 */
 	function getMoveTriplets() {
 		$moves = array_merge( array( $this->cur ), $this->olds );
-		$triplets = array();	// The format is: (srcUrl, destZone, destUrl)
+		$triplets = array(); // The format is: (srcUrl, destZone, destUrl)
 
 		foreach ( $moves as $move ) {
 			// $move: (oldRelativePath, newRelativePath)
diff --git a/includes/installer/Installer.php b/includes/installer/Installer.php
index 850fb31578..c1af27cc3d 100644
--- a/includes/installer/Installer.php
+++ b/includes/installer/Installer.php
@@ -1089,7 +1089,6 @@ abstract class Installer {
 		}
 	}
 
-
 	/**
 	 * Check the libicu version
 	 */
diff --git a/includes/installer/LocalSettingsGenerator.php b/includes/installer/LocalSettingsGenerator.php
index bbc6b64efa..e9bb907e9d 100644
--- a/includes/installer/LocalSettingsGenerator.php
+++ b/includes/installer/LocalSettingsGenerator.php
@@ -255,59 +255,59 @@ if ( !defined( 'MEDIAWIKI' ) ) {
 ## Uncomment this to disable output compression
 # \$wgDisableOutputCompression = true;
 
-\$wgSitename      = \"{$this->values['wgSitename']}\";
+\$wgSitename = \"{$this->values['wgSitename']}\";
 {$metaNamespace}
 ## The URL base path to the directory containing the wiki;
 ## defaults for all runtime URL paths are based off of this.
 ## For more information on customizing the URLs
 ## (like /w/index.php/Page_title to /wiki/Page_title) please see:
 ## http://www.mediawiki.org/wiki/Manual:Short_URL
-\$wgScriptPath       = \"{$this->values['wgScriptPath']}\";
-\$wgScriptExtension  = \"{$this->values['wgScriptExtension']}\";
+\$wgScriptPath = \"{$this->values['wgScriptPath']}\";
+\$wgScriptExtension = \"{$this->values['wgScriptExtension']}\";
 
 ## The protocol and server name to use in fully-qualified URLs
-\$wgServer           = \"{$this->values['wgServer']}\";
+\$wgServer = \"{$this->values['wgServer']}\";
 
 ## The relative URL path to the skins directory
-\$wgStylePath        = \"\$wgScriptPath/skins\";
+\$wgStylePath = \"\$wgScriptPath/skins\";
 
 ## The relative URL path to the logo.  Make sure you change this from the default,
 ## or else you'll overwrite your logo when you upgrade!
-\$wgLogo             = \"\$wgStylePath/common/images/wiki.png\";
+\$wgLogo = \"\$wgStylePath/common/images/wiki.png\";
 
 ## UPO means: this is also a user preference option
 
-\$wgEnableEmail      = {$this->values['wgEnableEmail']};
-\$wgEnableUserEmail  = {$this->values['wgEnableUserEmail']}; # UPO
+\$wgEnableEmail = {$this->values['wgEnableEmail']};
+\$wgEnableUserEmail = {$this->values['wgEnableUserEmail']}; # UPO
 
 \$wgEmergencyContact = \"{$this->values['wgEmergencyContact']}\";
-\$wgPasswordSender   = \"{$this->values['wgPasswordSender']}\";
+\$wgPasswordSender = \"{$this->values['wgPasswordSender']}\";
 
-\$wgEnotifUserTalk      = {$this->values['wgEnotifUserTalk']}; # UPO
-\$wgEnotifWatchlist     = {$this->values['wgEnotifWatchlist']}; # UPO
+\$wgEnotifUserTalk = {$this->values['wgEnotifUserTalk']}; # UPO
+\$wgEnotifWatchlist = {$this->values['wgEnotifWatchlist']}; # UPO
 \$wgEmailAuthentication = {$this->values['wgEmailAuthentication']};
 
 ## Database settings
-\$wgDBtype           = \"{$this->values['wgDBtype']}\";
-\$wgDBserver         = \"{$this->values['wgDBserver']}\";
-\$wgDBname           = \"{$this->values['wgDBname']}\";
-\$wgDBuser           = \"{$this->values['wgDBuser']}\";
-\$wgDBpassword       = \"{$this->values['wgDBpassword']}\";
+\$wgDBtype = \"{$this->values['wgDBtype']}\";
+\$wgDBserver = \"{$this->values['wgDBserver']}\";
+\$wgDBname = \"{$this->values['wgDBname']}\";
+\$wgDBuser = \"{$this->values['wgDBuser']}\";
+\$wgDBpassword = \"{$this->values['wgDBpassword']}\";
 
 {$this->dbSettings}
 
 ## Shared memory settings
-\$wgMainCacheType    = $cacheType;
+\$wgMainCacheType = $cacheType;
 \$wgMemCachedServers = $mcservers;
 
 ## To enable image uploads, make sure the 'images' directory
 ## is writable, then set this to true:
-\$wgEnableUploads  = {$this->values['wgEnableUploads']};
+\$wgEnableUploads = {$this->values['wgEnableUploads']};
 {$magic}\$wgUseImageMagick = true;
 {$magic}\$wgImageMagickConvertCommand = \"{$this->values['wgImageMagickConvertCommand']}\";
 
 # InstantCommons allows wiki to use images from http://commons.wikimedia.org
-\$wgUseInstantCommons  = {$this->values['wgUseInstantCommons']};
+\$wgUseInstantCommons = {$this->values['wgUseInstantCommons']};
 
 ## If you use ImageMagick (or any other shell command) on a
 ## Linux server, this will need to be set to the name of an
@@ -342,7 +342,7 @@ if ( !defined( 'MEDIAWIKI' ) ) {
 ## appropriate copyright notice / icon. GNU Free Documentation
 ## License and Creative Commons licenses are supported so far.
 \$wgRightsPage = \"\"; # Set to the title of a wiki page that describes your license/copyright
-\$wgRightsUrl  = \"{$this->values['wgRightsUrl']}\";
+\$wgRightsUrl = \"{$this->values['wgRightsUrl']}\";
 \$wgRightsText = \"{$this->values['wgRightsText']}\";
 \$wgRightsIcon = \"{$this->values['wgRightsIcon']}\";
 
diff --git a/includes/installer/MysqlInstaller.php b/includes/installer/MysqlInstaller.php
index 4eb2d396aa..fef2d35e5e 100644
--- a/includes/installer/MysqlInstaller.php
+++ b/includes/installer/MysqlInstaller.php
@@ -637,10 +637,10 @@ class MysqlInstaller extends DatabaseInstaller {
 		$tblOpts = LocalSettingsGenerator::escapePhpString( $this->getTableOptions() );
 		return
 "# MySQL specific settings
-\$wgDBprefix         = \"{$prefix}\";
+\$wgDBprefix = \"{$prefix}\";
 
 # MySQL table options to use during installation or update
-\$wgDBTableOptions   = \"{$tblOpts}\";
+\$wgDBTableOptions = \"{$tblOpts}\";
 
 # Experimental charset support for MySQL 5.0.
 \$wgDBmysql5 = {$dbmysql5};";
diff --git a/includes/installer/MysqlUpdater.php b/includes/installer/MysqlUpdater.php
index 6a2d50fee0..6ca70f3241 100644
--- a/includes/installer/MysqlUpdater.php
+++ b/includes/installer/MysqlUpdater.php
@@ -416,7 +416,7 @@ class MysqlUpdater extends DatabaseUpdater {
 				if ( $prev_title == $row->cur_title && $prev_namespace == $row->cur_namespace ) {
 					$deleteId[] = $row->cur_id;
 				}
-				$prev_title     = $row->cur_title;
+				$prev_title = $row->cur_title;
 				$prev_namespace = $row->cur_namespace;
 			}
 			$sql = "DELETE FROM $cur WHERE cur_id IN ( " . join( ',', $deleteId ) . ')';
diff --git a/includes/installer/OracleInstaller.php b/includes/installer/OracleInstaller.php
index 4c72a8ff08..e85388907c 100644
--- a/includes/installer/OracleInstaller.php
+++ b/includes/installer/OracleInstaller.php
@@ -202,7 +202,6 @@ class OracleInstaller extends DatabaseInstaller {
 		$this->parent->addInstallStep( $callback, 'database' );
 	}
 
-
 	public function setupDatabase() {
 		$status = Status::newGood();
 		return $status;
@@ -294,7 +293,7 @@ class OracleInstaller extends DatabaseInstaller {
 		$prefix = $this->getVar( 'wgDBprefix' );
 		return
 "# Oracle specific settings
-\$wgDBprefix         = \"{$prefix}\";
+\$wgDBprefix = \"{$prefix}\";
 ";
 	}
 
diff --git a/includes/installer/PostgresInstaller.php b/includes/installer/PostgresInstaller.php
index 882ec5323a..3dcb12fe44 100644
--- a/includes/installer/PostgresInstaller.php
+++ b/includes/installer/PostgresInstaller.php
@@ -531,8 +531,8 @@ class PostgresInstaller extends DatabaseInstaller {
 		$schema = $this->getVar( 'wgDBmwschema' );
 		return
 "# Postgres specific settings
-\$wgDBport           = \"{$port}\";
-\$wgDBmwschema       = \"{$schema}\";";
+\$wgDBport = \"{$port}\";
+\$wgDBmwschema = \"{$schema}\";";
 	}
 
 	public function preUpgrade() {
diff --git a/includes/installer/SqliteInstaller.php b/includes/installer/SqliteInstaller.php
index d8fa72441c..68df6ab22e 100644
--- a/includes/installer/SqliteInstaller.php
+++ b/includes/installer/SqliteInstaller.php
@@ -240,7 +240,7 @@ class SqliteInstaller extends DatabaseInstaller {
 
 		$module = DatabaseSqlite::getFulltextSearchModule();
 		$fts3tTable = $this->db->checkForEnabledSearch();
-		if ( $fts3tTable &&  !$module ) {
+		if ( $fts3tTable && !$module ) {
 			$status->warning( 'config-sqlite-fts3-downgrade' );
 			$this->db->sourceFile( "$IP/maintenance/sqlite/archives/searchindex-no-fts.sql" );
 		} elseif ( !$fts3tTable && $module == 'FTS3' ) {
@@ -256,6 +256,6 @@ class SqliteInstaller extends DatabaseInstaller {
 		$dir = LocalSettingsGenerator::escapePhpString( $this->getVar( 'wgSQLiteDataDir' ) );
 		return
 "# SQLite-specific settings
-\$wgSQLiteDataDir    = \"{$dir}\";";
+\$wgSQLiteDataDir = \"{$dir}\";";
 	}
 }
diff --git a/includes/installer/SqliteUpdater.php b/includes/installer/SqliteUpdater.php
index cd7a2c9f3a..47650b6b39 100644
--- a/includes/installer/SqliteUpdater.php
+++ b/includes/installer/SqliteUpdater.php
@@ -124,7 +124,7 @@ class SqliteUpdater extends DatabaseUpdater {
 	protected function sqliteSetupSearchindex() {
 		$module = DatabaseSqlite::getFulltextSearchModule();
 		$fts3tTable = $this->updateRowExists( 'fts3' );
-		if ( $fts3tTable &&  !$module ) {
+		if ( $fts3tTable && !$module ) {
 			$this->applyPatch( 'searchindex-no-fts.sql', false, 'PHP is missing FTS3 support, downgrading tables' );
 		} elseif ( !$fts3tTable && $module == 'FTS3' ) {
 			$this->applyPatch( 'searchindex-fts3.sql', false, "Adding FTS3 search capabilities" );
diff --git a/includes/job/JobQueue.php b/includes/job/JobQueue.php
index 4996a9e7c2..b7bbfe6170 100644
--- a/includes/job/JobQueue.php
+++ b/includes/job/JobQueue.php
@@ -41,9 +41,9 @@ abstract class JobQueue {
 	 * @param $params array
 	 */
 	protected function __construct( array $params ) {
-		$this->wiki     = $params['wiki'];
-		$this->type     = $params['type'];
-		$this->order    = isset( $params['order'] ) ? $params['order'] : 'random';
+		$this->wiki = $params['wiki'];
+		$this->type = $params['type'];
+		$this->order = isset( $params['order'] ) ? $params['order'] : 'random';
 		$this->claimTTL = isset( $params['claimTTL'] ) ? $params['claimTTL'] : 0;
 		$this->maxTries = isset( $params['maxTries'] ) ? $params['maxTries'] : 3;
 	}
diff --git a/includes/job/JobQueueDB.php b/includes/job/JobQueueDB.php
index fd64895047..fee1aaf2a6 100644
--- a/includes/job/JobQueueDB.php
+++ b/includes/job/JobQueueDB.php
@@ -28,12 +28,12 @@
  * @since 1.21
  */
 class JobQueueDB extends JobQueue {
-	const ROOTJOB_TTL     = 1209600; // integer; seconds to remember root jobs (14 days)
+	const ROOTJOB_TTL = 1209600; // integer; seconds to remember root jobs (14 days)
 	const CACHE_TTL_SHORT = 30; // integer; seconds to cache info without re-validating
-	const CACHE_TTL_LONG  = 300; // integer; seconds to cache info that is kept up to date
-	const MAX_AGE_PRUNE   = 604800; // integer; seconds a job can live once claimed
-	const MAX_JOB_RANDOM  = 2147483647; // integer; 2^31 - 1, used for job_random
-	const MAX_OFFSET      = 255; // integer; maximum number of rows to skip
+	const CACHE_TTL_LONG = 300; // integer; seconds to cache info that is kept up to date
+	const MAX_AGE_PRUNE = 604800; // integer; seconds a job can live once claimed
+	const MAX_JOB_RANDOM = 2147483647; // integer; 2^31 - 1, used for job_random
+	const MAX_OFFSET = 255; // integer; maximum number of rows to skip
 
 	protected $cluster = false; // string; name of an external DB cluster
 
@@ -225,8 +225,8 @@ class JobQueueDB extends JobQueue {
 				$row = $this->claimOldest( $uuid );
 			} else { // random first
 				$rand = mt_rand( 0, self::MAX_JOB_RANDOM ); // encourage concurrent UPDATEs
-				$gte  = (bool)mt_rand( 0, 1 ); // find rows with rand before/after $rand
-				$row  = $this->claimRandom( $uuid, $rand, $gte );
+				$gte = (bool)mt_rand( 0, 1 ); // find rows with rand before/after $rand
+				$row = $this->claimRandom( $uuid, $rand, $gte );
 			}
 			// Check if we found a row to reserve...
 			if ( !$row ) {
@@ -281,8 +281,8 @@ class JobQueueDB extends JobQueue {
 				// For small queues, using OFFSET will overshoot and return no rows more often.
 				// Instead, this uses job_random to pick a row (possibly checking both directions).
 				$ineq = $gte ? '>=' : '<=';
-				$dir  = $gte ? 'ASC' : 'DESC';
-				$row  = $dbw->selectRow( 'job', '*', // find a random job
+				$dir = $gte ? 'ASC' : 'DESC';
+				$row = $dbw->selectRow( 'job', '*', // find a random job
 					array(
 						'job_cmd'   => $this->type,
 						'job_token' => '', // unclaimed
diff --git a/includes/job/JobQueueGroup.php b/includes/job/JobQueueGroup.php
index dae026c5bd..8252633b41 100644
--- a/includes/job/JobQueueGroup.php
+++ b/includes/job/JobQueueGroup.php
@@ -37,7 +37,7 @@ class JobQueueGroup {
 	protected $wiki; // string; wiki ID
 
 	const TYPE_DEFAULT = 1; // integer; jobs popped by default
-	const TYPE_ANY     = 2; // integer; any job
+	const TYPE_ANY = 2; // integer; any job
 
 	const USE_CACHE = 1; // integer; use process or persistent cache
 
diff --git a/includes/job/JobQueueRedis.php b/includes/job/JobQueueRedis.php
index 2ce47bb327..a6b5bb321f 100644
--- a/includes/job/JobQueueRedis.php
+++ b/includes/job/JobQueueRedis.php
@@ -33,7 +33,7 @@ class JobQueueRedis extends JobQueue {
 
 	protected $server; // string; server address
 
-	const ROOTJOB_TTL   = 1209600; // integer; seconds to remember root jobs (14 days)
+	const ROOTJOB_TTL = 1209600; // integer; seconds to remember root jobs (14 days)
 	const MAX_AGE_PRUNE = 604800; // integer; seconds a job can live once claimed (7 days)
 
 	protected $key; // string; key to prefix the queue keys with (used for testing)
diff --git a/includes/job/jobs/DuplicateJob.php b/includes/job/jobs/DuplicateJob.php
index 1b64b1010a..d5983a0523 100644
--- a/includes/job/jobs/DuplicateJob.php
+++ b/includes/job/jobs/DuplicateJob.php
@@ -46,9 +46,9 @@ final class DuplicateJob extends Job {
 	 */
 	public static function newFromJob( Job $job ) {
 		$djob = new self( $job->getTitle(), $job->getParams(), $job->getId() );
-		$djob->command  = $job->getType();
-		$djob->params   = is_array( $djob->params ) ? $djob->params : array();
-		$djob->params   = array( 'isDuplicate' => true ) + $djob->params;
+		$djob->command = $job->getType();
+		$djob->params = is_array( $djob->params ) ? $djob->params : array();
+		$djob->params = array( 'isDuplicate' => true ) + $djob->params;
 		$djob->metadata = $job->metadata;
 		return $djob;
 	}
diff --git a/includes/job/jobs/HTMLCacheUpdateJob.php b/includes/job/jobs/HTMLCacheUpdateJob.php
index 20245b3212..ae3e7bb70d 100644
--- a/includes/job/jobs/HTMLCacheUpdateJob.php
+++ b/includes/job/jobs/HTMLCacheUpdateJob.php
@@ -60,9 +60,9 @@ class HTMLCacheUpdateJob extends Job {
 
 		parent::__construct( 'htmlCacheUpdate', $title, $params, $id );
 
-		$this->rowsPerJob   = $wgUpdateRowsPerJob;
+		$this->rowsPerJob = $wgUpdateRowsPerJob;
 		$this->rowsPerQuery = $wgUpdateRowsPerQuery;
-		$this->blCache      = $title->getBacklinkCache();
+		$this->blCache = $title->getBacklinkCache();
 	}
 
 	public function run() {
diff --git a/includes/job/jobs/RefreshLinksJob.php b/includes/job/jobs/RefreshLinksJob.php
index 20e4f16756..9dbe82786f 100644
--- a/includes/job/jobs/RefreshLinksJob.php
+++ b/includes/job/jobs/RefreshLinksJob.php
@@ -150,7 +150,7 @@ class RefreshLinksJob2 extends Job {
 			$masterPos = false;
 		}
 
-		$tbc  = $this->title->getBacklinkCache();
+		$tbc = $this->title->getBacklinkCache();
 
 		$jobs = array(); // jobs to insert
 		if ( isset( $this->params['start'] ) && isset( $this->params['end'] ) ) {
@@ -192,8 +192,8 @@ class RefreshLinksJob2 extends Job {
 	 */
 	protected function getSingleTitleJobs( $table, $masterPos ) {
 		# The "start"/"end" fields are not set for the base jobs
-		$start  = isset( $this->params['start'] ) ? $this->params['start'] : false;
-		$end    = isset( $this->params['end'] ) ? $this->params['end'] : false;
+		$start = isset( $this->params['start'] ) ? $this->params['start'] : false;
+		$end = isset( $this->params['end'] ) ? $this->params['end'] : false;
 		$titles = $this->title->getBacklinkCache()->getLinks( $table, $start, $end );
 		# Convert into single page refresh links jobs.
 		# This handles well when in sapi mode and is useful in any case for job
diff --git a/includes/logging/LogFormatter.php b/includes/logging/LogFormatter.php
index 4d3565d858..6c5b9835b8 100644
--- a/includes/logging/LogFormatter.php
+++ b/includes/logging/LogFormatter.php
@@ -915,7 +915,6 @@ class DeleteLogFormatter extends LogFormatter {
 				}
 				$changeText = $this->context->getLanguage()->listToText( $changes );
 
-
 				$newParams = array_slice( $params, 0, 3 );
 				$newParams[3] = $changeText;
 				$count = count( explode( ',', $params[$paramStart] ) );
diff --git a/includes/logging/LogPage.php b/includes/logging/LogPage.php
index 9778f273a5..37787ec36c 100644
--- a/includes/logging/LogPage.php
+++ b/includes/logging/LogPage.php
@@ -562,7 +562,6 @@ class LogPage {
 		return $messages[$flag];
 	}
 
-
 	/**
 	 * Name of the log.
 	 * @return Message
diff --git a/includes/media/Bitmap.php b/includes/media/Bitmap.php
index ca9b6363cb..a8c1731d4b 100644
--- a/includes/media/Bitmap.php
+++ b/includes/media/Bitmap.php
@@ -75,7 +75,6 @@ class BitmapHandler extends ImageHandler {
 		return true;
 	}
 
-
 	/**
 	 * Extracts the width/height if the image will be scaled before rotating
 	 *
@@ -100,7 +99,6 @@ class BitmapHandler extends ImageHandler {
 		return array( $width, $height );
 	}
 
-
 	/**
 	 * Function that returns the number of pixels to be thumbnailed.
 	 * Intended for animated GIFs to multiply by the number of frames.
@@ -158,7 +156,6 @@ class BitmapHandler extends ImageHandler {
 			return $this->getClientScalingThumbnailImage( $image, $scalerParams );
 		}
 
-
 		if ( $scaler == 'client' ) {
 			# Client-side image scaling, use the source URL
 			# Using the destination URL in a TRANSFORM_LATER request would be incorrect
@@ -341,7 +338,7 @@ class BitmapHandler extends ImageHandler {
 		$rotation = $this->getRotation( $image );
 		list( $width, $height ) = $this->extractPreRotationDimensions( $params, $rotation );
 
-		$cmd  =
+		$cmd =
 			wfEscapeShellArg( $wgImageMagickConvertCommand ) .
 			// Specify white background color, will be used for transparent images
 			// in Internet Explorer/Windows instead of default black.
diff --git a/includes/media/BitmapMetadataHandler.php b/includes/media/BitmapMetadataHandler.php
index 55deef0fb8..b95079e466 100644
--- a/includes/media/BitmapMetadataHandler.php
+++ b/includes/media/BitmapMetadataHandler.php
@@ -69,7 +69,6 @@ class BitmapMetadataHandler {
 		$this->addMetadata( $iptc, $this->iptcType );
 	}
 
-
 	/**
 	 * Get exif info using exif class.
 	 * Basically what used to be in BitmapHandler::getMetadata().
@@ -301,6 +300,4 @@ class BitmapMetadataHandler {
 
 		}
 	}
-
-
 }
diff --git a/includes/media/DjVuImage.php b/includes/media/DjVuImage.php
index 973579148e..4698966836 100644
--- a/includes/media/DjVuImage.php
+++ b/includes/media/DjVuImage.php
@@ -57,7 +57,6 @@ class DjVuImage {
 		return $info !== false;
 	}
 
-
 	/**
 	 * Return data in the style of getimagesize()
 	 * @return array or false on failure
@@ -66,7 +65,7 @@ class DjVuImage {
 		$data = $this->getInfo();
 
 		if( $data !== false ) {
-			$width  = $data['width'];
+			$width = $data['width'];
 			$height = $data['height'];
 
 			return array( $width, $height, 'DjVu',
diff --git a/includes/media/Exif.php b/includes/media/Exif.php
index 2dc2eae7bb..9d4b01c0ec 100644
--- a/includes/media/Exif.php
+++ b/includes/media/Exif.php
@@ -31,15 +31,15 @@
  */
 class Exif {
 
-	const BYTE      = 1;    //!< An 8-bit (1-byte) unsigned integer.
-	const ASCII     = 2;    //!< An 8-bit byte containing one 7-bit ASCII code. The final byte is terminated with NULL.
-	const SHORT     = 3;    //!< A 16-bit (2-byte) unsigned integer.
-	const LONG      = 4;    //!< A 32-bit (4-byte) unsigned integer.
-	const RATIONAL  = 5;    //!< Two LONGs. The first LONG is the numerator and the second LONG expresses the denominator
-	const UNDEFINED = 7;    //!< An 8-bit byte that can take any value depending on the field definition
-	const SLONG     = 9;    //!< A 32-bit (4-byte) signed integer (2's complement notation),
-	const SRATIONAL = 10;   //!< Two SLONGs. The first SLONG is the numerator and the second SLONG is the denominator.
-	const IGNORE    = -1;   // A fake value for things we don't want or don't support.
+	const BYTE = 1; //!< An 8-bit (1-byte) unsigned integer.
+	const ASCII = 2; //!< An 8-bit byte containing one 7-bit ASCII code. The final byte is terminated with NULL.
+	const SHORT = 3; //!< A 16-bit (2-byte) unsigned integer.
+	const LONG = 4; //!< A 32-bit (4-byte) unsigned integer.
+	const RATIONAL = 5; //!< Two LONGs. The first LONG is the numerator and the second LONG expresses the denominator
+	const UNDEFINED = 7; //!< An 8-bit byte that can take any value depending on the field definition
+	const SLONG = 9; //!< A 32-bit (4-byte) signed integer (2's complement notation),
+	const SRATIONAL = 10; //!< Two SLONGs. The first SLONG is the numerator and the second SLONG is the denominator.
+	const IGNORE = -1; // A fake value for things we don't want or don't support.
 
 	//@{
 	/* @var array
diff --git a/includes/media/FormatMetadata.php b/includes/media/FormatMetadata.php
index 97aa28b3ef..5635713733 100644
--- a/includes/media/FormatMetadata.php
+++ b/includes/media/FormatMetadata.php
@@ -25,7 +25,6 @@
  * @file
  */
 
-
 /**
  * Format Image metadata values into a human readable form.
  *
@@ -526,7 +525,6 @@ class FormatMetadata {
 					}
 					break;
 
-
 				case 'GPSTrackRef':
 				case 'GPSImgDirectionRef':
 				case 'GPSDestBearingRef':
diff --git a/includes/media/GIFMetadataExtractor.php b/includes/media/GIFMetadataExtractor.php
index 8b44585b5a..6a4e753da0 100644
--- a/includes/media/GIFMetadataExtractor.php
+++ b/includes/media/GIFMetadataExtractor.php
@@ -251,7 +251,7 @@ class GIFMetadataExtractor {
 	 */
 	static function readGCT( $fh, $bpp ) {
 		if ( $bpp > 0 ) {
-			for( $i=1; $i<=pow( 2, $bpp ); ++$i ) {
+			for( $i = 1; $i <= pow( 2, $bpp ); ++$i ) {
 				fread( $fh, 3 );
 			}
 		}
diff --git a/includes/media/IPTC.php b/includes/media/IPTC.php
index 06cbc3b04b..70784bde94 100644
--- a/includes/media/IPTC.php
+++ b/includes/media/IPTC.php
@@ -530,7 +530,7 @@ class IPTC {
 			case "\x1b(K":
 				$c = "ISO646-DE";
 				break;
-			case "\x1b(N":  //crylic
+			case "\x1b(N": //crylic
 				$c = "ISO_5427";
 				break;
 			case "\x1b(`": //iso646-NO
diff --git a/includes/media/ImageHandler.php b/includes/media/ImageHandler.php
index 472372c37c..419afeeffd 100644
--- a/includes/media/ImageHandler.php
+++ b/includes/media/ImageHandler.php
@@ -139,7 +139,6 @@ abstract class ImageHandler extends MediaHandler {
 			$params['height'] = $params['physicalHeight'];
 		}
 
-
 		if ( !$this->validateThumbParams( $params['physicalWidth'],
 				$params['physicalHeight'], $srcWidth, $srcHeight, $mimeType ) ) {
 			return false;
diff --git a/includes/media/MediaHandler.php b/includes/media/MediaHandler.php
index 46993e7185..374ae9cbd4 100644
--- a/includes/media/MediaHandler.php
+++ b/includes/media/MediaHandler.php
@@ -181,7 +181,6 @@ abstract class MediaHandler {
 		return self::METADATA_GOOD;
 	}
 
-
 	/**
 	 * Get a MediaTransformOutput object representing an alternate of the transformed
 	 * output which will call an intermediary thumbnail assist script.
@@ -405,7 +404,6 @@ abstract class MediaHandler {
 		return $fields;
 	}
 
-
 	/**
 	 * This is used to generate an array element for each metadata value
 	 * That array is then used to generate the table of metadata values
diff --git a/includes/media/XMP.php b/includes/media/XMP.php
index 0decb75c54..dc1e7bd6c0 100644
--- a/includes/media/XMP.php
+++ b/includes/media/XMP.php
@@ -72,25 +72,24 @@ class XMPReader {
 	* element pops up when we're in that mode, we ignore it.
 	*/
 	const MODE_INITIAL = 0;
-	const MODE_IGNORE  = 1;
-	const MODE_LI      = 2;
+	const MODE_IGNORE = 1;
+	const MODE_LI = 2;
 	const MODE_LI_LANG = 3;
-	const MODE_QDESC   = 4;
+	const MODE_QDESC = 4;
 
 	// The following MODE constants are also used in the
 	// $items array to denote what type of property the item is.
-	const MODE_SIMPLE    = 10;
-	const MODE_STRUCT    = 11; // structure (associative array)
-	const MODE_SEQ       = 12; // ordered list
-	const MODE_BAG       = 13; // unordered list
-	const MODE_LANG      = 14;
-	const MODE_ALT       = 15; // non-language alt. Currently not implemented, and not needed atm.
+	const MODE_SIMPLE = 10;
+	const MODE_STRUCT = 11; // structure (associative array)
+	const MODE_SEQ = 12; // ordered list
+	const MODE_BAG = 13; // unordered list
+	const MODE_LANG = 14;
+	const MODE_ALT = 15; // non-language alt. Currently not implemented, and not needed atm.
 	const MODE_BAGSTRUCT = 16; // A BAG of Structs.
 
 	const NS_RDF = 'http://www.w3.org/1999/02/22-rdf-syntax-ns#';
 	const NS_XML = 'http://www.w3.org/XML/1998/namespace';
 
-
 	/**
 	* Constructor.
 	*
@@ -207,7 +206,6 @@ class XMPReader {
 			}
 		}
 
-
 		// We don't want to return the special values, since they're
 		// special and not info to be stored about the file.
 		unset( $data['xmp-special'] );
@@ -331,7 +329,6 @@ class XMPReader {
 			return false;
 		}
 
-
 		// we're not very robust here. we should accept it in the wrong order. To quote
 		// the xmp standard:
 		// "A JPEG writer should write the ExtendedXMP marker segments in order, immediately following the
@@ -591,8 +588,6 @@ class XMPReader {
 			array_shift( $this->mode );
 			array_shift( $this->curItem );
 		}
-
-
 	}
 
 	/**
@@ -1128,8 +1123,6 @@ class XMPReader {
 			$this->mode[0] = self::MODE_QDESC;
 		}
 		foreach ( $attribs as $name => $val ) {
-
-
 			if ( strpos( $name, ' ' ) === false ) {
 				// This shouldn't happen, but so far some old software forgets namespace
 				// on rdf:about.
diff --git a/includes/media/XMPValidate.php b/includes/media/XMPValidate.php
index e2ae535548..deb444832c 100644
--- a/includes/media/XMPValidate.php
+++ b/includes/media/XMPValidate.php
@@ -295,7 +295,6 @@ class XMPValidate {
 				return;
 			}
 
-
 			// Extra check for empty string necessary due to TZ but no second case.
 			$stripSeconds = false;
 			if ( !isset( $res[6] ) || $res[6] === '' ) {
diff --git a/includes/normal/UtfNormalUtil.php b/includes/normal/UtfNormalUtil.php
index bfad709553..e29d8dcc7f 100644
--- a/includes/normal/UtfNormalUtil.php
+++ b/includes/normal/UtfNormalUtil.php
@@ -114,7 +114,7 @@ function utf8ToCodepoint( $char ) {
 	$z >>= $length;
 
 	# Add in the free bits from subsequent bytes
-	for ( $i=1; $i<$length; $i++ ) {
+	for ( $i=1; $i < $length; $i++ ) {
 		$z <<= 6;
 		$z |= ord( $char[$i] ) & 0x3f;
 	}
diff --git a/includes/objectcache/BagOStuff.php b/includes/objectcache/BagOStuff.php
index 1205ceb842..d475de8271 100644
--- a/includes/objectcache/BagOStuff.php
+++ b/includes/objectcache/BagOStuff.php
@@ -174,10 +174,10 @@ abstract class BagOStuff {
 			return true;
 		}
 
-		$uRTT  = ceil( 1e6 * ( microtime( true ) - $timestamp ) ); // estimate RTT (us)
+		$uRTT = ceil( 1e6 * ( microtime( true ) - $timestamp ) ); // estimate RTT (us)
 		$sleep = 2*$uRTT; // rough time to do get()+set()
 
-		$locked   = false; // lock acquired
+		$locked = false; // lock acquired
 		$attempts = 0; // failed attempts
 		do {
 			if ( ++$attempts >= 3 && $sleep <= 1e6 ) {
diff --git a/includes/objectcache/MemcachedClient.php b/includes/objectcache/MemcachedClient.php
index 2342d63370..ff43bac034 100644
--- a/includes/objectcache/MemcachedClient.php
+++ b/includes/objectcache/MemcachedClient.php
@@ -99,7 +99,6 @@ class MWMemcached {
 
 	// }}}
 
-
 	/**
 	 * Command statistics
 	 *
@@ -1211,7 +1210,6 @@ class MWMemcached {
 	// }}}
 }
 
-
 // }}}
 
 class MemCachedClientforWiki extends MWMemcached {
diff --git a/includes/objectcache/RedisBagOStuff.php b/includes/objectcache/RedisBagOStuff.php
index a9f5f8c7e2..f9feaf9df5 100644
--- a/includes/objectcache/RedisBagOStuff.php
+++ b/includes/objectcache/RedisBagOStuff.php
@@ -19,6 +19,7 @@
  *
  * @file
  */
+
 class RedisBagOStuff extends BagOStuff {
 	/** @var RedisConnectionPool */
 	protected $redisPool;
diff --git a/includes/parser/CoreParserFunctions.php b/includes/parser/CoreParserFunctions.php
index a1b7ca0f70..a274aa5853 100644
--- a/includes/parser/CoreParserFunctions.php
+++ b/includes/parser/CoreParserFunctions.php
@@ -442,7 +442,6 @@ class CoreParserFunctions {
 		return self::formatRaw( SiteStats::numberingroup( strtolower( $name ) ), $raw );
 	}
 
-
 	/**
 	 * Given a title, return the namespace name that would be given by the
 	 * corresponding magic word
diff --git a/includes/parser/DateFormatter.php b/includes/parser/DateFormatter.php
index 88d68a7531..d1e6603798 100644
--- a/includes/parser/DateFormatter.php
+++ b/includes/parser/DateFormatter.php
@@ -55,7 +55,7 @@ class DateFormatter {
 		$this->lang = $lang;
 
 		$this->monthNames = $this->getMonthRegex();
-		for ( $i=1; $i<=12; $i++ ) {
+		for ( $i = 1; $i <= 12; $i++ ) {
 			$this->xMonths[$this->lang->lc( $this->lang->getMonthName( $i ) )] = $i;
 			$this->xMonths[$this->lang->lc( $this->lang->getMonthAbbreviation( $i ) )] = $i;
 		}
@@ -154,7 +154,7 @@ class DateFormatter {
 		} else {
 			$preference = self::NONE;
 		}
-		for ( $i=1; $i<=self::LAST; $i++ ) {
+		for ( $i = 1; $i <= self::LAST; $i++ ) {
 			$this->mSource = $i;
 			if ( isset ( $this->rules[$preference][$i] ) ) {
 				# Specific rules
@@ -203,7 +203,7 @@ class DateFormatter {
 
 		$bits = array();
 		$key = $this->keys[$this->mSource];
-		for ( $p=0; $p < strlen( $key ); $p++ ) {
+		for ( $p = 0; $p < strlen( $key ); $p++ ) {
 			if ( $key[$p] != ' ' ) {
 				$bits[$key[$p]] = $matches[$p+1];
 			}
@@ -250,7 +250,7 @@ class DateFormatter {
 			$bits['d'] = sprintf( '%02d', $bits['j'] );
 		}
 
-		for ( $p=0; $p < strlen( $format ); $p++ ) {
+		for ( $p = 0; $p < strlen( $format ); $p++ ) {
 			$char = $format[$p];
 			switch ( $char ) {
 				case 'd': # ISO day of month
diff --git a/includes/parser/LinkHolderArray.php b/includes/parser/LinkHolderArray.php
index ff1e0afa58..c09ffa61ec 100644
--- a/includes/parser/LinkHolderArray.php
+++ b/includes/parser/LinkHolderArray.php
@@ -513,7 +513,6 @@ class LinkHolderArray {
 			}
 		}
 
-
 		if( !$linkBatch->isEmpty() ) {
 			// construct query
 			$dbr = wfGetDB( DB_SLAVE );
@@ -614,7 +613,7 @@ class LinkHolderArray {
 	 */
 	function replaceTextCallback( $matches ) {
 		$type = $matches[1];
-		$key  = $matches[2];
+		$key = $matches[2];
 		if( $type == 'LINK' ) {
 			list( $ns, $index ) = explode( ':', $key, 2 );
 			if( isset( $this->internals[$ns][$index]['text'] ) ) {
diff --git a/includes/parser/Parser.php b/includes/parser/Parser.php
index e10fa577a0..6270a8772d 100644
--- a/includes/parser/Parser.php
+++ b/includes/parser/Parser.php
@@ -122,8 +122,8 @@ class Parser {
 	var $mFunctionHooks = array();
 	var $mFunctionSynonyms = array( 0 => array(), 1 => array() );
 	var $mFunctionTagHooks = array();
-	var $mStripList  = array();
-	var $mDefaultStripList  = array();
+	var $mStripList = array();
+	var $mDefaultStripList = array();
 	var $mVarCache = array();
 	var $mImageParams = array();
 	var $mImageParamsMagicArray = array();
@@ -310,7 +310,6 @@ class Parser {
 		$this->mUniqPrefix = "\x7fUNIQ" . self::getRandomString();
 		$this->mStripState = new StripState( $this->mUniqPrefix );
 
-
 		# Clear these on every parse, bug 4549
 		$this->mTplExpandCache = $this->mTplRedirCache = $this->mTplDomCache = array();
 
@@ -843,16 +842,16 @@ class Parser {
 			}
 			if ( count( $p ) > 5 ) {
 				# comment
-				$element    = $p[4];
+				$element = $p[4];
 				$attributes = '';
-				$close      = '';
-				$inside     = $p[5];
+				$close = '';
+				$inside = $p[5];
 			} else {
 				# tag
-				$element    = $p[1];
+				$element = $p[1];
 				$attributes = $p[2];
-				$close      = $p[3];
-				$inside     = $p[4];
+				$close = $p[3];
+				$inside = $p[4];
 			}
 
 			$marker = "$uniq_prefix-$element-" . sprintf( '%08X', $n++ ) . self::MARKER_SUFFIX;
@@ -1005,7 +1004,7 @@ class Parser {
 				array_push( $tr_history, false );
 				array_push( $td_history, false );
 				array_push( $last_tag_history, '' );
-			} elseif ( $first_character === '|' || $first_character === '!' || substr( $line, 0, 2 )  === '|+' ) {
+			} elseif ( $first_character === '|' || $first_character === '!' || substr( $line, 0, 2 ) === '|+' ) {
 				# This might be cell elements, td, th or captions
 				if ( substr( $line, 0, 2 ) === '|+' ) {
 					$first_character = '+';
@@ -1314,7 +1313,6 @@ class Parser {
 		return $text . $trail;
 	}
 
-
 	/**
 	 * Parse headers and return html
 	 *
@@ -1952,7 +1950,7 @@ class Parser {
 				wfProfileOut( __METHOD__ . "-might_be_img" );
 			}
 
-			$wasblank = ( $text  == '' );
+			$wasblank = ( $text == '' );
 			if ( $wasblank ) {
 				$text = $link;
 			} else {
@@ -4120,7 +4118,7 @@ class Parser {
 				# Increase TOC level
 				$toclevel++;
 				$sublevelCount[$toclevel] = 0;
-				if ( $toclevel<$wgMaxTocLevel ) {
+				if ( $toclevel < $wgMaxTocLevel ) {
 					$prevtoclevel = $toclevel;
 					$toc .= Linker::tocIndent();
 					$numVisible++;
@@ -4142,7 +4140,7 @@ class Parser {
 				if ( $i == 0 ) {
 					$toclevel = 1;
 				}
-				if ( $toclevel<$wgMaxTocLevel ) {
+				if ( $toclevel < $wgMaxTocLevel ) {
 					if ( $prevtoclevel < $wgMaxTocLevel ) {
 						# Unindent only if the previous toc level was shown :p
 						$toc .= Linker::tocUnindent( $prevtoclevel - $toclevel );
@@ -4153,7 +4151,7 @@ class Parser {
 				}
 			} else {
 				# No change in level, end TOC line
-				if ( $toclevel<$wgMaxTocLevel ) {
+				if ( $toclevel < $wgMaxTocLevel ) {
 					$toc .= Linker::tocLineEnd();
 				}
 			}
diff --git a/includes/parser/ParserOptions.php b/includes/parser/ParserOptions.php
index bd4bcaced2..3eb83e367e 100644
--- a/includes/parser/ParserOptions.php
+++ b/includes/parser/ParserOptions.php
@@ -505,7 +505,6 @@ class ParserOptions {
 			$confstr .= '*';
 		}
 
-
 		// Space assigned for the stubthreshold but unused
 		// since it disables the parser cache, its value will always
 		// be 0 when this function is called by parsercache.
diff --git a/includes/parser/ParserOutput.php b/includes/parser/ParserOutput.php
index 27b75ac4da..b67ff205ac 100644
--- a/includes/parser/ParserOutput.php
+++ b/includes/parser/ParserOutput.php
@@ -418,7 +418,6 @@ class ParserOutput extends CacheTime {
 		return $this->mProperties;
 	}
 
-
 	/**
 	 * Returns the options from its ParserOptions which have been taken
 	 * into account to produce this output or false if not available.
diff --git a/includes/parser/Preprocessor.php b/includes/parser/Preprocessor.php
index 687dceb089..aeacd2e108 100644
--- a/includes/parser/Preprocessor.php
+++ b/includes/parser/Preprocessor.php
@@ -205,7 +205,6 @@ interface PPNode {
 	 */
 	function getChildrenOfType( $type );
 
-
 	/**
 	 * Returns the length of the array, or false if this is not an array-type node
 	 */
diff --git a/includes/parser/Preprocessor_DOM.php b/includes/parser/Preprocessor_DOM.php
index 9c7eef5560..586c3159ef 100644
--- a/includes/parser/Preprocessor_DOM.php
+++ b/includes/parser/Preprocessor_DOM.php
@@ -911,7 +911,6 @@ class PPFrame_DOM implements PPFrame {
 	 */
 	var $depth;
 
-
 	/**
 	 * Construct a new preprocessor frame.
 	 * @param $preprocessor Preprocessor The parent preprocessor
diff --git a/includes/parser/Preprocessor_Hash.php b/includes/parser/Preprocessor_Hash.php
index fe00e7feb7..954c927b60 100644
--- a/includes/parser/Preprocessor_Hash.php
+++ b/includes/parser/Preprocessor_Hash.php
@@ -861,7 +861,6 @@ class PPFrame_Hash implements PPFrame {
 	 */
 	var $depth;
 
-
 	/**
 	 * Construct a new preprocessor frame.
 	 * @param $preprocessor Preprocessor: the parent preprocessor
diff --git a/includes/profiler/Profiler.php b/includes/profiler/Profiler.php
index 1ead836b26..fed9cad067 100644
--- a/includes/profiler/Profiler.php
+++ b/includes/profiler/Profiler.php
@@ -460,7 +460,7 @@ class Profiler {
 
 		$width = 140;
 		$nameWidth = $width - 65;
-		$format =      "%-{$nameWidth}s %6d %13.3f %13.3f %13.3f%% %9d  (%13.3f -%13.3f) [%d]\n";
+		$format = "%-{$nameWidth}s %6d %13.3f %13.3f %13.3f%% %9d  (%13.3f -%13.3f) [%d]\n";
 		$titleFormat = "%-{$nameWidth}s %6s %13s %13s %13s %9s\n";
 		$prof = "\nProfiling data\n";
 		$prof .= sprintf( $titleFormat, 'Name', 'Calls', 'Total', 'Each', '%', 'Mem' );
diff --git a/includes/profiler/ProfilerSimple.php b/includes/profiler/ProfilerSimple.php
index 1322e47a52..1d4873c628 100644
--- a/includes/profiler/ProfilerSimple.php
+++ b/includes/profiler/ProfilerSimple.php
@@ -29,7 +29,7 @@
 class ProfilerSimple extends Profiler {
 	var $mMinimumTime = 0;
 
-	var $zeroEntry = array( 'cpu'=> 0.0, 'cpu_sq' => 0.0, 'real' => 0.0, 'real_sq' => 0.0, 'count' => 0 );
+	var $zeroEntry = array( 'cpu' => 0.0, 'cpu_sq' => 0.0, 'real' => 0.0, 'real_sq' => 0.0, 'count' => 0 );
 	var $errorEntry;
 
 	public function isPersistent() {
diff --git a/includes/resourceloader/ResourceLoader.php b/includes/resourceloader/ResourceLoader.php
index 52f200900a..c70e4a01ce 100644
--- a/includes/resourceloader/ResourceLoader.php
+++ b/includes/resourceloader/ResourceLoader.php
@@ -210,7 +210,6 @@ class ResourceLoader {
 			$this->registerTestModules();
 		}
 
-
 		wfProfileOut( __METHOD__ );
 	}
 
@@ -541,12 +540,12 @@ class ResourceLoader {
 		// to propagate to clients quickly
 		// If there were errors, we also need a shorter expiry time so we can recover quickly
 		if ( is_null( $context->getVersion() ) || $errors ) {
-			$maxage  = $wgResourceLoaderMaxage['unversioned']['client'];
+			$maxage = $wgResourceLoaderMaxage['unversioned']['client'];
 			$smaxage = $wgResourceLoaderMaxage['unversioned']['server'];
 		// If a version was specified we can use a longer expiry time since changing
 		// version numbers causes cache misses
 		} else {
-			$maxage  = $wgResourceLoaderMaxage['versioned']['client'];
+			$maxage = $wgResourceLoaderMaxage['versioned']['client'];
 			$smaxage = $wgResourceLoaderMaxage['versioned']['server'];
 		}
 		if ( $context->getOnly() === 'styles' ) {
diff --git a/includes/resourceloader/ResourceLoaderContext.php b/includes/resourceloader/ResourceLoaderContext.php
index 0e96c6c8fd..bd4ae33e10 100644
--- a/includes/resourceloader/ResourceLoaderContext.php
+++ b/includes/resourceloader/ResourceLoaderContext.php
@@ -58,14 +58,14 @@ class ResourceLoaderContext {
 		// Interpret request
 		// List of modules
 		$modules = $request->getVal( 'modules' );
-		$this->modules   = $modules ? self::expandModuleNames( $modules ) : array();
+		$this->modules = $modules ? self::expandModuleNames( $modules ) : array();
 		// Various parameters
-		$this->skin      = $request->getVal( 'skin' );
-		$this->user      = $request->getVal( 'user' );
-		$this->debug     = $request->getFuzzyBool( 'debug', $wgResourceLoaderDebug );
-		$this->only      = $request->getVal( 'only' );
-		$this->version   = $request->getVal( 'version' );
-		$this->raw       = $request->getFuzzyBool( 'raw' );
+		$this->skin = $request->getVal( 'skin' );
+		$this->user = $request->getVal( 'user' );
+		$this->debug = $request->getFuzzyBool( 'debug', $wgResourceLoaderDebug );
+		$this->only = $request->getVal( 'only' );
+		$this->version = $request->getVal( 'version' );
+		$this->raw = $request->getFuzzyBool( 'raw' );
 
 		$skinnames = Skin::getSkinNames();
 		// If no skin is specified, or we don't recognize the skin, use the default skin
@@ -145,7 +145,7 @@ class ResourceLoaderContext {
 	public function getLanguage() {
 		if ( $this->language === null ) {
 			global $wgLang;
-			$this->language  = $this->request->getVal( 'lang' );
+			$this->language = $this->request->getVal( 'lang' );
 			if ( !$this->language ) {
 				$this->language = $wgLang->getCode();
 			}
diff --git a/includes/resourceloader/ResourceLoaderModule.php b/includes/resourceloader/ResourceLoaderModule.php
index e4ae0a2f75..2b83110965 100644
--- a/includes/resourceloader/ResourceLoaderModule.php
+++ b/includes/resourceloader/ResourceLoaderModule.php
@@ -408,7 +408,6 @@ abstract class ResourceLoaderModule {
 		return false;
 	}
 
-
 	/** @var JSParser lazy-initialized; use self::javaScriptParser() */
 	private static $jsParser;
 	private static $parseCacheVersion = 1;
diff --git a/includes/resourceloader/ResourceLoaderWikiModule.php b/includes/resourceloader/ResourceLoaderWikiModule.php
index 4ea9f4e49e..6c60d4746b 100644
--- a/includes/resourceloader/ResourceLoaderWikiModule.php
+++ b/includes/resourceloader/ResourceLoaderWikiModule.php
@@ -126,7 +126,7 @@ abstract class ResourceLoaderWikiModule extends ResourceLoaderModule {
 			if ( strval( $script ) !== '' ) {
 				$script = $this->validateScriptFile( $titleText, $script );
 				if ( strpos( $titleText, '*/' ) === false ) {
-					$scripts .=  "/* $titleText */\n";
+					$scripts .= "/* $titleText */\n";
 				}
 				$scripts .= $script . "\n";
 			}
@@ -163,7 +163,7 @@ abstract class ResourceLoaderWikiModule extends ResourceLoaderModule {
 				$styles[$media] = array();
 			}
 			if ( strpos( $titleText, '*/' ) === false ) {
-				$style =  "/* $titleText */\n" . $style;
+				$style = "/* $titleText */\n" . $style;
 			}
 			$styles[$media][] = $style;
 		}
diff --git a/includes/revisiondelete/RevisionDelete.php b/includes/revisiondelete/RevisionDelete.php
index d64201cfb1..1ace383684 100644
--- a/includes/revisiondelete/RevisionDelete.php
+++ b/includes/revisiondelete/RevisionDelete.php
@@ -398,7 +398,6 @@ class RevDel_ArchiveItem extends RevDel_RevisionItem {
 	}
 }
 
-
 /**
  * Item class for a archive table row by ar_rev_id -- actually
  * used via RevDel_RevisionList.
diff --git a/includes/search/SearchEngine.php b/includes/search/SearchEngine.php
index 5e5755c679..f6b70813fc 100644
--- a/includes/search/SearchEngine.php
+++ b/includes/search/SearchEngine.php
@@ -239,7 +239,6 @@ class SearchEngine {
 
 		$title = Title::newFromText( $searchterm );
 
-
 		# Entering an IP address goes to the contributions page
 		if ( $wgEnableSearchContributorsByIP ) {
 			if ( ( $title->getNamespace() == NS_USER && User::isIP( $title->getText() ) )
@@ -248,7 +247,6 @@ class SearchEngine {
 			}
 		}
 
-
 		# Entering a user goes to the user page whether it's there or not
 		if ( $title->getNamespace() == NS_USER ) {
 			return $title;
@@ -675,7 +673,6 @@ class SearchResultTooMany {
 	# # Some search engines may bail out if too many matches are found
 }
 
-
 /**
  * @todo FIXME: This class is horribly factored. It would probably be better to
  * have a useful base class to which you pass some standard information, then
@@ -973,7 +970,7 @@ class SearchHighlighter {
 		}
 		$spat .= '/';
 		$textExt = array(); // text extracts
-		$otherExt = array();  // other extracts
+		$otherExt = array(); // other extracts
 		wfProfileIn( "$fname-split" );
 		$start = 0;
 		$textLen = strlen( $text );
diff --git a/includes/search/SearchMssql.php b/includes/search/SearchMssql.php
index 85fe148af2..fc2aeb4c78 100644
--- a/includes/search/SearchMssql.php
+++ b/includes/search/SearchMssql.php
@@ -59,7 +59,6 @@ class SearchMssql extends SearchEngine {
 		return new MssqlSearchResultSet( $resultSet, $this->searchTerms );
 	}
 
-
 	/**
 	 * Return a partial WHERE clause to exclude redirects, if so set
 	 *
@@ -144,7 +143,7 @@ class SearchMssql extends SearchEngine {
 	 */
 	function queryMain( $filteredTerm, $fulltext ) {
 		$match = $this->parseQuery( $filteredTerm, $fulltext );
-		$page        = $this->db->tableName( 'page' );
+		$page = $this->db->tableName( 'page' );
 		$searchindex = $this->db->tableName( 'searchindex' );
 
 		return 'SELECT page_id, page_namespace, page_title, ftindex.[RANK]' .
diff --git a/includes/search/SearchOracle.php b/includes/search/SearchOracle.php
index 009502b1ff..dee2686b38 100644
--- a/includes/search/SearchOracle.php
+++ b/includes/search/SearchOracle.php
@@ -93,7 +93,6 @@ class SearchOracle extends SearchEngine {
 		return new MySQLSearchResultSet( $resultSet, $this->searchTerms );
 	}
 
-
 	/**
 	 * Return a partial WHERE clause to exclude redirects, if so set
 	 * @return String
@@ -156,7 +155,6 @@ class SearchOracle extends SearchEngine {
 			$this->queryRanking( $filteredTerm, $fulltext ) . ' ' );
 	}
 
-
 	/**
 	 * Picks which field to index on, depending on what type of query.
 	 * @param $fulltext Boolean
@@ -221,7 +219,6 @@ class SearchOracle extends SearchEngine {
 			}
 		}
 
-
 		$searchon = $this->db->addQuotes( ltrim( $searchon, ' &' ) );
 		$field = $this->getIndexField( $fulltext );
 		return " CONTAINS($field, $searchon, 1) > 0 ";
@@ -281,7 +278,6 @@ class SearchOracle extends SearchEngine {
 			array() );
 	}
 
-
 	public static function legalSearchChars() {
 		return "\"" . parent::legalSearchChars();
 	}
diff --git a/includes/search/SearchSqlite.php b/includes/search/SearchSqlite.php
index f91399a5d8..c82dbee586 100644
--- a/includes/search/SearchSqlite.php
+++ b/includes/search/SearchSqlite.php
@@ -196,7 +196,6 @@ class SearchSqlite extends SearchEngine {
 		return new SqliteSearchResultSet( $resultSet, $this->searchTerms, $total );
 	}
 
-
 	/**
 	 * Return a partial WHERE clause to exclude redirects, if so set
 	 * @return String
@@ -275,7 +274,7 @@ class SearchSqlite extends SearchEngine {
 
 	function getCountQuery( $filteredTerm, $fulltext ) {
 		$match = $this->parseQuery( $filteredTerm, $fulltext );
-		$page        = $this->db->tableName( 'page' );
+		$page = $this->db->tableName( 'page' );
 		$searchindex = $this->db->tableName( 'searchindex' );
 		return "SELECT COUNT(*) AS c " .
 			"FROM $page,$searchindex " .
diff --git a/includes/site/MediaWikiSite.php b/includes/site/MediaWikiSite.php
index 0de97af2f2..530746ce1c 100644
--- a/includes/site/MediaWikiSite.php
+++ b/includes/site/MediaWikiSite.php
@@ -169,7 +169,6 @@ class MediaWikiSite extends Site {
 		return $page['title'];
 	}
 
-
 	/**
 	 * Get normalization record for a given page title from an API response.
 	 *
diff --git a/includes/site/Site.php b/includes/site/Site.php
index 525c3759c6..076dc88cc2 100644
--- a/includes/site/Site.php
+++ b/includes/site/Site.php
@@ -40,7 +40,6 @@ class Site implements Serializable {
 
 	const PATH_LINK = 'link';
 
-
 	/**
 	 * A version ID that identifies the serialization structure used by getSerializationData()
 	 * and unserialize(). This is useful for constructing cache keys in cases where the cache relies
diff --git a/includes/specials/SpecialAllmessages.php b/includes/specials/SpecialAllmessages.php
index 5f8a0e41da..e3424ece89 100644
--- a/includes/specials/SpecialAllmessages.php
+++ b/includes/specials/SpecialAllmessages.php
@@ -113,7 +113,7 @@ class AllmessagesTablePager extends TablePager {
 
 		$this->lang = ( $langObj ? $langObj : $wgContLang );
 		$this->langcode = $this->lang->getCode();
-		$this->foreign  = $this->langcode != $wgContLang->getCode();
+		$this->foreign = $this->langcode != $wgContLang->getCode();
 
 		$request = $this->getRequest();
 
@@ -333,11 +333,9 @@ class AllmessagesTablePager extends TablePager {
 
 	function formatValue( $field, $value ) {
 		switch( $field ) {
-
 			case 'am_title' :
-
 				$title = Title::makeTitle( NS_MEDIAWIKI, $value . $this->suffix );
-				$talk  = Title::makeTitle( NS_MEDIAWIKI_TALK, $value . $this->suffix );
+				$talk = Title::makeTitle( NS_MEDIAWIKI_TALK, $value . $this->suffix );
 
 				if( $this->mCurrentRow->am_customised ) {
 					$title = Linker::linkKnown( $title, $this->getLanguage()->lcfirst( $value ) );
diff --git a/includes/specials/SpecialAllpages.php b/includes/specials/SpecialAllpages.php
index eeda739231..d401d34e5b 100644
--- a/includes/specials/SpecialAllpages.php
+++ b/includes/specials/SpecialAllpages.php
@@ -116,7 +116,7 @@ class SpecialAllpages extends IncludableSpecialPage {
 		global $wgScript;
 		$t = $this->getTitle();
 
-		$out  = Xml::openElement( 'div', array( 'class' => 'namespaceoptions' ) );
+		$out = Xml::openElement( 'div', array( 'class' => 'namespaceoptions' ) );
 		$out .= Xml::openElement( 'form', array( 'method' => 'get', 'action' => $wgScript ) );
 		$out .= Html::hidden( 'title', $t->getPrefixedText() );
 		$out .= Xml::openElement( 'fieldset' );
@@ -457,7 +457,7 @@ class SpecialAllpages extends IncludableSpecialPage {
 								Linker::link( $self, $this->msg( 'allpages' )->escaped() );
 
 			# Do we put a previous link ?
-			if( isset( $prevTitle ) &&  $pt = $prevTitle->getText() ) {
+			if( isset( $prevTitle ) && $pt = $prevTitle->getText() ) {
 				$query = array( 'from' => $prevTitle->getText() );
 
 				if( $namespace )
diff --git a/includes/specials/SpecialBooksources.php b/includes/specials/SpecialBooksources.php
index 255b1b64cf..527dbb776f 100644
--- a/includes/specials/SpecialBooksources.php
+++ b/includes/specials/SpecialBooksources.php
@@ -116,7 +116,7 @@ class SpecialBookSources extends SpecialPage {
 	private function makeForm() {
 		global $wgScript;
 
-		$form  = '
' . $this->msg( 'booksources-search-legend' )->escaped() . ''; + $form = '
' . $this->msg( 'booksources-search-legend' )->escaped() . ''; $form .= Xml::openElement( 'form', array( 'method' => 'get', 'action' => $wgScript ) ); $form .= Html::hidden( 'title', $this->getTitle()->getPrefixedText() ); $form .= '

' . Xml::inputLabel( $this->msg( 'booksources-isbn' )->text(), 'isbn', 'isbn', 20, $this->isbn ); diff --git a/includes/specials/SpecialConfirmemail.php b/includes/specials/SpecialConfirmemail.php index 85a415d915..816a634354 100644 --- a/includes/specials/SpecialConfirmemail.php +++ b/includes/specials/SpecialConfirmemail.php @@ -98,7 +98,7 @@ class EmailConfirmation extends UnlistedSpecialPage { $out->wrapWikiMsg( "

\n$1\n
", 'confirmemail_pending' ); } $out->addWikiMsg( 'confirmemail_text' ); - $form = Xml::openElement( 'form', array( 'method' => 'post', 'action' => $this->getTitle()->getLocalUrl() ) ); + $form = Xml::openElement( 'form', array( 'method' => 'post', 'action' => $this->getTitle()->getLocalUrl() ) ); $form .= Html::hidden( 'token', $user->getEditToken() ); $form .= Xml::submitButton( $this->msg( 'confirmemail_send' )->text() ); $form .= Xml::closeElement( 'form' ); diff --git a/includes/specials/SpecialContributions.php b/includes/specials/SpecialContributions.php index d156d20ed6..569fde5db7 100644 --- a/includes/specials/SpecialContributions.php +++ b/includes/specials/SpecialContributions.php @@ -192,7 +192,6 @@ class SpecialContributions extends SpecialPage { } $out->preventClickjacking( $pager->getPreventClickjacking() ); - # Show the appropriate "footer" message - WHOIS tools, etc. if ( $this->opts['contribs'] == 'newbie' ) { $message = 'sp-contributions-footer-newbies'; diff --git a/includes/specials/SpecialFewestrevisions.php b/includes/specials/SpecialFewestrevisions.php index 7e4bc9cee3..5366e3b4c6 100644 --- a/includes/specials/SpecialFewestrevisions.php +++ b/includes/specials/SpecialFewestrevisions.php @@ -60,7 +60,6 @@ class FewestrevisionsPage extends QueryPage { ); } - function sortDescending() { return false; } diff --git a/includes/specials/SpecialLinkSearch.php b/includes/specials/SpecialLinkSearch.php index f5fa6972e9..018ad79d8d 100644 --- a/includes/specials/SpecialLinkSearch.php +++ b/includes/specials/SpecialLinkSearch.php @@ -22,7 +22,6 @@ * @author Brion Vibber */ - /** * Special:LinkSearch to search the external-links table. * @ingroup SpecialPage diff --git a/includes/specials/SpecialLog.php b/includes/specials/SpecialLog.php index 7800e56620..0b9cf43889 100644 --- a/includes/specials/SpecialLog.php +++ b/includes/specials/SpecialLog.php @@ -182,7 +182,6 @@ class SpecialLog extends SpecialPage { return $s; } - /** * Set page title and show header for this log type * @param $type string diff --git a/includes/specials/SpecialMIMEsearch.php b/includes/specials/SpecialMIMEsearch.php index 432956fc3d..7350cc745a 100644 --- a/includes/specials/SpecialMIMEsearch.php +++ b/includes/specials/SpecialMIMEsearch.php @@ -92,7 +92,6 @@ class MIMEsearchPage extends QueryPage { parent::execute( $par ); } - function formatResult( $skin, $result ) { global $wgContLang; diff --git a/includes/specials/SpecialMovepage.php b/includes/specials/SpecialMovepage.php index bf93ef2e38..b76e8777b7 100644 --- a/includes/specials/SpecialMovepage.php +++ b/includes/specials/SpecialMovepage.php @@ -71,7 +71,6 @@ class MovePageForm extends UnlistedSpecialPage { ? Title::newFromText( $newTitleText_bc ) : Title::makeTitleSafe( $newTitleTextNs, $newTitleTextMain ); - $user = $this->getUser(); # Check rights @@ -494,7 +493,6 @@ class MovePageForm extends UnlistedSpecialPage { $msgName = 'movepage-moved-noredirect'; } - $out->addHTML( $this->msg( 'movepage-moved' )->rawParams( $oldLink, $newLink )->params( $oldText, $newText )->parseAsBlock() ); $out->addWikiMsg( $msgName ); diff --git a/includes/specials/SpecialNewimages.php b/includes/specials/SpecialNewimages.php index caf48bec00..7954795b6b 100644 --- a/includes/specials/SpecialNewimages.php +++ b/includes/specials/SpecialNewimages.php @@ -44,7 +44,6 @@ class SpecialNewFiles extends IncludableSpecialPage { } } - /** * @ingroup SpecialPage Pager */ diff --git a/includes/specials/SpecialPrefixindex.php b/includes/specials/SpecialPrefixindex.php index e1e18e4db5..7586dbb9df 100644 --- a/includes/specials/SpecialPrefixindex.php +++ b/includes/specials/SpecialPrefixindex.php @@ -90,7 +90,7 @@ class SpecialPrefixindex extends SpecialAllpages { function namespacePrefixForm( $namespace = NS_MAIN, $from = '', $hideredirects = false ) { global $wgScript; - $out = Xml::openElement( 'div', array( 'class' => 'namespaceoptions' ) ); + $out = Xml::openElement( 'div', array( 'class' => 'namespaceoptions' ) ); $out .= Xml::openElement( 'form', array( 'method' => 'get', 'action' => $wgScript ) ); $out .= Html::hidden( 'title', $this->getTitle()->getPrefixedText() ); $out .= Xml::openElement( 'fieldset' ); diff --git a/includes/specials/SpecialProtectedpages.php b/includes/specials/SpecialProtectedpages.php index d580d626f7..bc0cab730f 100644 --- a/includes/specials/SpecialProtectedpages.php +++ b/includes/specials/SpecialProtectedpages.php @@ -29,7 +29,7 @@ class SpecialProtectedpages extends SpecialPage { protected $IdLevel = 'level'; - protected $IdType = 'type'; + protected $IdType = 'type'; public function __construct() { parent::__construct( 'Protectedpages' ); diff --git a/includes/specials/SpecialProtectedtitles.php b/includes/specials/SpecialProtectedtitles.php index abb4af3ff5..bac8b7bdc5 100644 --- a/includes/specials/SpecialProtectedtitles.php +++ b/includes/specials/SpecialProtectedtitles.php @@ -29,7 +29,7 @@ class SpecialProtectedtitles extends SpecialPage { protected $IdLevel = 'level'; - protected $IdType = 'type'; + protected $IdType = 'type'; public function __construct() { parent::__construct( 'Protectedtitles' ); diff --git a/includes/specials/SpecialRandompage.php b/includes/specials/SpecialRandompage.php index 13a7043467..74fe66cbd9 100644 --- a/includes/specials/SpecialRandompage.php +++ b/includes/specials/SpecialRandompage.php @@ -28,7 +28,7 @@ * @ingroup SpecialPage */ class RandomPage extends SpecialPage { - private $namespaces; // namespaces to select pages from + private $namespaces; // namespaces to select pages from protected $isRedir = false; // should the result be a redirect? protected $extra = array(); // Extra SQL statements diff --git a/includes/specials/SpecialRecentchanges.php b/includes/specials/SpecialRecentchanges.php index 2cc5f9ea87..69c291dd66 100644 --- a/includes/specials/SpecialRecentchanges.php +++ b/includes/specials/SpecialRecentchanges.php @@ -129,7 +129,6 @@ class SpecialRecentChanges extends IncludableSpecialPage { return $this->rcOptions; } - /** * Main execution point * @@ -340,7 +339,7 @@ class SpecialRecentChanges extends IncludableSpecialPage { if( $opts['namespace'] !== '' ) { $selectedNS = $dbr->addQuotes( $opts['namespace'] ); $operator = $opts['invert'] ? '!=' : '='; - $boolean = $opts['invert'] ? 'AND' : 'OR'; + $boolean = $opts['invert'] ? 'AND' : 'OR'; # namespace association (bug 2429) if( !$opts['associated'] ) { @@ -863,7 +862,6 @@ class SpecialRecentChanges extends IncludableSpecialPage { } $dl = $lang->pipeList( $dl ); - // show/hide links $showhide = array( $this->msg( 'show' )->text(), $this->msg( 'hide' )->text() ); $filters = array( diff --git a/includes/specials/SpecialSearch.php b/includes/specials/SpecialSearch.php index 3dc90c6d61..ae2b00911d 100644 --- a/includes/specials/SpecialSearch.php +++ b/includes/specials/SpecialSearch.php @@ -356,7 +356,6 @@ class SpecialSearch extends SpecialPage { $out->addHTML( $this->formHeader( $term, $num, $totalRes ) ); $out->addHtml( $this->getProfileForm( $this->profile, $term ) ); - $out->addHtml( Xml::closeElement( 'form' ) ); $out->addHtml( "
" ); diff --git a/includes/specials/SpecialUncategorizedpages.php b/includes/specials/SpecialUncategorizedpages.php index 37fcb2f24f..abbe997fd6 100644 --- a/includes/specials/SpecialUncategorizedpages.php +++ b/includes/specials/SpecialUncategorizedpages.php @@ -55,7 +55,7 @@ class UncategorizedPagesPage extends PageQueryPage { // default for page_namespace is all content namespaces (if requestedNamespace is false) // otherwise, page_namespace is requestedNamespace 'conds' => array ( 'cl_from IS NULL', - 'page_namespace' => ( $this->requestedNamespace!==false ? $this->requestedNamespace : MWNamespace::getContentNamespaces() ), + 'page_namespace' => ( $this->requestedNamespace !== false ? $this->requestedNamespace : MWNamespace::getContentNamespaces() ), 'page_is_redirect' => 0 ), 'join_conds' => array ( 'categorylinks' => array ( 'LEFT JOIN', 'cl_from = page_id' ) ) diff --git a/includes/specials/SpecialUndelete.php b/includes/specials/SpecialUndelete.php index b6578a34a2..b97a171888 100644 --- a/includes/specials/SpecialUndelete.php +++ b/includes/specials/SpecialUndelete.php @@ -447,9 +447,9 @@ class PageArchive { $makepage = false; # Page already exists. Import the history, and if necessary # we'll update the latest revision field in the record. - $newid = 0; - $pageId = $page->page_id; - $previousRevId = $page->page_latest; + $newid = 0; + $pageId = $page->page_id; + $previousRevId = $page->page_latest; # Get the time span of this page $previousTimestamp = $dbw->selectField( 'revision', 'rev_timestamp', array( 'rev_id' => $previousRevId ), @@ -552,7 +552,7 @@ class PageArchive { return Status::newFatal( "undeleterevdel" ); } // Safe to insert now... - $newid = $article->insertOn( $dbw ); + $newid = $article->insertOn( $dbw ); $pageId = $newid; } else { // Check if a deleted revision will become the current revision... @@ -563,7 +563,7 @@ class PageArchive { } } - $newid = false; + $newid = false; $pageId = $article->getId(); } @@ -1260,7 +1260,7 @@ class SpecialUndelete extends SpecialPage { if ( $this->mAllowed ) { # Slip in the hidden controls here - $misc = Html::hidden( 'target', $this->mTarget ); + $misc = Html::hidden( 'target', $this->mTarget ); $misc .= Html::hidden( 'wpEditToken', $this->getUser()->getEditToken() ); $misc .= Xml::closeElement( 'form' ); $out->addHTML( $misc ); diff --git a/includes/specials/SpecialUpload.php b/includes/specials/SpecialUpload.php index a37f5fb3fe..1a35b04f3b 100644 --- a/includes/specials/SpecialUpload.php +++ b/includes/specials/SpecialUpload.php @@ -39,7 +39,7 @@ class SpecialUpload extends SpecialPage { } /** Misc variables **/ - public $mRequest; // The WebRequest or FauxRequest this form is supposed to handle + public $mRequest; // The WebRequest or FauxRequest this form is supposed to handle public $mSourceType; /** @@ -54,7 +54,7 @@ class SpecialUpload extends SpecialPage { public $mUploadClicked; /** User input variables from the "description" section **/ - public $mDesiredDestName; // The requested target file name + public $mDesiredDestName; // The requested target file name public $mComment; public $mLicense; @@ -66,10 +66,10 @@ class SpecialUpload extends SpecialPage { /** Hidden variables **/ public $mDestWarningAck; - public $mForReUpload; // The user followed an "overwrite this file" link - public $mCancelUpload; // The user clicked "Cancel and return to upload form" button + public $mForReUpload; // The user followed an "overwrite this file" link + public $mCancelUpload; // The user clicked "Cancel and return to upload form" button public $mTokenOk; - public $mUploadSuccessful = false; // Subclasses can use this to determine whether a file was uploaded + public $mUploadSuccessful = false; // Subclasses can use this to determine whether a file was uploaded /** Text injection points for hooks not using HTMLForm **/ public $uploadFormTextTop; @@ -103,7 +103,6 @@ class SpecialUpload extends SpecialPage { $this->mCopyrightStatus = $request->getText( 'wpUploadCopyStatus' ); $this->mCopyrightSource = $request->getText( 'wpUploadSource' ); - $this->mForReUpload = $request->getBool( 'wpForReUpload' ); // updating a file $this->mCancelUpload = $request->getCheck( 'wpCancelUpload' ) || $request->getCheck( 'wpReUpload' ); // b/w compat @@ -522,7 +521,6 @@ class SpecialUpload extends SpecialPage { } } - /** * Provides output to the user for a result of UploadBase::verifyUpload * @@ -1084,7 +1082,6 @@ class UploadForm extends HTMLForm { $out = $this->getOutput(); $out->addJsConfigVars( $scriptVars ); - $out->addModules( array( 'mediawiki.action.edit', // For support 'mediawiki.legacy.upload', // Old form stuff... diff --git a/includes/specials/SpecialUserlogin.php b/includes/specials/SpecialUserlogin.php index 634d06f8d1..ddd57c3f61 100644 --- a/includes/specials/SpecialUserlogin.php +++ b/includes/specials/SpecialUserlogin.php @@ -604,7 +604,7 @@ class LoginForm extends SpecialPage { // faces etc will probably just fail cleanly here. $retval = self::RESET_PASS; } else { - $retval = ( $this->mPassword == '' ) ? self::EMPTY_PASS : self::WRONG_PASS; + $retval = ( $this->mPassword == '' ) ? self::EMPTY_PASS : self::WRONG_PASS; } } elseif ( $wgBlockDisablesLogin && $u->isBlocked() ) { // If we've enabled it, make it so that a blocked user cannot login @@ -870,7 +870,6 @@ class LoginForm extends SpecialPage { return $result; } - /** * Run any hooks registered for logins, then HTTP redirect to * $this->mReturnTo (or Main Page if that's undefined). Formerly we had a diff --git a/includes/specials/SpecialUserrights.php b/includes/specials/SpecialUserrights.php index 4d43bafbfb..22fdc1a167 100644 --- a/includes/specials/SpecialUserrights.php +++ b/includes/specials/SpecialUserrights.php @@ -240,7 +240,6 @@ class UserrightsPage extends SpecialPage { return array( $add, $remove ); } - /** * Add a rights log entry for an action. */ diff --git a/includes/specials/SpecialVersion.php b/includes/specials/SpecialVersion.php index f847ca37a0..6447bbecbe 100644 --- a/includes/specials/SpecialVersion.php +++ b/includes/specials/SpecialVersion.php @@ -779,7 +779,6 @@ class SpecialVersion extends SpecialPage { return $repo->getHeadSHA1(); } - /** * Get the list of entry points and their URLs * @return string Wikitext diff --git a/includes/specials/SpecialWatchlist.php b/includes/specials/SpecialWatchlist.php index 7114fc9593..c498bdeaf4 100644 --- a/includes/specials/SpecialWatchlist.php +++ b/includes/specials/SpecialWatchlist.php @@ -200,7 +200,6 @@ class SpecialWatchlist extends SpecialPage { # Up estimate of watched items by 15% to compensate for talk pages... - # Toggles if( $values['hideOwn'] ) { $conds[] = 'rc_user != ' . $user->getId(); diff --git a/includes/upload/UploadBase.php b/includes/upload/UploadBase.php index 9d756f8cb2..7d82f0bda0 100644 --- a/includes/upload/UploadBase.php +++ b/includes/upload/UploadBase.php @@ -704,8 +704,6 @@ abstract class UploadBase { } $this->mFilteredName = $nt->getDBkey(); - - /** * We'll want to blacklist against *any* 'extension', and use * only the final one for the whitelist. @@ -733,7 +731,6 @@ abstract class UploadBase { $ext = array( $this->mFinalExtension ); } } - } /* Don't allow users to override the blacklist (check file extension) */ @@ -1128,14 +1125,13 @@ abstract class UploadBase { } # use set to add a remote / data / script target to an element - if( $strippedElement == 'set' && $stripped == 'to' && preg_match( '!(http|https|data|script):!sim', $value ) ) { + if( $strippedElement == 'set' && $stripped == 'to' && preg_match( '!(http|https|data|script):!sim', $value ) ) { wfDebug( __METHOD__ . ": Found svg setting attibute to '$value' in uploaded file.\n" ); return true; } - # use handler attribute with remote / data / script - if( $stripped == 'handler' && preg_match( '!(http|https|data|script):!sim', $value ) ) { + if( $stripped == 'handler' && preg_match( '!(http|https|data|script):!sim', $value ) ) { wfDebug( __METHOD__ . ": Found svg setting handler with remote/data/script '$attrib'='$value' in uploaded file.\n" ); return true; } @@ -1408,7 +1404,6 @@ abstract class UploadBase { } } - foreach( self::getFilenamePrefixBlacklist() as $prefix ) { if ( substr( $partname, 0, strlen( $prefix ) ) == $prefix ) { return array( diff --git a/includes/upload/UploadStash.php b/includes/upload/UploadStash.php index 70debee948..6bb56853e7 100644 --- a/includes/upload/UploadStash.php +++ b/includes/upload/UploadStash.php @@ -349,7 +349,6 @@ class UploadStash { return $this->removeFileNoAuth( $key ); } - /** * Remove a file (see removeFile), but doesn't check ownership first. *