Fixed spacing around parenthesis in includes
authorumherirrender <umherirrender_de.wp@web.de>
Sat, 27 Apr 2013 12:02:08 +0000 (14:02 +0200)
committerGerrit Code Review <gerrit@wikimedia.org>
Sun, 28 Apr 2013 15:50:07 +0000 (15:50 +0000)
Change-Id: Ie8adc00f4ee8ecec4554e584c18d5d2073415397

50 files changed:
includes/ChangesList.php
includes/Export.php
includes/GlobalFunctions.php
includes/HistoryBlob.php
includes/Hooks.php
includes/IP.php
includes/Init.php
includes/Sanitizer.php
includes/StringUtils.php
includes/Timestamp.php
includes/User.php
includes/actions/WatchAction.php
includes/api/ApiFeedContributions.php
includes/api/ApiQueryAllImages.php
includes/api/ApiQueryBase.php
includes/api/ApiQueryCategoryMembers.php
includes/api/ApiQuerySearch.php
includes/cache/HTMLFileCache.php
includes/cache/LocalisationCache.php
includes/content/WikitextContent.php
includes/db/Database.php
includes/db/DatabaseMysql.php
includes/db/DatabaseOracle.php
includes/db/LBFactory.php
includes/externalstore/ExternalStoreDB.php
includes/filerepo/FileRepo.php
includes/installer/Installer.php
includes/installer/MysqlInstaller.php
includes/installer/WebInstaller.php
includes/job/jobs/RefreshLinksJob.php
includes/logging/LogPager.php
includes/media/DjVu.php
includes/media/GIF.php
includes/media/PNG.php
includes/media/SVG.php
includes/media/SVGMetadataExtractor.php
includes/media/XCF.php
includes/objectcache/MemcachedClient.php
includes/profiler/ProfilerSimpleUDP.php
includes/resourceloader/ResourceLoader.php
includes/search/SearchPostgres.php
includes/specials/SpecialLog.php
includes/specials/SpecialMergeHistory.php
includes/specials/SpecialPrefixindex.php
includes/specials/SpecialProtectedpages.php
includes/specials/SpecialProtectedtitles.php
includes/specials/SpecialRecentchanges.php
includes/specials/SpecialUploadStash.php
includes/templates/UsercreateVForm.php
includes/templates/UserloginVForm.php

index b589057..73d3b61 100644 (file)
@@ -1083,7 +1083,7 @@ class EnhancedChangesList extends ChangesList {
                        } elseif ( !ChangesList::userCan( $rcObj, Revision::DELETED_TEXT, $this->getUser() ) ) {
                                $link = '<span class="history-deleted">' . $rcObj->timestamp . '</span> ';
                        } else {
-                               if ( $rcObj->unpatrolled && $type == RC_NEW) {
+                               if ( $rcObj->unpatrolled && $type == RC_NEW ) {
                                        $params['rcid'] = $rcObj->mAttribs['rc_id'];
                                }
 
index 9400c41..e533dbc 100644 (file)
@@ -599,7 +599,7 @@ class XmlDumpWriter {
                $out = "  <page>\n";
                $title = Title::makeTitle( $row->page_namespace, $row->page_title );
                $out .= '    ' . Xml::elementClean( 'title', array(), self::canonicalTitle( $title ) ) . "\n";
-               $out .= '    ' . Xml::element( 'ns', array(), strval( $row->page_namespace) ) . "\n";
+               $out .= '    ' . Xml::element( 'ns', array(), strval( $row->page_namespace ) ) . "\n";
                $out .= '    ' . Xml::element( 'id', array(), strval( $row->page_id ) ) . "\n";
                if ( $row->page_is_redirect ) {
                        $page = WikiPage::factory( $title );
@@ -1191,7 +1191,7 @@ class Dump7ZipOutput extends DumpPipeOutput {
                // Suppress annoying useless crap from p7zip
                // Unfortunately this could suppress real error messages too
                $command .= ' >' . wfGetNull() . ' 2>&1';
-               return( $command );
+               return $command;
        }
 
        /**
index 320a57d..50287b3 100644 (file)
@@ -2418,7 +2418,7 @@ function wfTimestamp( $outputtype = TS_UNIX, $ts = 0 ) {
        try {
                $timestamp = new MWTimestamp( $ts );
                return $timestamp->getTimestamp( $outputtype );
-       } catch( TimestampException $e ) {
+       } catch ( TimestampException $e ) {
                wfDebug( "wfTimestamp() fed bogus time value: TYPE=$outputtype; VALUE=$ts\n" );
                return false;
        }
index 8d83751..46cf238 100644 (file)
@@ -143,7 +143,7 @@ class ConcatenatedGzipHistoryBlob implements HistoryBlob
         * Compress the bulk data in the object
         */
        public function compress() {
-               if ( !$this->mCompressed  ) {
+               if ( !$this->mCompressed ) {
                        $this->mItems = gzdeflate( serialize( $this->mItems ) );
                        $this->mCompressed = true;
                }
index 5d8a4a7..ed8b3ed 100644 (file)
@@ -53,7 +53,7 @@ class Hooks {
         * @since 1.18
         */
        public static function register( $name, $callback ) {
-               if( !isset( self::$handlers[$name] ) ) {
+               if ( !isset( self::$handlers[$name] ) ) {
                        self::$handlers[$name] = array();
                }
 
@@ -174,7 +174,7 @@ class Hooks {
 
                        // Run autoloader (workaround for call_user_func_array bug)
                        // and throw error if not callable.
-                       if( !is_callable( $callback ) ) {
+                       if ( !is_callable( $callback ) ) {
                                throw new MWException( 'Invalid callback in hooks for ' . $event . "\n" );
                        }
 
index 0a8faa2..1e0a4f9 100644 (file)
@@ -526,7 +526,7 @@ class IP {
                        if ( $bits == 0 ) {
                                $network = 0;
                        } else {
-                               $network &= ~( ( 1 << ( 32 - $bits ) ) - 1);
+                               $network &= ~( ( 1 << ( 32 - $bits ) ) - 1 );
                        }
                        # Convert to unsigned
                        if ( $network < 0 ) {
index 66f9544..835ffdb 100644 (file)
@@ -166,7 +166,7 @@ class MWInit {
        static function classExists( $class ) {
                try {
                        $r = new ReflectionClass( $class );
-               } catch( ReflectionException $r ) {
+               } catch ( ReflectionException $r ) {
                        $r = false;
                }
                return $r !== false;
@@ -187,7 +187,7 @@ class MWInit {
        static function methodExists( $class, $method ) {
                try {
                        $r = new ReflectionMethod( $class, $method );
-               } catch( ReflectionException $r ) {
+               } catch ( ReflectionException $r ) {
                        $r = false;
                }
                return $r !== false;
@@ -204,7 +204,7 @@ class MWInit {
        static function functionExists( $function ) {
                try {
                        $r = new ReflectionFunction( $function );
-               } catch( ReflectionException $r ) {
+               } catch ( ReflectionException $r ) {
                        $r = false;
                }
                return $r !== false;
index b9b0591..e757021 100644 (file)
@@ -606,7 +606,7 @@ class Sanitizer {
         */
        static function removeHTMLcomments( $text ) {
                wfProfileIn( __METHOD__ );
-               while ( ($start = strpos( $text, '<!--' ) ) !== false ) {
+               while ( ( $start = strpos( $text, '<!--' ) ) !== false ) {
                        $end = strpos( $text, '-->', $start + 4 );
                        if ( $end === false ) {
                                # Unterminated comment; bail out
index 05b78e0..48cde0e 100644 (file)
@@ -65,7 +65,7 @@ class StringUtils {
                                | [\xf8-\xfb][\x80-\xbf]{4}
                                | \xfc[\x84-\xbf][\x80-\xbf]{4}
                        )+$/x', $value );
-                       return ($hasUtf8 > 0 );
+                       return ( $hasUtf8 > 0 );
                }
        }
 
index 92e914e..5296122 100644 (file)
@@ -125,7 +125,7 @@ class MWTimestamp {
 
                try {
                        $final = new DateTime( $strtime, new DateTimeZone( 'GMT' ) );
-               } catch( Exception $e ) {
+               } catch ( Exception $e ) {
                        throw new TimestampException( __METHOD__ . ' Invalid timestamp format.' );
                }
 
@@ -261,7 +261,7 @@ class MWTimestamp {
                        }
                }
 
-               $interval = new DateInterval('PT' . abs( $diff ) . 'M');
+               $interval = new DateInterval( 'PT' . abs( $diff ) . 'M' );
                if ( $diff < 1 ) {
                        $interval->invert = 1;
                }
index dd6407d..37a384c 100644 (file)
@@ -2791,7 +2791,7 @@ class User {
         */
        public function useNPPatrol() {
                global $wgUseRCPatrol, $wgUseNPPatrol;
-               return( ( $wgUseRCPatrol || $wgUseNPPatrol ) && ( $this->isAllowedAny( 'patrol', 'patrolmarks' ) ) );
+               return ( ( $wgUseRCPatrol || $wgUseNPPatrol ) && ( $this->isAllowedAny( 'patrol', 'patrolmarks' ) ) );
        }
 
        /**
index ae5f76c..de9e1d6 100644 (file)
@@ -87,7 +87,7 @@ class WatchAction extends FormAction {
                return parent::checkCanExecute( $user );
        }
 
-       public static function doWatch( Title $title, User $user  ) {
+       public static function doWatch( Title $title, User $user ) {
                $page = WikiPage::factory( $title );
 
                if ( wfRunHooks( 'WatchArticle', array( &$user, &$page ) ) ) {
@@ -97,7 +97,7 @@ class WatchAction extends FormAction {
                return true;
        }
 
-       public static function doUnwatch( Title $title, User $user  ) {
+       public static function doUnwatch( Title $title, User $user ) {
                $page = WikiPage::factory( $title );
 
                if ( wfRunHooks( 'UnwatchArticle', array( &$user, &$page ) ) ) {
index f2a7748..abd657c 100644 (file)
@@ -93,7 +93,7 @@ class ApiFeedContributions extends ApiBase {
 
        protected function feedItem( $row ) {
                $title = Title::makeTitle( intval( $row->page_namespace ), $row->page_title );
-               if( $title && $title->userCan( 'read' ) ) {
+               if ( $title && $title->userCan( 'read' ) ) {
                        $date = $row->rev_timestamp;
                        $comments = $title->getTalkPage()->getFullURL();
                        $revision = Revision::newFromRow( $row );
index 566c208..ccc7a3a 100644 (file)
@@ -189,7 +189,7 @@ class ApiQueryAllImages extends ApiQueryGeneratorBase {
 
                if ( !is_null( $params['mime'] ) ) {
                        global $wgMiserMode;
-                       if ( $wgMiserMode  ) {
+                       if ( $wgMiserMode ) {
                                $this->dieUsage( 'MIME search disabled in Miser Mode', 'mimesearchdisabled' );
                        }
 
index 44fbf58..8668e04 100644 (file)
@@ -478,7 +478,7 @@ abstract class ApiQueryBase extends ApiBase {
         * @param $protocol String
         * @return null|string
         */
-       public function prepareUrlQuerySearchString( $query = null, $protocol = null) {
+       public function prepareUrlQuerySearchString( $query = null, $protocol = null ) {
                $db = $this->getDb();
                if ( !is_null( $query ) || $query != '' ) {
                        if ( is_null( $protocol ) ) {
index 124908b..704d108 100644 (file)
@@ -217,7 +217,7 @@ class ApiQueryCategoryMembers extends ApiQueryGeneratorBase {
                                if ( $fld_sortkeyprefix ) {
                                        $vals['sortkeyprefix'] = $row->cl_sortkey_prefix;
                                }
-                               if ( $fld_type  ) {
+                               if ( $fld_type ) {
                                        $vals['type'] = $row->cl_type;
                                }
                                if ( $fld_timestamp ) {
index ab78ba6..0349830 100644 (file)
@@ -93,7 +93,7 @@ class ApiQuerySearch extends ApiQueryGeneratorBase {
                }
                if ( is_null( $matches ) ) {
                        $this->dieUsage( "{$what} search is disabled", "search-{$what}-disabled" );
-               } elseif( $matches instanceof Status && !$matches->isGood() ) {
+               } elseif ( $matches instanceof Status && !$matches->isGood() ) {
                        $this->dieUsage( $matches->getWikiText(), 'search-error' );
                }
 
index 055fd68..8233481 100644 (file)
@@ -163,7 +163,7 @@ class HTMLFileCache extends FileCacheBase {
                        return $text;
                }
 
-               wfDebug( __METHOD__ . "()\n", false);
+               wfDebug( __METHOD__ . "()\n", false );
 
                $now = wfTimestampNow();
                if ( $this->useGzip() ) {
index d093b58..8069836 100644 (file)
@@ -525,7 +525,7 @@ class LocalisationCache {
                }
                try {
                        $compiledRules = CLDRPluralRuleEvaluator::compile( $rules );
-               } catch( CLDRPluralRuleError $e ) {
+               } catch ( CLDRPluralRuleError $e ) {
                        wfDebugLog( 'l10n', $e->getMessage() . "\n" );
                        return array();
                }
index 580ec75..26337db 100644 (file)
@@ -61,7 +61,7 @@ class WikitextContent extends TextContent {
                $myModelId = $this->getModel();
                $sectionModelId = $with->getModel();
 
-               if ( $sectionModelId != $myModelId  ) {
+               if ( $sectionModelId != $myModelId ) {
                        wfProfileOut( __METHOD__ );
                        throw new MWException( "Incompatible content model for section: " .
                                "document uses $myModelId but " .
index 70fc1f3..b315fac 100644 (file)
@@ -585,7 +585,7 @@ abstract class DatabaseBase implements DatabaseType {
        public function setFlag( $flag ) {
                global $wgDebugDBTransactions;
                $this->mFlags |= $flag;
-               if ( ( $flag & DBO_TRX) & $wgDebugDBTransactions ) {
+               if ( ( $flag & DBO_TRX ) & $wgDebugDBTransactions ) {
                        wfDebug( "Implicit transactions are now  disabled.\n" );
                }
        }
index 0009937..4105ee1 100644 (file)
@@ -901,7 +901,7 @@ class DatabaseMysql extends DatabaseBase {
         * @return array
         */
        function listTables( $prefix = null, $fname = 'DatabaseMysql::listTables' ) {
-               $result = $this->query( "SHOW TABLES", $fname);
+               $result = $this->query( "SHOW TABLES", $fname );
 
                $endArray = array();
 
index 3333f4a..34305f7 100644 (file)
@@ -691,7 +691,7 @@ class DatabaseOracle extends DatabaseBase {
 
        function tableNameInternal( $name ) {
                $name = $this->tableName( $name );
-               return preg_replace( '/.*\.(.*)/', '$1', $name);
+               return preg_replace( '/.*\.(.*)/', '$1', $name );
        }
        /**
         * Return the next in a sequence, save the value for retrieval via insertId()
index be82f4e..16c43a0 100644 (file)
@@ -300,7 +300,7 @@ class LBFactory_Fake extends LBFactory {
        function __construct( $conf ) {
        }
 
-       function newMainLB( $wiki = false) {
+       function newMainLB( $wiki = false ) {
                throw new DBAccessError;
        }
 
index 9919236..be9c066 100644 (file)
@@ -166,7 +166,7 @@ class ExternalStoreDB extends ExternalStoreMedium {
                        // Try the master
                        $dbw =& $this->getMaster( $cluster );
                        $ret = $dbw->selectField( $this->getTable( $dbw ), 'blob_text', array( 'blob_id' => $id ), __METHOD__ );
-                       if ( $ret === false) {
+                       if ( $ret === false ) {
                                wfDebugLog( 'ExternalStoreDB', "ExternalStoreDB::fetchBlob master failed to find $cacheID\n" );
                        }
                }
index cfc3af7..aa41135 100644 (file)
@@ -383,7 +383,7 @@ class FileRepo {
                        return false;
                }
                $redir = $this->checkRedirect( $title );
-               if ( $redir && $title->getNamespace() == NS_FILE) {
+               if ( $redir && $title->getNamespace() == NS_FILE ) {
                        $img = $this->newFile( $redir );
                        if ( !$img ) {
                                return false;
index 44a7241..e35719d 100644 (file)
@@ -1284,7 +1284,7 @@ abstract class Installer {
                                try {
                                        $text = Http::get( $url . $file, array( 'timeout' => 3 ) );
                                }
-                               catch( MWException $e ) {
+                               catch ( MWException $e ) {
                                        // Http::get throws with allow_url_fopen = false and no curl extension.
                                        $text = null;
                                }
@@ -1561,7 +1561,7 @@ abstract class Installer {
 
                        try {
                                $user->setPassword( $this->getVar( '_AdminPassword' ) );
-                       } catch( PasswordError $pwe ) {
+                       } catch ( PasswordError $pwe ) {
                                return Status::newFatal( 'config-admin-error-password', $name, $pwe->getMessage() );
                        }
 
index 84638d4..4436173 100644 (file)
@@ -540,12 +540,12 @@ class MysqlInstaller extends DatabaseInstaller {
                        foreach ( $createHostList as $host ) {
                                $fullName = $this->buildFullUserName( $dbUser, $host );
                                if ( !$this->userDefinitelyExists( $dbUser, $host ) ) {
-                                       try{
+                                       try {
                                                $this->db->begin( __METHOD__ );
                                                $this->db->query( "CREATE USER $fullName IDENTIFIED BY $escPass", __METHOD__ );
                                                $this->db->commit( __METHOD__ );
                                                $grantableNames[] = $fullName;
-                                       } catch( DBQueryError $dqe ) {
+                                       } catch ( DBQueryError $dqe ) {
                                                if ( $this->db->lastErrno() == 1396 /* ER_CANNOT_USER */ ) {
                                                        // User (probably) already exists
                                                        $this->db->rollback( __METHOD__ );
@@ -574,7 +574,7 @@ class MysqlInstaller extends DatabaseInstaller {
                                $this->db->begin( __METHOD__ );
                                $this->db->query( "GRANT ALL PRIVILEGES ON $dbAllTables TO $name", __METHOD__ );
                                $this->db->commit( __METHOD__ );
-                       } catch( DBQueryError $dqe ) {
+                       } catch ( DBQueryError $dqe ) {
                                $this->db->rollback( __METHOD__ );
                                $status->fatal( 'config-install-user-grant-failed', $dbUser, $dqe->getText() );
                        }
@@ -605,7 +605,7 @@ class MysqlInstaller extends DatabaseInstaller {
                        $res = $this->db->selectRow( 'mysql.user', array( 'Host', 'User' ),
                                array( 'Host' => $host, 'User' => $user ), __METHOD__ );
                        return (bool)$res;
-               } catch( DBQueryError $dqe ) {
+               } catch ( DBQueryError $dqe ) {
                        return false;
                }
 
index 9c56558..10c7b96 100644 (file)
@@ -1067,7 +1067,7 @@ class WebInstaller extends Installer {
         * @param $parser
         * @return String Html for download link
         */
-       public function downloadLinkHook( $text, $attribs, $parser  ) {
+       public function downloadLinkHook( $text, $attribs, $parser ) {
                $img = Html::element( 'img', array(
                        'src' => '../skins/common/images/download-32.png',
                        'width' => '32',
index 4a5ecfc..57cad87 100644 (file)
@@ -136,7 +136,7 @@ class RefreshLinksJob2 extends Job {
                // Hopefully, when leaf jobs are popped, the slaves will have reached that position.
                if ( isset( $this->params['masterPos'] ) ) {
                        $masterPos = $this->params['masterPos'];
-               } elseif ( wfGetLB()->getServerCount() > 1  ) {
+               } elseif ( wfGetLB()->getServerCount() > 1 ) {
                        $masterPos = wfGetLB()->getMasterPos();
                } else {
                        $masterPos = false;
index 5ffad43..963ec64 100644 (file)
@@ -212,9 +212,9 @@ class LogPager extends ReverseChronologicalPager {
                // Paranoia: avoid brute force searches (bug 17342)
                $user = $this->getUser();
                if ( !$user->isAllowed( 'deletedhistory' ) ) {
-                       $this->mConds[] = $db->bitAnd( 'log_deleted', LogPage::DELETED_ACTION) . ' = 0';
+                       $this->mConds[] = $db->bitAnd( 'log_deleted', LogPage::DELETED_ACTION ) . ' = 0';
                } elseif ( !$user->isAllowed( 'suppressrevision' ) ) {
-                       $this->mConds[] = $db->bitAnd( 'log_deleted', LogPage::SUPPRESSED_ACTION) .
+                       $this->mConds[] = $db->bitAnd( 'log_deleted', LogPage::SUPPRESSED_ACTION ) .
                                ' != ' . LogPage::SUPPRESSED_ACTION;
                }
        }
index 8d4e033..b9e89d9 100644 (file)
@@ -257,7 +257,7 @@ class DjVuHandler extends ImageHandler {
                        } else {
                                $image->dejaMetaTree = $tree;
                        }
-               } catch( Exception $e ) {
+               } catch ( Exception $e ) {
                        wfDebug( "Bogus multipage XML metadata on '{$image->getName()}'\n" );
                }
                wfRestoreWarnings();
index 4bb7208..6949f94 100644 (file)
@@ -33,7 +33,7 @@ class GIFHandler extends BitmapHandler {
        function getMetadata( $image, $filename ) {
                try {
                        $parsedGIFMetadata = BitmapMetadataHandler::GIF( $filename );
-               } catch( Exception $e ) {
+               } catch ( Exception $e ) {
                        // Broken file?
                        wfDebug( __METHOD__ . ': ' . $e->getMessage() . "\n" );
                        return self::BROKEN_FILE;
index 9dfd5d1..0afbc6f 100644 (file)
@@ -38,7 +38,7 @@ class PNGHandler extends BitmapHandler {
        function getMetadata( $image, $filename ) {
                try {
                        $metadata = BitmapMetadataHandler::PNG( $filename );
-               } catch( Exception $e ) {
+               } catch ( Exception $e ) {
                        // Broken file?
                        wfDebug( __METHOD__ . ': ' . $e->getMessage() . "\n" );
                        return self::BROKEN_FILE;
index 423e756..2987588 100644 (file)
@@ -263,7 +263,7 @@ class SvgHandler extends ImageHandler {
                $metadata = array( 'version' => self::SVG_METADATA_VERSION );
                try {
                        $metadata += SVGMetadataExtractor::getMetadata( $filename );
-               } catch( MWException $e ) { // @TODO: SVG specific exceptions
+               } catch ( MWException $e ) { // @TODO: SVG specific exceptions
                        // File not found, broken, etc.
                        $metadata['error'] = array(
                                'message' => $e->getMessage(),
index 948a0f8..2e33bb9 100644 (file)
@@ -101,7 +101,7 @@ class SVGReader {
                wfSuppressWarnings();
                try {
                        $this->read();
-               } catch( Exception $e ) {
+               } catch ( Exception $e ) {
                        // Note, if this happens, the width/height will be taken to be 0x0.
                        // Should we consider it the default 512x512 instead?
                        wfRestoreWarnings();
index 8872d73..e77d384 100644 (file)
@@ -110,7 +110,7 @@ class XCFHandler extends BitmapHandler {
                                . "/Nbase_type" # /
                        , $binaryHeader
                        );
-               } catch( MWException $mwe ) {
+               } catch ( MWException $mwe ) {
                        return false;
                }
 
index f4c034a..e5f60b5 100644 (file)
@@ -1123,7 +1123,7 @@ class MWMemcached {
        function _fwrite( $sock, $buf ) {
                $bytesWritten = 0;
                $bufSize = strlen( $buf );
-               while ( $bytesWritten < $bufSize  ) {
+               while ( $bytesWritten < $bufSize ) {
                        $result = fwrite( $sock, $buf );
                        $data = stream_get_meta_data( $sock );
                        if ( $data['timed_out'] ) {
index 83bdf71..2b9a322 100644 (file)
@@ -46,7 +46,7 @@ class ProfilerSimpleUDP extends ProfilerSimple {
                        return;
                }
 
-               $sock = socket_create(AF_INET, SOCK_DGRAM, SOL_UDP);
+               $sock = socket_create( AF_INET, SOCK_DGRAM, SOL_UDP );
                $plength = 0;
                $packet = "";
                foreach ( $this->mCollated as $entry => $pfdata ) {
index dd613a7..aa018fc 100644 (file)
@@ -318,7 +318,7 @@ class ResourceLoader {
         * @param array $properties source properties
         * @throws MWException
         */
-       public function addSource( $id, $properties = null) {
+       public function addSource( $id, $properties = null ) {
                // Allow multiple sources to be registered in one call
                if ( is_array( $id ) ) {
                        foreach ( $id as $key => $value ) {
@@ -466,7 +466,7 @@ class ResourceLoader {
                // Preload information needed to the mtime calculation below
                try {
                        $this->preloadModuleInfo( array_keys( $modules ), $context );
-               } catch( Exception $e ) {
+               } catch ( Exception $e ) {
                        // Add exception to the output as a comment
                        $errors .= $this->makeComment( $e->__toString() );
                        $this->hasErrors = true;
@@ -637,7 +637,7 @@ class ResourceLoader {
                if ( !$good ) {
                        try { // RL always hits the DB on file cache miss...
                                wfGetDB( DB_SLAVE );
-                       } catch( DBConnectionError $e ) { // ...check if we need to fallback to cache
+                       } catch ( DBConnectionError $e ) { // ...check if we need to fallback to cache
                                $good = $fileCache->isCacheGood(); // cache existence check
                        }
                }
index 2fe31c9..7f19ed1 100644 (file)
@@ -64,7 +64,7 @@ class SearchPostgres extends SearchEngine {
 
        function searchText( $term ) {
                $q = $this->searchQuery( $term, 'textvector', 'old_text' );
-               $olderror = error_reporting(E_ERROR);
+               $olderror = error_reporting( E_ERROR );
                $resultSet = $this->db->resultObject( $this->db->query( $q, 'SearchPostgres', true ) );
                error_reporting( $olderror );
                if ( !$resultSet ) {
index 5b6ff18..cf690f6 100644 (file)
@@ -117,7 +117,7 @@ class SpecialLog extends SpecialPage {
                global $wgLogTypes;
 
                # Get parameters
-               $parms = explode( '/', ($par = ( $par !== null ) ? $par : '' ) );
+               $parms = explode( '/', ( $par = ( $par !== null ) ? $par : '' ) );
                $symsForAll = array( '*', 'all' );
                if ( $parms[0] != '' && ( in_array( $par, $wgLogTypes ) || in_array( $par, $symsForAll ) ) ) {
                        $opts->setValue( 'type', $par );
index 013c800..2e7f672 100644 (file)
@@ -354,7 +354,7 @@ class SpecialMergeHistory extends SpecialPage {
                $haveRevisions = $dbw->selectField(
                        'revision',
                        'rev_timestamp',
-                       array( 'rev_page' => $this->mTargetID  ),
+                       array( 'rev_page' => $this->mTargetID ),
                        __METHOD__,
                        array( 'FOR UPDATE' )
                );
index 35b5e3c..065c141 100644 (file)
@@ -193,13 +193,13 @@ class SpecialPrefixindex extends SpecialAllpages {
                                while ( ( $n < $this->maxPerPage ) && ( $s = $res->fetchObject() ) ) {
                                        $t = Title::makeTitle( $s->page_namespace, $s->page_title );
                                        if ( $t ) {
-                                               $link = ($s->page_is_redirect ? '<div class="allpagesredirect">' : '' ) .
+                                               $link = ( $s->page_is_redirect ? '<div class="allpagesredirect">' : '' ) .
                                                        Linker::linkKnown(
                                                                $t,
                                                                htmlspecialchars( $t->getText() ),
                                                                $s->page_is_redirect ? array( 'class' => 'mw-redirect' ) : array()
                                                        ) .
-                                                       ($s->page_is_redirect ? '</div>' : '' );
+                                                       ( $s->page_is_redirect ? '</div>' : '' );
                                        } else {
                                                $link = '[[' . htmlspecialchars( $s->page_title ) . ']]';
                                        }
index 3fdaf6b..4c5d1aa 100644 (file)
@@ -255,7 +255,7 @@ class SpecialProtectedpages extends SpecialPage {
 
                // Third pass generates sorted XHTML content
                foreach ( $m as $text => $type ) {
-                       $selected = ($type == $pr_type );
+                       $selected = ( $type == $pr_type );
                        $options[] = Xml::option( $text, $type, $selected ) . "\n";
                }
 
index 7b916cf..7055f2f 100644 (file)
@@ -181,7 +181,7 @@ class SpecialProtectedtitles extends SpecialPage {
                }
                // Third pass generates sorted XHTML content
                foreach ( $m as $text => $type ) {
-                       $selected = ($type == $pr_level );
+                       $selected = ( $type == $pr_level );
                        $options[] = Xml::option( $text, $type, $selected );
                }
 
index c37f216..0917069 100644 (file)
@@ -47,7 +47,7 @@ class SpecialRecentChanges extends IncludableSpecialPage {
                $opts->add( 'from', '' );
 
                $opts->add( 'hideminor', $this->getUser()->getBoolOption( 'hideminor' ) );
-               $opts->add( 'hidebots', true  );
+               $opts->add( 'hidebots', true );
                $opts->add( 'hideanons', false );
                $opts->add( 'hideliu', false );
                $opts->add( 'hidepatrolled', $this->getUser()->getBoolOption( 'hidepatrolled' ) );
index 238d838..e7f36ee 100644 (file)
@@ -88,19 +88,19 @@ class SpecialUploadStash extends UnlistedSpecialPage {
                        } else {
                                return $this->outputLocalFile( $params['file'] );
                        }
-               } catch( UploadStashFileNotFoundException $e ) {
+               } catch ( UploadStashFileNotFoundException $e ) {
                        $code = 404;
                        $message = $e->getMessage();
-               } catch( UploadStashZeroLengthFileException $e ) {
+               } catch ( UploadStashZeroLengthFileException $e ) {
                        $code = 500;
                        $message = $e->getMessage();
-               } catch( UploadStashBadPathException $e ) {
+               } catch ( UploadStashBadPathException $e ) {
                        $code = 500;
                        $message = $e->getMessage();
-               } catch( SpecialUploadStashTooLargeException $e ) {
+               } catch ( SpecialUploadStashTooLargeException $e ) {
                        $code = 500;
                        $message = 'Cannot serve a file larger than ' . self::MAX_SERVE_BYTES . ' bytes. ' . $e->getMessage();
-               } catch( Exception $e ) {
+               } catch ( Exception $e ) {
                        $code = 500;
                        $message = $e->getMessage();
                }
index 0366aef..f379e3a 100644 (file)
@@ -204,7 +204,7 @@ class UsercreateTemplateVForm extends BaseTemplate {
                                                        id="<?php echo htmlspecialchars( $inputItem['name'] ); ?>"
                                                        type="checkbox" value="1"
                                                        tabindex="<?php echo $tabIndex++; ?>"
-                                                       <?php if ( !empty( $inputItem['value'] ) )  {
+                                                       <?php if ( !empty( $inputItem['value'] ) ) {
                                                                echo 'checked="checked"';
                                                        } ?>
                                                >
index 0948a20..0e688a4 100644 (file)
@@ -52,7 +52,7 @@ class UserloginTemplateVForm extends BaseTemplate {
                <?php
                if ( $this->data['messagetype'] == 'error' ) {
                ?>
-                       <strong><?php $this->msg( 'loginerror' )?></strong><br />
+                       <strong><?php $this->msg( 'loginerror' ) ?></strong><br />
                <?php
                }
                $this->html( 'message' );