Remove a bunch of trailing spaces and unneeded newlines
authorumherirrender <umherirrender_de.wp@web.de>
Wed, 10 Oct 2012 18:13:40 +0000 (20:13 +0200)
committerumherirrender <umherirrender_de.wp@web.de>
Wed, 10 Oct 2012 18:14:40 +0000 (20:14 +0200)
Change-Id: I00f369641320acd7f087427ef031f3ee7efa0997

50 files changed:
includes/Cdb_PHP.php
includes/Collation.php
includes/CryptRand.php
includes/ExternalUser.php
includes/FeedUtils.php
includes/FormOptions.php
includes/MessageBlobStore.php
includes/OutputHandler.php
includes/Preferences.php
includes/ProtectionForm.php
includes/SquidPurgeClient.php
includes/StringUtils.php
includes/WebRequest.php
includes/Xml.php
includes/actions/CreditsAction.php
includes/actions/RevertAction.php
includes/api/ApiDelete.php
includes/api/ApiMain.php
includes/api/ApiParse.php
includes/api/ApiQueryAllCategories.php
includes/api/ApiUpload.php
includes/cache/FileCacheBase.php
includes/cache/SquidUpdate.php
includes/conf/DatabaseConf.php
includes/context/ContextSource.php
includes/context/RequestContext.php
includes/db/CloneDatabase.php
includes/db/ORMTable.php
includes/installer/Ibm_db2Updater.php
includes/installer/MysqlUpdater.php
includes/installer/SqliteUpdater.php
includes/logging/LogEntry.php
includes/logging/LogPage.php
includes/parser/DateFormatter.php
includes/parser/LinkHolderArray.php
includes/parser/ParserCache.php
includes/parser/ParserOptions.php
includes/parser/Parser_LinkHooks.php
includes/parser/Preprocessor_DOM.php
includes/parser/StripState.php
includes/specials/SpecialBlockList.php
includes/specials/SpecialExport.php
includes/specials/SpecialUpload.php
includes/specials/SpecialUploadStash.php
includes/specials/SpecialWantedfiles.php
includes/specials/SpecialWantedpages.php
includes/upload/UploadFromFile.php
maintenance/eval.php
opensearch_desc.php5
thumb.php5

index c97cf13..f58e07e 100644 (file)
@@ -180,7 +180,7 @@ class CdbReader_PHP extends CdbReader {
        protected function read( $length, $pos ) {
                if ( fseek( $this->handle, $pos ) == -1 ) {
                        // This can easily happen if the internal pointers are incorrect
-                       throw new MWException( 
+                       throw new MWException(
                                'Seek failed, file "' . $this->fileName . '" may be corrupted.' );
                }
 
@@ -205,7 +205,7 @@ class CdbReader_PHP extends CdbReader {
        protected function unpack31( $s ) {
                $data = unpack( 'V', $s );
                if ( $data[1] > 0x7fffffff ) {
-                       throw new MWException( 
+                       throw new MWException(
                                'Error in CDB file "' . $this->fileName . '", integer too big.' );
                }
                return $data[1];
@@ -477,7 +477,7 @@ class CdbWriter_PHP extends CdbWriter {
 
        /**
         * Clean up the temp file and throw an exception
-        * 
+        *
         * @param $msg string
         * @throws MWException
         */
index ad2b94b..8554c2b 100644 (file)
@@ -152,10 +152,10 @@ class IcuCollation extends Collation {
        /**
         * Unified CJK blocks.
         *
-        * The same definition of a CJK block must be used for both Collation and 
-        * generateCollationData.php. These blocks are omitted from the first 
-        * letter data, as an optimisation measure and because the default UCA table 
-        * is pretty useless for sorting Chinese text anyway. Japanese and Korean 
+        * The same definition of a CJK block must be used for both Collation and
+        * generateCollationData.php. These blocks are omitted from the first
+        * letter data, as an optimisation measure and because the default UCA table
+        * is pretty useless for sorting Chinese text anyway. Japanese and Korean
         * blocks are not included here, because they are smaller and more useful.
         */
        static $cjkBlocks = array(
@@ -180,7 +180,7 @@ class IcuCollation extends Collation {
 
        function __construct( $locale ) {
                if ( !extension_loaded( 'intl' ) ) {
-                       throw new MWException( 'An ICU collation was requested, ' . 
+                       throw new MWException( 'An ICU collation was requested, ' .
                                'but the intl extension is not available.' );
                }
                $this->locale = $locale;
@@ -218,8 +218,8 @@ class IcuCollation extends Collation {
 
                // Check for CJK
                $firstChar = mb_substr( $string, 0, 1, 'UTF-8' );
-               if ( ord( $firstChar ) > 0x7f 
-                       && self::isCjk( utf8ToCodepoint( $firstChar ) ) ) 
+               if ( ord( $firstChar ) > 0x7f
+                       && self::isCjk( utf8ToCodepoint( $firstChar ) ) )
                {
                        return $firstChar;
                }
@@ -265,9 +265,9 @@ class IcuCollation extends Collation {
                // Sort the letters.
                //
                // It's impossible to have the precompiled data file properly sorted,
-               // because the sort order changes depending on ICU version. If the 
-               // array is not properly sorted, the binary search will return random 
-               // results. 
+               // because the sort order changes depending on ICU version. If the
+               // array is not properly sorted, the binary search will return random
+               // results.
                //
                // We also take this opportunity to remove primary collisions.
                $letterMap = array();
@@ -320,7 +320,7 @@ class IcuCollation extends Collation {
        }
 
        /**
-        * Do a binary search, and return the index of the largest item that sorts 
+        * Do a binary search, and return the index of the largest item that sorts
         * less than or equal to the target value.
         *
         * @param $valueCallback array A function to call to get the value with
index 858eebf..fcf6a39 100644 (file)
@@ -391,7 +391,7 @@ class MWCryptRand {
                // We hash the random state with more salt to avoid the state from leaking
                // out and being used to predict the /randomness/ that follows.
                if ( strlen( $buffer ) < $bytes ) {
-                       wfDebug( __METHOD__ . ": Falling back to using a pseudo random state to generate randomness.\n" ); 
+                       wfDebug( __METHOD__ . ": Falling back to using a pseudo random state to generate randomness.\n" );
                }
                while ( strlen( $buffer ) < $bytes ) {
                        wfProfileIn( __METHOD__ . '-fallback' );
index 9a01deb..23944a5 100644 (file)
@@ -288,7 +288,7 @@ abstract class ExternalUser {
                                   'eu_external_id' => $this->getId() ),
                        __METHOD__ );
        }
-       
+
        /**
         * Check whether this external user id is already linked with
         * a local user.
@@ -305,5 +305,5 @@ abstract class ExternalUser {
                        ? User::newFromId( $row->eu_local_id )
                        : null;
        }
-       
+
 }
index b0a0e2b..82c6e4a 100644 (file)
@@ -87,7 +87,7 @@ class FeedUtils {
                        ($row->rc_deleted & Revision::DELETED_COMMENT)
                                ? wfMessage('rev-deleted-comment')->escaped()
                                : $row->rc_comment,
-                       $actiontext 
+                       $actiontext
                );
        }
 
index f978639..1cfe88e 100644 (file)
@@ -22,7 +22,7 @@
  *
  * @file
  * @author Niklas Laxström
- * @author Antoine Musso 
+ * @author Antoine Musso
  */
 
 /**
index 3a698e5..09561bd 100644 (file)
@@ -140,7 +140,7 @@ class MessageBlobStore {
                // Save the old and new blobs for later
                $oldBlob = $row->mr_blob;
                $newBlob = self::generateMessageBlob( $module, $lang );
-               
+
                $newRow = array(
                        'mr_resource' => $name,
                        'mr_lang' => $lang,
index 46a43f6..78435e4 100644 (file)
@@ -22,9 +22,9 @@
 
 /**
  * Standard output handler for use with ob_start
- * 
+ *
  * @param $s string
- * 
+ *
  * @return string
  */
 function wfOutputHandler( $s ) {
@@ -85,7 +85,7 @@ function wfRequestExtension() {
 /**
  * Handler that compresses data with gzip if allowed by the Accept header.
  * Unlike ob_gzhandler, it works for HEAD requests too.
- * 
+ *
  * @param $s string
  *
  * @return string
index 216ba48..65a0d02 100644 (file)
@@ -879,7 +879,7 @@ class Preferences {
                global $wgUseRCPatrol, $wgEnableAPI, $wgRCMaxAge;
 
                $watchlistdaysMax = ceil( $wgRCMaxAge / ( 3600 * 24 ) );
-               
+
                ## Watchlist #####################################
                $defaultPreferences['watchlistdays'] = array(
                        'type' => 'float',
index beb20ea..9643ba7 100644 (file)
@@ -63,7 +63,7 @@ class ProtectionForm {
                $this->mArticle = $article;
                $this->mTitle = $article->getTitle();
                $this->mApplicableTypes = $this->mTitle->getRestrictionTypes();
-               
+
                // Check if the form should be disabled.
                // If it is, the form will be available in read-only to show levels.
                $this->mPermErrors = $this->mTitle->getUserPermissionsErrors( 'protect', $wgUser );
index 8eb0f6b..4aecf2e 100644 (file)
@@ -21,9 +21,9 @@
  */
 
 /**
- * An HTTP 1.0 client built for the purposes of purging Squid and Varnish. 
- * Uses asynchronous I/O, allowing purges to be done in a highly parallel 
- * manner. 
+ * An HTTP 1.0 client built for the purposes of purging Squid and Varnish.
+ * Uses asynchronous I/O, allowing purges to be done in a highly parallel
+ * manner.
  *
  * Could be replaced by curl_multi_exec() or some such.
  */
@@ -123,7 +123,7 @@ class SquidPurgeClient {
                return array( $socket );
        }
 
-       /** 
+       /**
         * Get the host's IP address.
         * Does not support IPv6 at present due to the lack of a convenient interface in PHP.
         */
@@ -408,7 +408,7 @@ class SquidPurgeClientPool {
                        $numReady = socket_select( $readSockets, $writeSockets, $exceptSockets, $timeout );
                        wfRestoreWarnings();
                        if ( $numReady === false ) {
-                               wfDebugLog( 'squid', __METHOD__.': Error in stream_select: ' . 
+                               wfDebugLog( 'squid', __METHOD__.': Error in stream_select: ' .
                                        socket_strerror( socket_last_error() ) . "\n" );
                                break;
                        }
index 43275a6..fba31ea 100644 (file)
@@ -424,7 +424,7 @@ class ReplacementArray {
 
 /**
  * An iterator which works exactly like:
- * 
+ *
  * foreach ( explode( $delim, $s ) as $element ) {
  *    ...
  * }
index 80fb81a..7005416 100644 (file)
@@ -380,7 +380,6 @@ class WebRequest {
                return $ret;
        }
 
-       
        /**
         * Unset an arbitrary value from our get/post data.
         *
index 35019ff..2f8ba0f 100644 (file)
@@ -208,7 +208,7 @@ class Xml {
 
        /**
         * Construct a language selector appropriate for use in a form or preferences
-        * 
+        *
         * @param string $selected The language code of the selected language
         * @param boolean $customisedOnly If true only languages which have some content are listed
         * @param string $inLanguage The ISO code of the language to display the select list in (optional)
index f715229..d0bc22c 100644 (file)
@@ -122,7 +122,7 @@ class CreditsAction extends FormlessAction {
 
                # Sift for real versus user names
                foreach ( $contributors as $user ) {
-                       $cnt--; 
+                       $cnt--;
                        if ( $user->isLoggedIn() ) {
                                $link = $this->link( $user );
                                if ( !in_array( 'realname', $wgHiddenPrefs ) && $user->getRealName() ) {
index 1fc7e90..a5fc4e1 100644 (file)
@@ -124,7 +124,7 @@ class RevertFileAction extends FormAction {
                $lang = $this->getLanguage();
                $userDate = $lang->userDate( $timestamp, $user );
                $userTime = $lang->userTime( $timestamp, $user );
-       
+
                $this->getOutput()->addWikiMsg( 'filerevert-success', $this->getTitle()->getText(),
                        $userDate, $userTime,
                        wfExpandUrl( $this->page->getFile()->getArchiveUrl( $this->getRequest()->getText( 'oldimage' ) ),
@@ -136,7 +136,7 @@ class RevertFileAction extends FormAction {
        protected function getPageTitle() {
                return $this->msg( 'filerevert', $this->getTitle()->getText() );
        }
-       
+
        protected function getDescription() {
                $this->getOutput()->addBacklinkSubtitle( $this->getTitle() );
                return '';
index 283250c..964e0ae 100644 (file)
@@ -119,7 +119,7 @@ class ApiDelete extends ApiBase {
                        // Need to pass a throwaway variable because generateReason expects
                        // a reference
                        $hasHistory = false;
-                       $reason = $page->getAutoDeleteReason( $hasHistory ); 
+                       $reason = $page->getAutoDeleteReason( $hasHistory );
                        if ( $reason === false ) {
                                return array( array( 'cannotdelete', $title->getPrefixedText() ) );
                        }
index 7d7eb14..3aa51b7 100644 (file)
@@ -840,7 +840,7 @@ class ApiMain extends ApiBase {
        protected function logRequest( $time ) {
                $request = $this->getRequest();
                $milliseconds = $time === null ? '?' : round( $time * 1000 );
-               $s = 'API' . 
+               $s = 'API' .
                        ' ' . $request->getMethod() .
                        ' ' . wfUrlencode( str_replace( ' ', '_', $this->getUser()->getName() ) ) .
                        ' ' . $request->getIP() .
@@ -897,7 +897,7 @@ class ApiMain extends ApiBase {
         */
        public function getCheck( $name ) {
                $this->mParamsUsed[$name] = true;
-               return $this->getRequest()->getCheck( $name );          
+               return $this->getRequest()->getCheck( $name );
        }
 
        /**
index 312e439..a29a0bd 100644 (file)
@@ -158,7 +158,7 @@ class ApiParse extends ApiBase {
                                $popts->enableLimitReport( !$params['disablepp'] );
 
                                // Potentially cached
-                               $p_result = $this->getParsedContent( $pageObj, $popts, $pageid, 
+                               $p_result = $this->getParsedContent( $pageObj, $popts, $pageid,
                                        isset( $prop['wikitext'] ) ) ;
                        }
                } else { // Not $oldid, $pageid, $page. Hence based on $text
index 4f4c77f..c2beaec 100644 (file)
@@ -81,7 +81,6 @@ class ApiQueryAllCategories extends ApiQueryGeneratorBase {
                } else {
                        $this->addWhereRange( 'cat_pages', 'older', $max, $min);
                }
-    
 
                if ( isset( $params['prefix'] ) ) {
                        $this->addWhere( 'cat_title' . $db->buildLike( $this->titlePartToKey( $params['prefix'] ), $db->anyString() ) );
index 3a9b5c5..0454bb3 100644 (file)
@@ -89,7 +89,7 @@ class ApiUpload extends ApiBase {
                } else {
                        $this->verifyUpload();
                }
+
                // Check if the user has the rights to modify or overwrite the requested title
                // (This check is irrelevant if stashing is already requested, since the errors
                //  can always be fixed by changing the title)
@@ -99,7 +99,7 @@ class ApiUpload extends ApiBase {
                                $this->dieRecoverableError( $permErrors[0], 'filename' );
                        }
                }
-               // Get the result based on the current upload context: 
+               // Get the result based on the current upload context:
                $result = $this->getContextResult();
 
                if ( $result['result'] === 'Success' ) {
@@ -196,7 +196,7 @@ class ApiUpload extends ApiBase {
                                return array();
                        }
 
-                       // Check we added the last chunk: 
+                       // Check we added the last chunk:
                        if( $this->mParams['offset'] + $chunkSize == $this->mParams['filesize'] ) {
                                $status = $this->mUpload->concatenateChunks();
 
@@ -222,7 +222,7 @@ class ApiUpload extends ApiBase {
                $result['offset'] = $this->mParams['offset'] + $chunkSize;
                return $result;
        }
-       
+
        /**
         * Stash the file and return the file key
         * Also re-raises exceptions with slightly more informative message strings (useful for API)
index c0c5609..1a08d9f 100644 (file)
@@ -229,7 +229,7 @@ abstract class FileCacheBase {
        public function incrMissesRecent( WebRequest $request ) {
                global $wgMemc;
                if ( mt_rand( 0, self::MISS_FACTOR - 1 ) == 0 ) {
-                       # Get a large IP range that should include the user  even if that 
+                       # Get a large IP range that should include the user  even if that
                        # person's IP address changes
                        $ip = $request->getIP();
                        if ( !IP::isValid( $ip ) ) {
index 423e388..a4b2002 100644 (file)
@@ -249,7 +249,7 @@ class SquidUpdate {
        static function expand( $url ) {
                return wfExpandUrl( $url, PROTO_INTERNAL );
        }
-       
+
        /**
         * Find the HTCP routing rule to use for a given URL.
         * @param $url string URL to match
@@ -264,5 +264,4 @@ class SquidUpdate {
                }
                return false;
        }
-       
 }
index e2e36ce..d8f644d 100644 (file)
@@ -39,7 +39,7 @@ class DatabaseConf extends Conf {
         *
         * @param $name
         * @param $value
-        * 
+        *
         * @return bool
         */
        protected function writeSetting( $name, $value ) {
index 45bd6ff..d5a6d15 100644 (file)
@@ -165,6 +165,4 @@ abstract class ContextSource implements IContextSource {
                $args = func_get_args();
                return call_user_func_array( array( $this->getContext(), 'msg' ), $args );
        }
-       
 }
-
index a528f22..cd2bf55 100644 (file)
@@ -307,7 +307,7 @@ class RequestContext implements IContextSource {
        public function getSkin() {
                if ( $this->skin === null ) {
                        wfProfileIn( __METHOD__ . '-createskin' );
-                       
+
                        $skin = null;
                        wfRunHooks( 'RequestContextCreateSkin', array( $this, &$skin ) );
 
@@ -397,4 +397,3 @@ class RequestContext implements IContextSource {
        }
 
 }
-
index 4e43642..4ff7913 100644 (file)
@@ -87,18 +87,17 @@ class CloneDatabase {
         * Clone the table structure
         */
        public function cloneTableStructure() {
-               
                foreach( $this->tablesToClone as $tbl ) {
                        # Clean up from previous aborted run.  So that table escaping
                        # works correctly across DB engines, we need to change the pre-
                        # fix back and forth so tableName() works right.
-                       
+
                        self::changePrefix( $this->oldTablePrefix );
                        $oldTableName = $this->db->tableName( $tbl, 'raw' );
-                       
+
                        self::changePrefix( $this->newTablePrefix );
                        $newTableName = $this->db->tableName( $tbl, 'raw' );
-                       
+
                        if( $this->dropCurrentTables && !in_array( $this->db->getType(), array( 'postgres', 'oracle' ) ) ) {
                                $this->db->dropTable( $tbl, __METHOD__ );
                                wfDebug( __METHOD__." dropping {$newTableName}\n", true);
@@ -108,9 +107,7 @@ class CloneDatabase {
                        # Create new table
                        wfDebug( __METHOD__." duplicating $oldTableName to $newTableName\n", true );
                        $this->db->duplicateTableStructure( $oldTableName, $newTableName, $this->useTemporaryTables );
-                       
                }
-               
        }
 
        /**
index a77074f..39f16a0 100644 (file)
@@ -333,7 +333,7 @@ abstract class ORMTable implements IORMTable {
                        $functionName
                ) !== false; // DatabaseBase::delete does not always return true for success as documented...
        }
-       
+
        /**
         * Get API parameters for the fields supported by this object.
         *
index 3a42953..805ff0f 100644 (file)
@@ -77,7 +77,7 @@ class Ibm_db2Updater extends DatabaseUpdater {
                        array( 'modifyField', 'user_properties', 'up_property', 'patch-up_property.sql' ),
                        array( 'addTable', 'uploadstash',                       'patch-uploadstash.sql' ),
                        array( 'addTable', 'user_former_groups',                'patch-user_former_groups.sql'),
-                       array( 'doRebuildLocalisationCache' ), 
+                       array( 'doRebuildLocalisationCache' ),
 
                        // 1.19
                        array( 'addIndex', 'logging',       'type_action',      'patch-logging-type-action-index.sql'),
index 00009ca..68a3922 100644 (file)
@@ -206,7 +206,6 @@ class MysqlUpdater extends DatabaseUpdater {
                        array( 'modifyField', 'user_groups', 'ug_group', 'patch-ug_group-length-increase.sql' ),
                        array( 'addField',      'uploadstash',  'us_chunk_inx',         'patch-uploadstash_chunk.sql' ),
                        array( 'addfield', 'job',           'job_timestamp',    'patch-jobs-add-timestamp.sql' ),
-
                        array( 'modifyField', 'user_former_groups', 'ufg_group', 'patch-ufg_group-length-increase.sql' ),
 
                        // 1.20
index e26aa78..ab38055 100644 (file)
@@ -85,7 +85,6 @@ class SqliteUpdater extends DatabaseUpdater {
                        array( 'modifyField', 'user_groups', 'ug_group', 'patch-ug_group-length-increase.sql' ),
                        array( 'addField',      'uploadstash',  'us_chunk_inx',         'patch-uploadstash_chunk.sql' ),
                        array( 'addfield', 'job',           'job_timestamp',    'patch-jobs-add-timestamp.sql' ),
-
                        array( 'modifyField', 'user_former_groups', 'ufg_group', 'patch-ug_group-length-increase.sql' ),
 
                        // 1.20
index 37560d8..2ca525e 100644 (file)
@@ -335,9 +335,9 @@ class ManualLogEntry extends LogEntryBase {
 
        /**
         * Constructor.
-        * 
+        *
         * @since 1.19
-        * 
+        *
         * @param string $type
         * @param string $subtype
         */
@@ -357,9 +357,9 @@ class ManualLogEntry extends LogEntryBase {
         *   '4:color' => 'blue',
         *   'animal' => 'dog'
         * );
-        * 
+        *
         * @since 1.19
-        * 
+        *
         * @param $parameters array Associative array
         */
        public function setParameters( $parameters ) {
@@ -368,9 +368,9 @@ class ManualLogEntry extends LogEntryBase {
 
        /**
         * Set the user that performed the action being logged.
-        * 
+        *
         * @since 1.19
-        * 
+        *
         * @param User $performer
         */
        public function setPerformer( User $performer ) {
@@ -379,9 +379,9 @@ class ManualLogEntry extends LogEntryBase {
 
        /**
         * Set the title of the object changed.
-        * 
+        *
         * @since 1.19
-        * 
+        *
         * @param Title $target
         */
        public function setTarget( Title $target ) {
@@ -390,9 +390,9 @@ class ManualLogEntry extends LogEntryBase {
 
        /**
         * Set the timestamp of when the logged action took place.
-        * 
+        *
         * @since 1.19
-        * 
+        *
         * @param string $timestamp
         */
        public function setTimestamp( $timestamp ) {
@@ -401,9 +401,9 @@ class ManualLogEntry extends LogEntryBase {
 
        /**
         * Set a comment associated with the action being logged.
-        * 
+        *
         * @since 1.19
-        * 
+        *
         * @param string $comment
         */
        public function setComment( $comment ) {
@@ -412,9 +412,9 @@ class ManualLogEntry extends LogEntryBase {
 
        /**
         * TODO: document
-        * 
+        *
         * @since 1.19
-        * 
+        *
         * @param integer $deleted
         */
        public function setDeleted( $deleted ) {
index d96a5ea..90393ea 100644 (file)
@@ -220,7 +220,7 @@ class LogPage {
        }
 
        /**
-        * Generate text for a log entry. 
+        * Generate text for a log entry.
         * Only LogFormatter should call this function.
         *
         * @param $type String: log type
index 2917b4a..0f22675 100644 (file)
@@ -200,7 +200,7 @@ class DateFormatter {
                $linked = true;
                if ( isset( $this->mLinked ) )
                        $linked = $this->mLinked;
-               
+
                $bits = array();
                $key = $this->keys[$this->mSource];
                for ( $p=0; $p < strlen($key); $p++ ) {
@@ -219,7 +219,7 @@ class DateFormatter {
         */
        function formatDate( $bits, $link = true ) {
                $format = $this->targets[$this->mTarget];
-               
+
                if (!$link) {
                        // strip piped links
                        $format = preg_replace( '/\[\[[^|]+\|([^\]]+)\]\]/', '$1', $format );
index d9356b4..49160e8 100644 (file)
@@ -45,7 +45,7 @@ class LinkHolderArray {
 
        /**
         * Don't serialize the parent object, it is big, and not needed when it is
-        * a parameter to mergeForeign(), which is the only application of 
+        * a parameter to mergeForeign(), which is the only application of
         * serializing at present.
         *
         * Compact the titles, only serialize the text form.
@@ -103,9 +103,9 @@ class LinkHolderArray {
        }
 
        /**
-        * Merge a LinkHolderArray from another parser instance into this one. The 
-        * keys will not be preserved. Any text which went with the old 
-        * LinkHolderArray and needs to work with the new one should be passed in 
+        * Merge a LinkHolderArray from another parser instance into this one. The
+        * keys will not be preserved. Any text which went with the old
+        * LinkHolderArray and needs to work with the new one should be passed in
         * the $texts array. The strings in this array will have their link holders
         * converted for use in the destination link holder. The resulting array of
         * strings will be returned.
@@ -126,7 +126,7 @@ class LinkHolderArray {
                                $maxId = $newKey > $maxId ? $newKey : $maxId;
                        }
                }
-               $texts = preg_replace_callback( '/(<!--LINK \d+:)(\d+)(-->)/', 
+               $texts = preg_replace_callback( '/(<!--LINK \d+:)(\d+)(-->)/',
                        array( $this, 'mergeForeignCallback' ), $texts );
 
                # Renumber interwiki links
@@ -135,7 +135,7 @@ class LinkHolderArray {
                        $this->interwikis[$newKey] = $entry;
                        $maxId = $newKey > $maxId ? $newKey : $maxId;
                }
-               $texts = preg_replace_callback( '/(<!--IWLINK )(\d+)(-->)/', 
+               $texts = preg_replace_callback( '/(<!--IWLINK )(\d+)(-->)/',
                        array( $this, 'mergeForeignCallback' ), $texts );
 
                # Set the parent link ID to be beyond the highest used ID
@@ -159,8 +159,8 @@ class LinkHolderArray {
                # Internal links
                $pos = 0;
                while ( $pos < strlen( $text ) ) {
-                       if ( !preg_match( '/<!--LINK (\d+):(\d+)-->/', 
-                               $text, $m, PREG_OFFSET_CAPTURE, $pos ) ) 
+                       if ( !preg_match( '/<!--LINK (\d+):(\d+)-->/',
+                               $text, $m, PREG_OFFSET_CAPTURE, $pos ) )
                        {
                                break;
                        }
index e5beba8..d419621 100644 (file)
@@ -201,8 +201,8 @@ class ParserCache {
 
                wfDebug( "ParserOutput cache found.\n" );
 
-               // The edit section preference may not be the appropiate one in 
-               // the ParserOutput, as we are not storing it in the parsercache 
+               // The edit section preference may not be the appropiate one in
+               // the ParserOutput, as we are not storing it in the parsercache
                // key. Force it here. See bug 31445.
                $value->setEditSectionTokens( $popts->getEditSection() );
 
index 009b18a..064182e 100644 (file)
  * @ingroup Parser
  */
 class ParserOptions {
-       
+
        /**
         * Use DateFormatter to format dates
         */
        var $mUseDynamicDates;
-       
+
        /**
         * Interlanguage links are removed and returned in an array
         */
        var $mInterwikiMagic;
-       
+
        /**
         * Allow external images inline?
         */
        var $mAllowExternalImages;
-       
+
        /**
         * If not, any exception?
         */
        var $mAllowExternalImagesFrom;
-       
+
        /**
         * If not or it doesn't match, should we check an on-wiki whitelist?
         */
        var $mEnableImageWhitelist;
-       
+
        /**
         * Date format index
         */
        var $mDateFormat = null;
-       
+
        /**
         * Create "edit section" links?
         */
        var $mEditSection = true;
-       
+
        /**
         * Allow inclusion of special pages?
         */
        var $mAllowSpecialInclusion;
-       
+
        /**
         * Use tidy to cleanup output HTML?
         */
        var $mTidy = false;
-       
+
        /**
         * Which lang to call for PLURAL and GRAMMAR
         */
        var $mInterfaceMessage = false;
-       
+
        /**
         * Overrides $mInterfaceMessage with arbitrary language
         */
        var $mTargetLanguage = null;
-       
+
        /**
         * Maximum size of template expansions, in bytes
         */
        var $mMaxIncludeSize;
-       
+
        /**
         * Maximum number of nodes touched by PPFrame::expand()
         */
@@ -99,56 +99,56 @@ class ParserOptions {
         * Maximum number of nodes generated by Preprocessor::preprocessToObj()
         */
        var $mMaxGeneratedPPNodeCount;
-       
+
        /**
         * Maximum recursion depth in PPFrame::expand()
         */
        var $mMaxPPExpandDepth;
-       
+
        /**
         * Maximum recursion depth for templates within templates
         */
        var $mMaxTemplateDepth;
-       
+
        /**
         * Maximum number of calls per parse to expensive parser functions
         */
        var $mExpensiveParserFunctionLimit;
-       
+
        /**
         * Remove HTML comments. ONLY APPLIES TO PREPROCESS OPERATIONS
         */
        var $mRemoveComments = true;
-       
+
        /**
         * Callback for template fetching. Used as first argument to call_user_func().
         */
        var $mTemplateCallback =
                array( 'Parser', 'statelessFetchTemplate' );
-               
+
        /**
         * Enable limit report in an HTML comment on output
         */
        var $mEnableLimitReport = false;
-       
+
        /**
         * Timestamp used for {{CURRENTDAY}} etc.
         */
        var $mTimestamp;
-       
+
        /**
         * Target attribute for external links
         */
        var $mExternalLinkTarget;
-       
+
        /**
-        * Clean up signature texts? 
+        * Clean up signature texts?
         *
         * 1) Strip ~~~, ~~~~ and ~~~~~ out of signatures
         * 2) Substitute all transclusions
         */
        var $mCleanSignatures;
-       
+
        /**
         * Transform wiki markup when saving the page?
         */
@@ -168,43 +168,43 @@ class ParserOptions {
         * Automatically number headings?
         */
        var $mNumberHeadings;
-       
+
        /**
         * User math preference (as integer). Not used (1.19)
         */
        var $mMath;
-       
+
        /**
         * Thumb size preferred by the user.
         */
        var $mThumbSize;
-       
+
        /**
         * Maximum article size of an article to be marked as "stub"
         */
        private $mStubThreshold;
-       
+
        /**
         * Language object of the User language.
         */
        var $mUserLang;
 
        /**
-        * @var User 
+        * @var User
         * Stored user object
         */
        var $mUser;
-       
+
        /**
         * Parsing the page for a "preview" operation?
         */
        var $mIsPreview = false;
-       
+
        /**
         * Parsing the page for a "preview" operation on a single section?
         */
        var $mIsSectionPreview = false;
-       
+
        /**
         * Parsing the printable version of the page?
         */
@@ -415,8 +415,8 @@ class ParserOptions {
                return new ParserOptions( $context->getUser(), $context->getLanguage() );
        }
 
-       /** 
-        * Get user options 
+       /**
+        * Get user options
         *
         * @param $user User object
         * @param $lang Language object
index 9c750b8..e4f5d12 100644 (file)
@@ -32,7 +32,7 @@ class Parser_LinkHooks extends Parser {
         * can automatically discard old data.
         */
        const VERSION = '1.6.4';
-       
+
        # Flags for Parser::setLinkHook
        # Also available as global constants from Defines.php
        const SLH_PATTERN = 1;
@@ -112,7 +112,7 @@ class Parser_LinkHooks extends Parser {
                $this->mLinkHooks[$ns] = array( $callback, $flags );
                return $oldVal;
        }
-       
+
        /**
         * Get all registered link hook identifiers
         *
@@ -147,7 +147,7 @@ class Parser_LinkHooks extends Parser {
                }
 
                $holders = new LinkHolderArray( $this );
-               
+
                if( is_null( $this->mTitle ) ) {
                        wfProfileOut( __METHOD__ );
                        wfProfileOut( __METHOD__.'-setup' );
@@ -155,7 +155,7 @@ class Parser_LinkHooks extends Parser {
                }
 
                wfProfileOut( __METHOD__.'-setup' );
-               
+
                $offset = 0;
                $offsetStack = array();
                $markers = new LinkMarkerReplacer( $this, $holders, array( &$this, 'replaceInternalLinksCallback' ) );
@@ -181,7 +181,7 @@ class Parser_LinkHooks extends Parser {
                                $startBracketOffset = array_pop($offsetStack);
                                # Just to clean up the code, lets place offsets on the outer ends
                                $endBracketOffset += 2;
-                               
+
                                # Only do logic if we actually have a opening bracket for this
                                if( isset($startBracketOffset) ) {
                                        # Extract text inside the link
@@ -206,22 +206,20 @@ class Parser_LinkHooks extends Parser {
                                        # ToDO: Some LinkHooks use patterns rather than namespaces
                                        # these need to be tested at this point here
                                }
-                               
                        }
                        # Bump our offset to after our current bracket
                        $offset = $bracketOffset+2;
                }
-               
-               
+
                # Now expand our tree
                wfProfileIn( __METHOD__.'-expand' );
                $s = $markers->expand( $s );
                wfProfileOut( __METHOD__.'-expand' );
-               
+
                wfProfileOut( __METHOD__ );
                return $holders;
        }
-       
+
        function replaceInternalLinksCallback( $parser, $holders, $markers, $titleText, $paramText ) {
                wfProfileIn( __METHOD__ );
                $wt = isset($paramText) ? "[[$titleText|$paramText]]" : "[[$titleText]]";
@@ -233,16 +231,16 @@ class Parser_LinkHooks extends Parser {
                        wfProfileOut( __METHOD__ );
                        return $wt;
                }
-               
+
                # Make subpage if necessary
                if( $this->areSubpagesAllowed() ) {
                        $titleText = $this->maybeDoSubpageLink( $titleText, $paramText );
                }
-               
+
                # Check for a leading colon and strip it if it is there
                $leadingColon = $titleText[0] == ':';
                if( $leadingColon ) $titleText = substr( $titleText, 1 );
-               
+
                wfProfileOut( __METHOD__."-misc" );
                # Make title object
                wfProfileIn( __METHOD__."-title" );
@@ -254,7 +252,7 @@ class Parser_LinkHooks extends Parser {
                }
                $ns = $title->getNamespace();
                wfProfileOut( __METHOD__."-title" );
-               
+
                # Default for Namespaces is a default link
                # ToDo: Default for patterns is plain wikitext
                $return = true;
@@ -273,7 +271,7 @@ class Parser_LinkHooks extends Parser {
                }
                if( $return === true ) {
                        # True (treat as plain link) was returned, call the defaultLinkHook
-                       $return = CoreLinkFunctions::defaultLinkHook( $parser, $holders, $markers, $title, 
+                       $return = CoreLinkFunctions::defaultLinkHook( $parser, $holders, $markers, $title,
                                $titleText, $paramText, $leadingColon );
                }
                if( $return === false ) {
@@ -285,13 +283,13 @@ class Parser_LinkHooks extends Parser {
                wfProfileOut( __METHOD__ );
                return $return;
        }
-       
+
 }
 
 class LinkMarkerReplacer {
-       
+
        protected $markers, $nextId, $parser, $holders, $callback;
-       
+
        function __construct( $parser, $holders, $callback ) {
                $this->nextId   = 0;
                $this->markers  = array();
@@ -299,21 +297,21 @@ class LinkMarkerReplacer {
                $this->holders  = $holders;
                $this->callback = $callback;
        }
-       
+
        function addMarker($titleText, $paramText) {
                $id = $this->nextId++;
                $this->markers[$id] = array( $titleText, $paramText );
                return "<!-- LINKMARKER $id -->";
        }
-       
+
        function findMarker( $string ) {
                return (bool) preg_match('/<!-- LINKMARKER [0-9]+ -->/', $string );
        }
-       
+
        function expand( $string ) {
                return StringUtils::delimiterReplaceCallback( "<!-- LINKMARKER ", " -->", array( &$this, 'callback' ), $string );
        }
-       
+
        function callback( $m ) {
                $id = intval($m[1]);
                if( !array_key_exists($id, $this->markers) ) return $m[0];
@@ -323,5 +321,4 @@ class LinkMarkerReplacer {
                array_unshift( $args, $this->parser );
                return call_user_func_array( $this->callback, $args );
        }
-       
 }
index 15ea5e4..b2dd7db 100644 (file)
@@ -165,7 +165,7 @@ class Preprocessor_DOM implements Preprocessor {
                }
 
                // Fail if the number of elements exceeds acceptable limits
-               // Do not attempt to generate the DOM 
+               // Do not attempt to generate the DOM
                $this->parser->mGeneratedPPNodeCount += substr_count( $xml, '<' );
                $max = $this->parser->mOptions->getMaxGeneratedPPNodeCount();
                if ( $this->parser->mGeneratedPPNodeCount > $max ) {
index ad95d5f..57f623d 100644 (file)
@@ -112,7 +112,7 @@ class StripState {
         * @return mixed
         */
        protected function unstripType( $type, $text ) {
-               // Shortcut 
+               // Shortcut
                if ( !count( $this->data[$type] ) ) {
                        return $text;
                }
@@ -139,7 +139,7 @@ class StripState {
                                        . '</span>';
                        }
                        if ( $this->recursionLevel >= self::UNSTRIP_RECURSION_LIMIT ) {
-                               return '<span class="error">' . 
+                               return '<span class="error">' .
                                        wfMessage( 'parser-unstrip-recursion-limit' )
                                                ->numParams( self::UNSTRIP_RECURSION_LIMIT )->inContentLanguage()->text() .
                                        '</span>';
@@ -156,7 +156,7 @@ class StripState {
        }
 
        /**
-        * Get a StripState object which is sufficient to unstrip the given text. 
+        * Get a StripState object which is sufficient to unstrip the given text.
         * It will contain the minimum subset of strip items necessary.
         *
         * @param $text string
index 7143d5b..faaab72 100644 (file)
@@ -441,7 +441,7 @@ class BlockListPager extends TablePager {
                        $name = str_replace( ' ', '_', $user->getName() );
                        $lb->add( NS_USER, $name );
                        $lb->add( NS_USER_TALK, $name );
-               } 
+               }
 
                $lb->execute();
                wfProfileOut( __METHOD__ );
index b4294b3..18dde20 100644 (file)
@@ -286,7 +286,7 @@ class SpecialExport extends SpecialPage {
                } else {
 
                        $pageSet = array(); // Inverted index of all pages to look up
-               
+
                        // Split up and normalize input
                        foreach( explode( "\n", $page ) as $pageName ) {
                                $pageName = trim( $pageName );
index a15fdd2..a061963 100644 (file)
@@ -646,7 +646,7 @@ class SpecialUpload extends SpecialPage {
                                $exists['normalizedFile']->getTitle()->getPrefixedText() )->parse();
                } elseif ( $exists['warning'] == 'thumb' ) {
                        // Swapped argument order compared with other messages for backwards compatibility
-                       $warning = wfMessage( 'fileexists-thumbnail-yes', 
+                       $warning = wfMessage( 'fileexists-thumbnail-yes',
                                $exists['thumbFile']->getTitle()->getPrefixedText(), $filename )->parse();
                } elseif ( $exists['warning'] == 'thumb-name' ) {
                        // Image w/o '180px-' does not exists, but we do not like these filenames
index 6353b1c..3f9851e 100644 (file)
@@ -192,7 +192,7 @@ class SpecialUploadStash extends UnlistedSpecialPage {
 
                // now we should construct a File, so we can get mime and other such info in a standard way
                // n.b. mimetype may be different from original (ogx original -> jpeg thumb)
-               $thumbFile = new UnregisteredLocalFile( false, 
+               $thumbFile = new UnregisteredLocalFile( false,
                        $this->stash->repo, $thumbnailImage->getStoragePath(), false );
                if ( !$thumbFile ) {
                        throw new UploadStashFileNotFoundException( "couldn't create local file object for thumbnail" );
index f52f7bb..ddeb4a1 100644 (file)
@@ -42,7 +42,7 @@ class WantedFilesPage extends WantedQueryPage {
                $catMessage = $this->msg( 'broken-file-category' )
                        ->title( Title::newFromText( "Wanted Files", NS_MAIN ) )
                        ->inContentLanguage();
-               
+
                if ( !$catMessage->isDisabled() ) {
                        $category = Title::makeTitleSafe( NS_CATEGORY, $catMessage->text() );
                } else {
index dec123d..05df400 100644 (file)
@@ -27,7 +27,7 @@
  * @ingroup SpecialPage
  */
 class WantedPagesPage extends WantedQueryPage {
-       
+
        function __construct( $name = 'Wantedpages' ) {
                parent::__construct( $name );
        }
index aa0cc77..ab2a7a3 100644 (file)
@@ -79,21 +79,21 @@ class UploadFromFile extends UploadBase {
         * @return array
         */
        public function verifyUpload() {
-               # Check for a post_max_size or upload_max_size overflow, so that a 
+               # Check for a post_max_size or upload_max_size overflow, so that a
                # proper error can be shown to the user
                if ( is_null( $this->mTempPath ) || $this->isEmptyFile() ) {
                        if ( $this->mUpload->isIniSizeOverflow() ) {
-                               return array( 
+                               return array(
                                        'status' => UploadBase::FILE_TOO_LARGE,
-                                       'max' => min( 
-                                               self::getMaxUploadSize( $this->getSourceType() ), 
-                                               wfShorthandToInteger( ini_get( 'upload_max_filesize' ) ), 
+                                       'max' => min(
+                                               self::getMaxUploadSize( $this->getSourceType() ),
+                                               wfShorthandToInteger( ini_get( 'upload_max_filesize' ) ),
                                                wfShorthandToInteger( ini_get( 'post_max_size' ) )
                                        ),
                                );
                        }
                }
-               
+
                return parent::verifyUpload();
        }
 }
index 5aefe1c..69cf548 100644 (file)
@@ -43,7 +43,7 @@ if ( isset( $options['d'] ) ) {
        }
        if ( $d > 1 ) {
                $lb = wfGetLB();
-               $serverCount = $lb->getServerCount(); 
+               $serverCount = $lb->getServerCount();
                for ( $i = 0; $i < $serverCount; $i++ ) {
                        $server = $lb->getServerInfo( $i );
                        $server['flags'] |= DBO_DEBUG;
index 16d09ea..58bd351 100644 (file)
@@ -21,4 +21,4 @@
  * @file
  */
 
-require './opensearch_desc.php'; 
+require './opensearch_desc.php';
index 0c9b702..db388d2 100644 (file)
@@ -22,4 +22,4 @@
  * @ingroup Media
  */
 
-require './thumb.php'; 
+require './thumb.php';