fix some spacing
authorumherirrender <umherirrender_de.wp@web.de>
Sat, 26 Jan 2013 18:32:03 +0000 (19:32 +0100)
committerumherirrender <umherirrender_de.wp@web.de>
Sun, 27 Jan 2013 13:21:50 +0000 (14:21 +0100)
Change-Id: Ie7bb35871cc99237f3a655f7db22ca1f0646df5e

27 files changed:
includes/Block.php
includes/ChangesList.php
includes/EditPage.php
includes/Exception.php
includes/Export.php
includes/ExternalEdit.php
includes/ExternalUser.php
includes/HistoryBlob.php
includes/ImagePage.php
includes/Import.php
includes/MagicWord.php
includes/Message.php
includes/Metadata.php
includes/OutputPage.php
includes/PHPVersionError.php
includes/Pager.php
includes/Preferences.php
includes/Sanitizer.php
includes/Setup.php
includes/SiteConfiguration.php
includes/SquidPurgeClient.php
includes/Title.php
includes/User.php
includes/WebResponse.php
includes/Wiki.php
includes/WikiPage.php
includes/Xml.php

index b81cf3a..fde5f07 100644 (file)
@@ -65,7 +65,7 @@ class Block {
                $timestamp = 0, $auto = 0, $expiry = '', $anonOnly = 0, $createAccount = 0, $enableAutoblock = 0,
                $hideName = 0, $blockEmail = 0, $allowUsertalk = 0, $byText = '' )
        {
-               if( $timestamp === 0 ){
+               if( $timestamp === 0 ) {
                        $timestamp = wfTimestampNow();
                }
 
@@ -206,16 +206,16 @@ class Block {
         */
        public function load( $address = '', $user = 0 ) {
                wfDeprecated( __METHOD__, '1.18' );
-               if( $user ){
+               if( $user ) {
                        $username = User::whoIs( $user );
                        $block = self::newFromTarget( $username, $address );
                } else {
                        $block = self::newFromTarget( null, $address );
                }
 
-               if( $block instanceof Block ){
+               if( $block instanceof Block ) {
                        # This is mildly evil, but hey, it's B/C :D
-                       foreach( $block as $variable => $value ){
+                       foreach( $block as $variable => $value ) {
                                $this->$variable = $value;
                        }
                        return true;
@@ -237,7 +237,7 @@ class Block {
        protected function newLoad( $vagueTarget = null ) {
                $db = wfGetDB( $this->mFromMaster ? DB_MASTER : DB_SLAVE );
 
-               if( $this->type !== null ){
+               if( $this->type !== null ) {
                        $conds = array(
                                'ipb_address' => array( (string)$this->target ),
                        );
@@ -247,7 +247,7 @@ class Block {
 
                # Be aware that the != '' check is explicit, since empty values will be
                # passed by some callers (bug 29116)
-               if( $vagueTarget != ''){
+               if( $vagueTarget != '' ) {
                        list( $target, $type ) = self::parseTarget( $vagueTarget );
                        switch( $type ) {
                                case self::TYPE_USER:
@@ -285,20 +285,20 @@ class Block {
                # This is begging for $this = $bestBlock, but that's not allowed in PHP :(
                $bestBlockPreventsEdit = null;
 
-               foreach( $res as $row ){
+               foreach( $res as $row ) {
                        $block = self::newFromRow( $row );
 
                        # Don't use expired blocks
-                       if( $block->deleteIfExpired() ){
+                       if( $block->deleteIfExpired() ) {
                                continue;
                        }
 
                        # Don't use anon only blocks on users
-                       if( $this->type == self::TYPE_USER && !$block->isHardblock() ){
+                       if( $this->type == self::TYPE_USER && !$block->isHardblock() ) {
                                continue;
                        }
 
-                       if( $block->getType() == self::TYPE_RANGE ){
+                       if( $block->getType() == self::TYPE_RANGE ) {
                                # This is the number of bits that are allowed to vary in the block, give
                                # or take some floating point errors
                                $end = wfBaseconvert( $block->getRangeEnd(), 16, 10 );
@@ -313,14 +313,14 @@ class Block {
                                $score = $block->getType();
                        }
 
-                       if( $score < $bestBlockScore ){
+                       if( $score < $bestBlockScore ) {
                                $bestBlockScore = $score;
                                $bestRow = $row;
                                $bestBlockPreventsEdit = $block->prevents( 'edit' );
                        }
                }
 
-               if( $bestRow !== null ){
+               if( $bestRow !== null ) {
                        $this->initFromRow( $bestRow );
                        $this->prevents( 'edit', $bestBlockPreventsEdit );
                        return true;
@@ -371,9 +371,9 @@ class Block {
        protected static function getIpFragment( $hex ) {
                global $wgBlockCIDRLimit;
                if ( substr( $hex, 0, 3 ) == 'v6-' ) {
-                       return 'v6-' . substr( substr( $hex, 3 ), 0,  floor( $wgBlockCIDRLimit['IPv6'] / 4 ) );
+                       return 'v6-' . substr( substr( $hex, 3 ), 0, floor( $wgBlockCIDRLimit['IPv6'] / 4 ) );
                } else {
-                       return substr( $hex, 0,  floor( $wgBlockCIDRLimit['IPv4'] / 4 ) );
+                       return substr( $hex, 0, floor( $wgBlockCIDRLimit['IPv4'] / 4 ) );
                }
        }
 
@@ -511,7 +511,7 @@ class Block {
         * @return Array
         */
        protected function getDatabaseArray( $db = null ) {
-               if( !$db ){
+               if( !$db ) {
                        $db = wfGetDB( DB_SLAVE );
                }
                $expiry = $db->encodeExpiry( $this->mExpiry );
@@ -592,7 +592,7 @@ class Block {
                $options['LIMIT'] = 1;
 
                $res = $dbr->select( 'recentchanges', array( 'rc_ip' ), $conds,
-                       __METHOD__ ,  $options );
+                       __METHOD__, $options );
 
                if ( !$res->numRows() ) {
                        # No results, don't autoblock anything
@@ -1050,10 +1050,10 @@ class Block {
        public static function newFromTarget( $specificTarget, $vagueTarget = null, $fromMaster = false ) {
 
                list( $target, $type ) = self::parseTarget( $specificTarget );
-               if( $type == Block::TYPE_ID || $type == Block::TYPE_AUTO ){
+               if( $type == Block::TYPE_ID || $type == Block::TYPE_AUTO ) {
                        return Block::newFromID( $target );
 
-               } elseif( $target === null && $vagueTarget == '' ){
+               } elseif( $target === null && $vagueTarget == '' ) {
                        # We're not going to find anything useful here
                        # Be aware that the == '' check is explicit, since empty values will be
                        # passed by some callers (bug 29116)
@@ -1063,11 +1063,11 @@ class Block {
                        $block = new Block();
                        $block->fromMaster( $fromMaster );
 
-                       if( $type !== null ){
+                       if( $type !== null ) {
                                $block->setTarget( $target );
                        }
 
-                       if( $block->newLoad( $vagueTarget ) ){
+                       if( $block->newLoad( $vagueTarget ) ) {
                                return $block;
                        }
                }
@@ -1085,13 +1085,13 @@ class Block {
         */
        public static function parseTarget( $target ) {
                # We may have been through this before
-               if( $target instanceof User ){
-                       if( IP::isValid( $target->getName() ) ){
+               if( $target instanceof User ) {
+                       if( IP::isValid( $target->getName() ) ) {
                                return array( $target, self::TYPE_IP );
                        } else {
                                return array( $target, self::TYPE_USER );
                        }
-               } elseif( $target === null ){
+               } elseif( $target === null ) {
                        return array( null, null );
                }
 
@@ -1112,7 +1112,7 @@ class Block {
 
                # Consider the possibility that this is not a username at all
                # but actually an old subpage (bug #29797)
-               if( strpos( $target, '/' ) !== false ){
+               if( strpos( $target, '/' ) !== false ) {
                        # An old subpage, drill down to the user behind it
                        $parts = explode( '/', $target );
                        $target = $parts[0];
index e98fcac..85fd8af 100644 (file)
@@ -136,7 +136,7 @@ class ChangesList extends ContextSource {
         */
        protected function recentChangesFlags( $flags, $nothing = '&#160;' ) {
                $f = '';
-               foreach( array( 'newpage', 'minor', 'bot', 'unpatrolled' ) as $flag ){
+               foreach( array( 'newpage', 'minor', 'bot', 'unpatrolled' ) as $flag ) {
                        $f .= isset( $flags[$flag] ) && $flags[$flag]
                                ? self::flag( $flag )
                                : $nothing;
@@ -378,7 +378,7 @@ class ChangesList extends ContextSource {
                        array( 'class' => 'mw-changeslist-title' ),
                        $params
                );
-               if( $this->isDeleted($rc,Revision::DELETED_TEXT) ) {
+               if( $this->isDeleted( $rc, Revision::DELETED_TEXT ) ) {
                        $articlelink = '<span class="history-deleted">' . $articlelink . '</span>';
                }
                # To allow for boldening pages watched by this user
@@ -846,7 +846,7 @@ class EnhancedChangesList extends ChangesList {
                        $this->rc_cache['@@' . ($this->rcMoveIndex++)] = array($rc);
                } else {
                        # Logs are grouped by type
-                       if( $type == RC_LOG ){
+                       if( $type == RC_LOG ) {
                                $secureName = SpecialPage::getTitleFor( 'Log', $logType )->getPrefixedDBkey();
                        }
                        if( !isset( $this->rc_cache[$secureName] ) ) {
index ce8077d..5b01ca5 100644 (file)
@@ -1508,7 +1508,7 @@ class EditPage {
                                                $this->isConflict = false;
                                                wfDebug( __METHOD__ . ": conflict suppressed; new section\n" );
                                        }
-                               } elseif ( $this->section == '' && Revision::userWasLastToEdit( DB_MASTER,  $this->mTitle->getArticleID(),
+                               } elseif ( $this->section == '' && Revision::userWasLastToEdit( DB_MASTER, $this->mTitle->getArticleID(),
                                                        $wgUser->getId(), $this->edittime ) ) {
                                        # Suppress edit conflict with self, except for section edits where merging is required.
                                        wfDebug( __METHOD__ . ": Suppressing edit conflict, same user.\n" );
@@ -1715,7 +1715,7 @@ class EditPage {
         * @return bool
         * @deprecated since 1.21, use mergeChangesIntoContent() instead
         */
-       function mergeChangesInto( &$editText ){
+       function mergeChangesInto( &$editText ) {
                ContentHandler::deprecated( __METHOD__, "1.21" );
 
                $editContent = $this->toEditContent( $editText );
@@ -1740,7 +1740,7 @@ class EditPage {
         *
         * @return bool
         */
-       private function mergeChangesIntoContent( &$editContent ){
+       private function mergeChangesIntoContent( &$editContent ) {
                wfProfileIn( __METHOD__ );
 
                $db = wfGetDB( DB_MASTER );
@@ -3454,7 +3454,7 @@ HTML
                global $wgOut, $wgLang;
                $this->textbox2 = $this->textbox1;
 
-               if( is_array( $match ) ){
+               if( is_array( $match ) ) {
                        $match = $wgLang->listToText( $match );
                }
                $wgOut->prepareErrorPage( wfMessage( 'spamprotectiontitle' ) );
index f09e8f8..27ae338 100644 (file)
@@ -329,7 +329,7 @@ class ErrorPageError extends MWException {
                $this->msg = $msg;
                $this->params = $params;
 
-               if( $msg instanceof Message ){
+               if( $msg instanceof Message ) {
                        parent::__construct( $msg );
                } else {
                        parent::__construct( wfMessage( $msg )->text() );
@@ -423,7 +423,7 @@ class PermissionsError extends ErrorPageError {
  * @ingroup Exception
  */
 class ReadOnlyError extends ErrorPageError {
-       public function __construct(){
+       public function __construct() {
                parent::__construct(
                        'readonly',
                        'readonlytext',
@@ -439,14 +439,14 @@ class ReadOnlyError extends ErrorPageError {
  * @ingroup Exception
  */
 class ThrottledError extends ErrorPageError {
-       public function __construct(){
+       public function __construct() {
                parent::__construct(
                        'actionthrottled',
                        'actionthrottledtext'
                );
        }
 
-       public function report(){
+       public function report() {
                global $wgOut;
                $wgOut->setStatusCode( 503 );
                parent::report();
@@ -460,7 +460,7 @@ class ThrottledError extends ErrorPageError {
  * @ingroup Exception
  */
 class UserBlockedError extends ErrorPageError {
-       public function __construct( Block $block ){
+       public function __construct( Block $block ) {
                global $wgLang, $wgRequest;
 
                $blocker = $block->getBlocker();
@@ -560,7 +560,7 @@ class HttpError extends MWException {
         * @param $content String|Message: content of the message
         * @param $header String|Message: content of the header (\<title\> and \<h1\>)
         */
-       public function __construct( $httpCode, $content, $header = null ){
+       public function __construct( $httpCode, $content, $header = null ) {
                parent::__construct( $content );
                $this->httpCode = (int)$httpCode;
                $this->header = $header;
index 16c297e..088a807 100644 (file)
@@ -330,7 +330,7 @@ class WikiExporter {
                                $join['revision'] = array( 'INNER JOIN', 'page_id=rev_page' );
                        } elseif ( $this->history & WikiExporter::CURRENT ) {
                                # Latest revision dumps...
-                               if ( $this->list_authors && $cond != '' )  { // List authors, if so desired
+                               if ( $this->list_authors && $cond != '' ) { // List authors, if so desired
                                        $this->do_list_authors( $cond );
                                }
                                $join['revision'] = array( 'INNER JOIN', 'page_id=rev_page AND page_latest=rev_id' );
index 3468325..3f73376 100644 (file)
@@ -87,7 +87,7 @@ class ExternalEdit extends ContextSource {
                                                'URL' => $image->getCanonicalURL()
                                        )
                                );
-                       } else{
+                       } else {
                                $urls = array();
                        }
                } else {
index 46565e4..82fe196 100644 (file)
@@ -294,7 +294,7 @@ abstract class ExternalUser {
         * a local user.
         * @return Mixed User if the account is linked, Null otherwise.
         */
-       final public function getLocalUser(){
+       final public function getLocalUser() {
                $dbr = wfGetDB( DB_SLAVE );
                $row = $dbr->selectRow(
                        'external_user',
index 55c2ae5..3de148b 100644 (file)
@@ -430,7 +430,7 @@ class DiffHistoryBlob implements HistoryBlob {
         * @throws MWException
         */
        function compress() {
-               if ( !function_exists( 'xdiff_string_rabdiff' ) ){
+               if ( !function_exists( 'xdiff_string_rabdiff' ) ) {
                        throw new MWException( "Need xdiff 1.5+ support to write DiffHistoryBlob\n" );
                }
                if ( isset( $this->mDiffs ) ) {
index 4965054..a54bd92 100644 (file)
@@ -382,7 +382,7 @@ class ImagePage extends Article {
                                                        params( count( $otherSizes ) )->parse()
                                                );
                                        }
-                               } elseif ( $width == 0 && $height == 0 ){
+                               } elseif ( $width == 0 && $height == 0 ) {
                                        # Some sort of audio file that doesn't have dimensions
                                        # Don't output a no hi res message for such a file
                                        $msgsmall = '';
@@ -1166,7 +1166,7 @@ class ImageHistoryList extends ContextSource {
        protected function getThumbForLine( $file ) {
                $lang = $this->getLanguage();
                $user = $this->getUser();
-               if ( $file->allowInlineDisplay() && $file->userCan( File::DELETED_FILE,$user )
+               if ( $file->allowInlineDisplay() && $file->userCan( File::DELETED_FILE, $user )
                        && !$file->isDeleted( File::DELETED_FILE ) )
                {
                        $params = array(
index bd9ce25..d00002a 100644 (file)
@@ -1650,7 +1650,7 @@ class ImportStreamSource {
                        return Status::newFatal( 'importnofile' );
                }
                if( !empty( $upload['error'] ) ) {
-                       switch($upload['error']){
+                       switch( $upload['error'] ) {
                                case 1: # The uploaded file exceeds the upload_max_filesize directive in php.ini.
                                        return Status::newFatal( 'importuploaderrorsize' );
                                case 2: # The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form.
index 7cf59e9..d1f6a0f 100644 (file)
@@ -598,7 +598,7 @@ class MagicWord {
        function replaceMultiple( $magicarr, $subject, &$result ) {
                $search = array();
                $replace = array();
-               foreach( $magicarr as $id => $replacement ){
+               foreach( $magicarr as $id => $replacement ) {
                        $mw = MagicWord::get( $id );
                        $search[] = $mw->getRegex();
                        $replace[] = $replacement;
index 8f10b8b..96747c9 100644 (file)
@@ -457,11 +457,11 @@ class Message {
                        if( preg_match( '/^<p>(.*)\n?<\/p>\n?$/sU', $string, $m ) ) {
                                $string = $m[1];
                        }
-               } elseif( $this->format === 'block-parse' ){
+               } elseif( $this->format === 'block-parse' ) {
                        $string = $this->parseText( $string );
-               } elseif( $this->format === 'text' ){
+               } elseif( $this->format === 'text' ) {
                        $string = $this->transformText( $string );
-               } elseif( $this->format === 'escaped' ){
+               } elseif( $this->format === 'escaped' ) {
                        $string = $this->transformText( $string );
                        $string = htmlspecialchars( $string, ENT_QUOTES, 'UTF-8', false );
                }
index 8a795ff..9a4ddca 100644 (file)
@@ -42,7 +42,7 @@ abstract class RdfMetaData {
                $httpaccept = isset( $_SERVER['HTTP_ACCEPT'] ) ? $_SERVER['HTTP_ACCEPT'] : null;
                $rdftype = wfNegotiateType( wfAcceptToPrefs( $httpaccept ), wfAcceptToPrefs( self::RDF_TYPE_PREFS ) );
 
-               if( !$rdftype ){
+               if( !$rdftype ) {
                        throw new HttpError( 406, wfMessage( 'notacceptable' ) );
                }
 
@@ -70,7 +70,7 @@ abstract class RdfMetaData {
                $lastEditor = User::newFromId( $this->mArticle->getUser() );
                $this->person( 'creator', $lastEditor );
 
-               foreach( $this->mArticle->getContributors() as $user ){
+               foreach( $this->mArticle->getContributors() as $user ) {
                        $this->person( 'contributor', $user );
                }
 
@@ -95,7 +95,7 @@ abstract class RdfMetaData {
                        $nt = Title::newFromText( $page );
                }
 
-               if( !$nt || $nt->getArticleID() == 0 ){
+               if( !$nt || $nt->getArticleID() == 0 ) {
                        $this->element( $name, $str );
                } else {
                        $this->page( $name, $nt );
@@ -116,7 +116,7 @@ abstract class RdfMetaData {
        }
 
        protected function person( $name, User $user ) {
-               if( $user->isAnon() ){
+               if( $user->isAnon() ) {
                        $this->element( $name, wfMessage( 'anonymous' )->numParams( 1 )->text() );
                } else {
                        $real = $user->getRealName();
@@ -141,11 +141,11 @@ abstract class RdfMetaData {
                global $wgRightsPage, $wgRightsUrl, $wgRightsText;
 
                if( $wgRightsPage && ( $nt = Title::newFromText( $wgRightsPage ) )
-                       && ($nt->getArticleID() != 0)) {
-                       $this->page('rights', $nt);
-               } elseif( $wgRightsUrl ){
-                       $this->url('rights', $wgRightsUrl);
-               } elseif( $wgRightsText ){
+                       && ( $nt->getArticleID() != 0 ) ) {
+                       $this->page( 'rights', $nt );
+               } elseif( $wgRightsUrl ) {
+                       $this->url( 'rights', $wgRightsUrl );
+               } elseif( $wgRightsText ) {
                        $this->element( 'rights', $wgRightsText );
                }
        }
@@ -153,7 +153,7 @@ abstract class RdfMetaData {
        protected function getTerms( $url ) {
                global $wgLicenseTerms;
 
-               if( $wgLicenseTerms ){
+               if( $wgLicenseTerms ) {
                        return $wgLicenseTerms;
                } else {
                        $known = $this->getKnownLicenses();
@@ -200,4 +200,3 @@ abstract class RdfMetaData {
                return $knownLicenses;
        }
 }
-
index 5b0f36c..9c628cb 100644 (file)
@@ -442,7 +442,7 @@ class OutputPage extends ContextSource {
        protected function filterModules( $modules, $position = null, $type = ResourceLoaderModule::TYPE_COMBINED ) {
                $resourceLoader = $this->getResourceLoader();
                $filteredModules = array();
-               foreach( $modules as $val ){
+               foreach( $modules as $val ) {
                        $module = $resourceLoader->getModule( $val );
                        if( $module instanceof ResourceLoaderModule
                                && $module->getOrigin() <= $this->getAllowedModules( $type )
@@ -512,7 +512,7 @@ class OutputPage extends ContextSource {
         * @return Array of module names
         */
        public function getModuleStyles( $filter = false, $position = null ) {
-               return $this->getModules( $filter,  $position, 'mModuleStyles' );
+               return $this->getModules( $filter, $position, 'mModuleStyles' );
        }
 
        /**
@@ -1251,7 +1251,7 @@ class OutputPage extends ContextSource {
         * @return Int ResourceLoaderModule ORIGIN_ class constant
         */
        public function getAllowedModules( $type ) {
-               if( $type == ResourceLoaderModule::TYPE_COMBINED ){
+               if( $type == ResourceLoaderModule::TYPE_COMBINED ) {
                        return min( array_values( $this->mAllowedModules ) );
                } else {
                        return isset( $this->mAllowedModules[$type] )
@@ -2071,7 +2071,7 @@ class OutputPage extends ContextSource {
 
                $this->prepareErrorPage( $title );
 
-               if ( $msg instanceof Message ){
+               if ( $msg instanceof Message ) {
                        $this->addHTML( $msg->parseAsBlock() );
                } else {
                        $this->addWikiMsgArray( $msg, $params );
@@ -2483,7 +2483,7 @@ $templates
                        'mediawiki.page.startup',
                        'mediawiki.page.ready',
                ) );
-               if ( $wgIncludeLegacyJavaScript ){
+               if ( $wgIncludeLegacyJavaScript ) {
                        $this->addModules( 'mediawiki.legacy.wikibits' );
                }
 
@@ -2711,7 +2711,7 @@ $templates
                                }
                        }
 
-                       if( $group == 'noscript' ){
+                       if( $group == 'noscript' ) {
                                $links .= Html::rawElement( 'noscript', array(), $link ) . "\n";
                        } else {
                                $links .= $link . "\n";
@@ -3379,7 +3379,7 @@ $templates
                if ( $wgUseSiteCss ) {
                        $moduleStyles[] = 'site';
                        $moduleStyles[] = 'noscript';
-                       if( $this->getUser()->isLoggedIn() ){
+                       if( $this->getUser()->isLoggedIn() ) {
                                $moduleStyles[] = 'user.groups';
                        }
                }
index 2aed2af..c60c107 100644 (file)
@@ -37,7 +37,7 @@
  * @note Since we can't rely on anything, the minimum PHP versions and MW current
  * version are hardcoded here
  */
-function wfPHPVersionError( $type ){
+function wfPHPVersionError( $type ) {
        $mwVersion = '1.21';
        $phpVersion = PHP_VERSION;
        $message = "MediaWiki $mwVersion requires at least PHP version 5.3.2, you are using PHP $phpVersion.";
index 077430d..856b1b8 100644 (file)
@@ -1160,7 +1160,7 @@ abstract class TablePager extends IndexPager {
                        # The pair is either $index => $limit, in which case the $value
                        # will be numeric, or $limit => $text, in which case the $value
                        # will be a string.
-                       if( is_int( $value ) ){
+                       if( is_int( $value ) ) {
                                $limit = $value;
                                $text = $this->getLanguage()->formatNum( $limit );
                        } else {
index 9878396..c15c5b5 100644 (file)
@@ -1407,7 +1407,7 @@ class Preferences {
                # via $wgHiddenPrefs, we don't want to destroy that setting in case the preference
                # is subsequently re-enabled
                # TODO: maintenance script to actually delete these
-               foreach( $wgHiddenPrefs as $pref ){
+               foreach( $wgHiddenPrefs as $pref ) {
                        # If the user has not set a non-default value here, the default will be returned
                        # and subsequently discarded
                        $formData[$pref] = $user->getOption( $pref, null, true );
index 0034afe..9cac308 100644 (file)
@@ -431,7 +431,7 @@ class Sanitizer {
                $extratags = array_flip( $extratags );
                $removetags = array_flip( $removetags );
                $htmlpairs = array_merge( $extratags, $htmlpairsStatic );
-               $htmlelements = array_diff_key( array_merge( $extratags, $htmlelementsStatic ) , $removetags );
+               $htmlelements = array_diff_key( array_merge( $extratags, $htmlelementsStatic ), $removetags );
 
                # Remove HTML comments
                $text = Sanitizer::removeHTMLcomments( $text );
@@ -1039,7 +1039,7 @@ class Sanitizer {
                $id = str_replace( array_keys( $replace ), array_values( $replace ), $id );
 
                if ( !preg_match( '/^[a-zA-Z]/', $id )
-               && !in_array( 'noninitial', $options ) )  {
+               && !in_array( 'noninitial', $options ) ) {
                        // Initial character must be a letter!
                        $id = "x$id";
                }
index 2bf2507..53739fb 100644 (file)
@@ -50,9 +50,9 @@ if ( $wgLoadScript === false ) $wgLoadScript = "$wgScriptPath/load$wgScriptExten
 
 if ( $wgArticlePath === false ) {
        if ( $wgUsePathInfo ) {
-               $wgArticlePath      = "$wgScript/$1";
+               $wgArticlePath = "$wgScript/$1";
        } else {
-               $wgArticlePath      = "$wgScript?title=$1";
+               $wgArticlePath = "$wgScript?title=$1";
        }
 }
 
@@ -323,7 +323,7 @@ if ( !$wgEnotifMinorEdits ) {
 }
 
 # $wgDisabledActions is deprecated as of 1.18
-foreach( $wgDisabledActions as $action ){
+foreach( $wgDisabledActions as $action ) {
        $wgActions[$action] = false;
 }
 
index afe0cc7..4bbe9e1 100644 (file)
@@ -360,9 +360,9 @@ class SiteConfiguration {
        public function extractGlobalSetting( $setting, $wiki, $params ) {
                $value = $this->getSetting( $setting, $wiki, $params );
                if ( !is_null( $value ) ) {
-                       if (substr($setting,0,1) == '+' && is_array($value)) {
-                               $setting = substr($setting,1);
-                               if ( is_array($GLOBALS[$setting]) ) {
+                       if ( substr( $setting, 0, 1 ) == '+' && is_array( $value ) ) {
+                               $setting = substr( $setting, 1 );
+                               if ( is_array( $GLOBALS[$setting] ) ) {
                                        $GLOBALS[$setting] = self::arrayMerge( $GLOBALS[$setting], $value );
                                } else {
                                        $GLOBALS[$setting] = $value;
@@ -413,7 +413,7 @@ class SiteConfiguration {
                        return $default;
                }
 
-               foreach( $default as $name => $def ){
+               foreach( $default as $name => $def ) {
                        if( !isset( $ret[$name] ) || ( is_array( $default[$name] ) && !is_array( $ret[$name] ) ) ) {
                                $ret[$name] = $default[$name];
                        }
@@ -446,7 +446,7 @@ class SiteConfiguration {
                $ret['params'] += $params;
 
                // Automatically fill that ones if needed
-               if( !isset( $ret['params']['lang'] ) && !is_null( $ret['lang'] ) ){
+               if( !isset( $ret['params']['lang'] ) && !is_null( $ret['lang'] ) ) {
                        $ret['params']['lang'] = $ret['lang'];
                }
                if( !isset( $ret['params']['site'] ) && !is_null( $ret['suffix'] ) ) {
index 7d75f2c..098fb0b 100644 (file)
@@ -293,7 +293,7 @@ class SquidPurgeClient {
                        if ( count( $lines ) < 2 ) {
                                return 'done';
                        }
-                       if ( $this->readState == 'status' )  {
+                       if ( $this->readState == 'status' ) {
                                $this->processStatusLine( $lines[0] );
                        } else { // header
                                $this->processHeaderLine( $lines[0] );
index 442bc22..9de94d8 100644 (file)
@@ -3980,7 +3980,7 @@ class Title {
                }
                # Get the article text
                $rev = Revision::newFromTitle( $nt, false, Revision::READ_LATEST );
-               if( !is_object( $rev ) ){
+               if( !is_object( $rev ) ) {
                        return false;
                }
                $content = $rev->getContent();
index 9a60aa9..3e49cd0 100644 (file)
@@ -547,7 +547,7 @@ class User {
         * @return Bool
         */
        public static function isIP( $name ) {
-               return preg_match('/^\d{1,3}\.\d{1,3}\.\d{1,3}\.(?:xxx|\d{1,3})$/',$name) || IP::isIPv6($name);
+               return preg_match( '/^\d{1,3}\.\d{1,3}\.\d{1,3}\.(?:xxx|\d{1,3})$/', $name ) || IP::isIPv6( $name );
        }
 
        /**
@@ -1569,7 +1569,7 @@ class User {
         * @param $bFromSlave Bool Whether to check the slave database instead of the master
         * @return Block|null
         */
-       public function getBlock( $bFromSlave = true ){
+       public function getBlock( $bFromSlave = true ) {
                $this->getBlockedStatus( $bFromSlave );
                return $this->mBlock instanceof Block ? $this->mBlock : null;
        }
@@ -2229,7 +2229,7 @@ class User {
                # set it, and then it was disabled removing their ability to change it).  But
                # we don't want to erase the preferences in the database in case the preference
                # is re-enabled again.  So don't touch $mOptions, just override the returned value
-               if( in_array( $oname, $wgHiddenPrefs ) && !$ignoreHidden ){
+               if( in_array( $oname, $wgHiddenPrefs ) && !$ignoreHidden ) {
                        return self::getDefaultOption( $oname );
                }
 
@@ -2255,9 +2255,9 @@ class User {
                # set it, and then it was disabled removing their ability to change it).  But
                # we don't want to erase the preferences in the database in case the preference
                # is re-enabled again.  So don't touch $mOptions, just override the returned value
-               foreach( $wgHiddenPrefs as $pref ){
+               foreach( $wgHiddenPrefs as $pref ) {
                        $default = self::getDefaultOption( $pref );
-                       if( $default !== null ){
+                       if( $default !== null ) {
                                $options[$pref] = $default;
                        }
                }
@@ -2690,8 +2690,8 @@ class User {
         */
        public function isAllowedAny( /*...*/ ) {
                $permissions = func_get_args();
-               foreach( $permissions as $permission ){
-                       if( $this->isAllowed( $permission ) ){
+               foreach( $permissions as $permission ) {
+                       if( $this->isAllowed( $permission ) ) {
                                return true;
                        }
                }
@@ -2705,8 +2705,8 @@ class User {
         */
        public function isAllowedAll( /*...*/ ) {
                $permissions = func_get_args();
-               foreach( $permissions as $permission ){
-                       if( !$this->isAllowed( $permission ) ){
+               foreach( $permissions as $permission ) {
+                       if( !$this->isAllowed( $permission ) ) {
                                return false;
                        }
                }
@@ -2880,7 +2880,7 @@ class User {
                        return;
                }
                $id = $this->getId();
-               if( $id != 0 )  {
+               if( $id != 0 ) {
                        $dbw = wfGetDB( DB_MASTER );
                        $dbw->update( 'watchlist',
                                array( /* SET */
@@ -3265,7 +3265,7 @@ class User {
                wfDeprecated( __METHOD__, '1.17' );
 
                global $wgUseDynamicDates, $wgRenderHashAppend, $wgLang, $wgContLang;
-               if( $this->mHash ){
+               if( $this->mHash ) {
                        return $this->mHash;
                }
 
@@ -3306,7 +3306,7 @@ class User {
         */
        public function isBlockedFromCreateAccount() {
                $this->getBlockedStatus();
-               if( $this->mBlock && $this->mBlock->prevents( 'createaccount' ) ){
+               if( $this->mBlock && $this->mBlock->prevents( 'createaccount' ) ) {
                        return $this->mBlock;
                }
 
index e467738..f00e055 100644 (file)
@@ -159,7 +159,7 @@ class FauxResponse extends WebResponse {
         * @param $name string
         * @return string
         */
-       public function getcookie( $name )  {
+       public function getcookie( $name ) {
                if ( isset( $this->cookies[$name] ) ) {
                        return $this->cookies[$name];
                }
index 7604241..21a7d9a 100644 (file)
@@ -126,7 +126,7 @@ class MediaWiki {
         * @return Title
         */
        public function getTitle() {
-               if( $this->context->getTitle() === null ){
+               if( $this->context->getTitle() === null ) {
                        $this->context->setTitle( $this->parseTitle() );
                }
                return $this->context->getTitle();
@@ -507,7 +507,7 @@ class MediaWiki {
                        && $request->getMethod() == 'GET'
                ) {
                        $redirUrl = $request->getFullRequestURL();
-                       $redirUrl = str_replace( 'http://' , 'https://' , $redirUrl );
+                       $redirUrl = str_replace( 'http://', 'https://', $redirUrl );
 
                        // Setup dummy Title, otherwise OutputPage::redirect will fail
                        $title = Title::newFromText( NS_MAIN, 'REDIR' );
index e2cd5d9..49a944b 100644 (file)
@@ -1139,7 +1139,7 @@ class WikiPage extends Page implements IDBAccessObject {
        public function doPurge() {
                global $wgUseSquid;
 
-               if( !wfRunHooks( 'ArticlePurge', array( &$this ) ) ){
+               if( !wfRunHooks( 'ArticlePurge', array( &$this ) ) ) {
                        return false;
                }
 
@@ -1948,7 +1948,7 @@ class WikiPage extends Page implements IDBAccessObject {
        public function prepareTextForEdit( $text, $revid = null, User $user = null ) {
                ContentHandler::deprecated( __METHOD__, '1.21' );
                $content = ContentHandler::makeContent( $text, $this->getTitle() );
-               return $this->prepareContentForEdit( $content, $revid , $user );
+               return $this->prepareContentForEdit( $content, $revid, $user );
        }
 
        /**
@@ -2151,7 +2151,7 @@ class WikiPage extends Page implements IDBAccessObject {
                ContentHandler::deprecated( __METHOD__, "1.21" );
 
                $content = ContentHandler::makeContent( $text, $this->getTitle() );
-               return $this->doQuickEditContent( $content, $user, $comment , $minor );
+               return $this->doQuickEditContent( $content, $user, $comment, $minor );
        }
 
        /**
@@ -2292,8 +2292,8 @@ class WikiPage extends Page implements IDBAccessObject {
                                if ( $encodedExpiry[$action] != 'infinity' ) {
                                        $expiryText = wfMessage(
                                                'protect-expiring',
-                                               $wgContLang->timeanddate( $expiry[$action], false, false ) ,
-                                               $wgContLang->date( $expiry[$action], false, false ) ,
+                                               $wgContLang->timeanddate( $expiry[$action], false, false ),
+                                               $wgContLang->date( $expiry[$action], false, false ),
                                                $wgContLang->time( $expiry[$action], false, false )
                                        )->inContentLanguage()->text();
                                } else {
@@ -3451,4 +3451,3 @@ class PoolWorkArticleView extends PoolCounterWork {
                return false;
        }
 }
-
index d5e9189..7c451bb 100644 (file)
@@ -369,10 +369,10 @@ class Xml {
                $a = array( 'for' => $id );
 
                # FIXME avoid copy pasting below:
-               if( isset( $attribs['class'] ) ){
+               if( isset( $attribs['class'] ) ) {
                                $a['class'] = $attribs['class'];
                }
-               if( isset( $attribs['title'] ) ){
+               if( isset( $attribs['title'] ) ) {
                                $a['title'] = $attribs['title'];
                }