Remove a bunch of trailing spaces and unneeded newlines
authorumherirrender <umherirrender_de.wp@web.de>
Fri, 19 Oct 2012 20:03:05 +0000 (22:03 +0200)
committerumherirrender <umherirrender_de.wp@web.de>
Fri, 19 Oct 2012 20:03:05 +0000 (22:03 +0200)
Change-Id: I7db616db8c969567d420c0161fa207b366e292b6

25 files changed:
INSTALL
README
StartProfiler.sample
UPGRADE
includes/DefaultSettings.php
includes/HistoryBlob.php
includes/Html.php
includes/LinkFilter.php
includes/Linker.php
includes/MimeMagic.php
includes/SeleniumWebSettings.php
includes/Status.php
includes/Title.php
includes/User.php
includes/extauth/MediaWiki.php
includes/filebackend/FSFile.php
includes/filerepo/FSRepo.php
includes/filerepo/ForeignDBRepo.php
includes/filerepo/ForeignDBViaLBRepo.php
includes/filerepo/LocalRepo.php
includes/resourceloader/ResourceLoader.php
includes/resourceloader/ResourceLoaderModule.php
includes/resourceloader/ResourceLoaderNoscriptModule.php
includes/resourceloader/ResourceLoaderSiteModule.php
includes/resourceloader/ResourceLoaderUserCSSPrefsModule.php

diff --git a/INSTALL b/INSTALL
index c4bb8be..e393631 100644 (file)
--- a/INSTALL
+++ b/INSTALL
@@ -18,7 +18,7 @@ work on Windows as well.
 
 If your PHP is configured as a CGI plug-in rather than an Apache module you may
 experience problems, as this configuration is not well tested. safe_mode is also
-not tested and unlikely to work. 
+not tested and unlikely to work.
 
 If you want math support see the instructions in math/README
 
@@ -34,7 +34,7 @@ http://www.mediawiki.org/wiki/Manual:Installation_guide
 
 ******************* WARNING *******************
 
-REMEMBER: ALWAYS BACK UP YOUR DATABASE BEFORE 
+REMEMBER: ALWAYS BACK UP YOUR DATABASE BEFORE
 ATTEMPTING TO INSTALL OR UPGRADE!!!
 
 ******************* WARNING *******************
diff --git a/README b/README
index 805b8ee..c9ce5db 100644 (file)
--- a/README
+++ b/README
@@ -1,4 +1,4 @@
-For system requirements, installation and upgrade details, see the files 
+For system requirements, installation and upgrade details, see the files
 RELEASE-NOTES, INSTALL, and UPGRADE.
 
 == MediaWiki ==
@@ -62,7 +62,7 @@ Sections of code written exclusively by Lee Crocker or Erik Moeller are also
 released into the public domain, which does not impair the obligations of users
 under the GPL for use of the whole code or other sections thereof.
 
-MediaWiki makes use of the Sajax Toolkit by modernmethod, 
+MediaWiki makes use of the Sajax Toolkit by modernmethod,
 http://www.modernmethod.com/sajax/ which has the following license:
 
        'This work is licensed under the Creative Commons Attribution
index 6bce634..ba8fe8b 100644 (file)
@@ -12,7 +12,7 @@
  *   } else {
  *       $wgProfiler['class'] = 'ProfilerStub';
  *   }
- * 
+ *
  * Configuration of the profiler output can be done in LocalSettings.php
  */
 
diff --git a/UPGRADE b/UPGRADE
index cdaf4f9..46f5e65 100644 (file)
--- a/UPGRADE
+++ b/UPGRADE
@@ -53,8 +53,8 @@ deleted file archives, and any custom skins.
 
 ==== From the web ====
 
-If you browse to the web-based installation script (usually at 
-/mw-config/index.php) from your wiki installation you can follow the script and 
+If you browse to the web-based installation script (usually at
+/mw-config/index.php) from your wiki installation you can follow the script and
 upgrade your database in place.
 
 ==== From the command line ====
@@ -141,7 +141,7 @@ the web upgrader.
 
 If you absolutely cannot make the UTF-8 upgrade work, you can try
 doing it by hand: dump your old database, convert the dump file
-using iconv as described here: 
+using iconv as described here:
 http://portal.suse.com/sdb/en/2004/05/jbartsh_utf-8.html
 and then reimport it. You can also convert filenames using convmv,
 but note that the old directory hashes will no longer be valid,
index fdddfc9..cea63e0 100644 (file)
@@ -1411,9 +1411,9 @@ $wgAllDBsAreLocalhost = false;
  * $wgSharedPrefix is the table prefix for the shared database. It defaults to
  * $wgDBprefix.
  *
- * @deprecated In new code, use the $wiki parameter to wfGetLB() to access 
- *   remote databases. Using wfGetLB() allows the shared database to reside on 
- *   separate servers to the wiki's own database, with suitable configuration 
+ * @deprecated In new code, use the $wiki parameter to wfGetLB() to access
+ *   remote databases. Using wfGetLB() allows the shared database to reside on
+ *   separate servers to the wiki's own database, with suitable configuration
  *   of $wgLBFactoryConf.
  */
 $wgSharedDB = null;
@@ -2067,12 +2067,12 @@ $wgMaxSquidPurgeTitles = 400;
 
 /**
  * Whether to use a Host header in purge requests sent to the proxy servers
- * configured in $wgSquidServers. Set this to false to support Squid 
+ * configured in $wgSquidServers. Set this to false to support Squid
  * configured in forward-proxy mode.
  *
  * If this is set to true, a Host header will be sent, and only the path
  * component of the URL will appear on the request line, as if the request
- * were a non-proxy HTTP 1.1 request. Varnish only supports this style of 
+ * were a non-proxy HTTP 1.1 request. Varnish only supports this style of
  * request. Squid supports this style of request only if reverse-proxy mode
  * (http_port ... accel) is enabled.
  *
@@ -2080,7 +2080,7 @@ $wgMaxSquidPurgeTitles = 400;
  * will be sent in the request line, as is the standard for an HTTP proxy
  * request in both HTTP 1.0 and 1.1. This style of request is not supported
  * by Varnish, but is supported by Squid in either configuration (forward or
- * reverse). 
+ * reverse).
  *
  * @since 1.21
  */
index bb8ec5e..05c27fe 100644 (file)
  *
  * @file
  */
+
 /**
- * Base class for general text storage via the "object" flag in old_flags, or 
- * two-part external storage URLs. Used for represent efficient concatenated 
+ * Base class for general text storage via the "object" flag in old_flags, or
+ * two-part external storage URLs. Used for represent efficient concatenated
  * storage, and migration-related pointer objects.
  */
 interface HistoryBlob
@@ -178,7 +178,7 @@ class ConcatenatedGzipHistoryBlob implements HistoryBlob
         * @return bool
         */
        public function isHappy() {
-               return $this->mSize < $this->mMaxSize 
+               return $this->mSize < $this->mMaxSize
                        && count( $this->mItems ) < $this->mMaxCount;
        }
 }
@@ -341,12 +341,12 @@ class DiffHistoryBlob implements HistoryBlob {
        /** Total uncompressed size */
        var $mSize = 0;
 
-       /** 
-        * Array of diffs. If a diff D from A to B is notated D = B - A, and Z is 
+       /**
+        * Array of diffs. If a diff D from A to B is notated D = B - A, and Z is
         * an empty string:
         *
         *              { item[map[i]] - item[map[i-1]]   where i > 0
-        *    diff[i] = { 
+        *    diff[i] = {
         *              { item[map[i]] - Z                where i = 0
         */
        var $mDiffs;
@@ -379,7 +379,7 @@ class DiffHistoryBlob implements HistoryBlob {
         * The maximum number of text items before the object becomes sad
         */
        var $mMaxCount = 100;
-       
+
        /** Constants from xdiff.h */
        const XDL_BDOP_INS = 1;
        const XDL_BDOP_CPY = 2;
@@ -433,7 +433,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 ) ) {
@@ -534,7 +534,7 @@ class DiffHistoryBlob implements HistoryBlob {
                # Pure PHP implementation
 
                $header = unpack( 'Vofp/Vcsize', substr( $diff, 0, 8 ) );
-               
+
                # Check the checksum if hash/mhash is available
                $ofp = $this->xdiffAdler32( $base );
                if ( $ofp !== false && $ofp !== substr( $diff, 0, 4 ) ) {
@@ -545,7 +545,7 @@ class DiffHistoryBlob implements HistoryBlob {
                        wfDebug( __METHOD__. ": incorrect base length\n" );
                        return false;
                }
-               
+
                $p = 8;
                $out = '';
                while ( $p < strlen( $diff ) ) {
@@ -579,7 +579,7 @@ class DiffHistoryBlob implements HistoryBlob {
        }
 
        /**
-        * Compute a binary "Adler-32" checksum as defined by LibXDiff, i.e. with 
+        * Compute a binary "Adler-32" checksum as defined by LibXDiff, i.e. with
         * the bytes backwards and initialised with 0 instead of 1. See bug 34428.
         *
         * Returns false if no hashing library is available
@@ -589,8 +589,8 @@ class DiffHistoryBlob implements HistoryBlob {
                if ( $init === null ) {
                        $init = str_repeat( "\xf0", 205 ) . "\xee" . str_repeat( "\xf0", 67 ) . "\x02";
                }
-               // The real Adler-32 checksum of $init is zero, so it initialises the 
-               // state to zero, as it is at the start of LibXDiff's checksum 
+               // The real Adler-32 checksum of $init is zero, so it initialises the
+               // state to zero, as it is at the start of LibXDiff's checksum
                // algorithm. Appending the subject string then simulates LibXDiff.
                if ( function_exists( 'hash' ) ) {
                        $hash = hash( 'adler32', $init . $s, true );
@@ -664,7 +664,7 @@ class DiffHistoryBlob implements HistoryBlob {
                if ( isset( $info['base'] ) ) {
                        // Old format
                        $this->mDiffMap = range( 0, count( $this->mDiffs ) - 1 );
-                       array_unshift( $this->mDiffs, 
+                       array_unshift( $this->mDiffs,
                                pack( 'VVCV', 0, 0, self::XDL_BDOP_INSB, strlen( $info['base'] ) ) .
                                $info['base'] );
                } else {
@@ -687,7 +687,7 @@ class DiffHistoryBlob implements HistoryBlob {
         * @return bool
         */
        function isHappy() {
-               return $this->mSize < $this->mMaxSize 
+               return $this->mSize < $this->mMaxSize
                        && count( $this->mItems ) < $this->mMaxCount;
        }
 
index a07dd4c..5be67ab 100644 (file)
@@ -480,7 +480,7 @@ class Html {
                                'class', // html4, html5
                                'accesskey', // as of html5, multiple space-separated values allowed
                                // html4-spec doesn't document rel= as space-separated
-                               // but has been used like that and is now documented as such 
+                               // but has been used like that and is now documented as such
                                // in the html5-spec.
                                'rel',
                        );
@@ -493,7 +493,6 @@ class Html {
                                // values. Implode/explode to get those into the main array as well.
                                if ( is_array( $value ) ) {
                                        // If input wasn't an array, we can skip this step
-                                       
                                        $newValue = array();
                                        foreach ( $value as $k => $v ) {
                                                if ( is_string( $v ) ) {
@@ -576,7 +575,6 @@ class Html {
                                        # @todo FIXME: Is this really true?
                                        $map['<'] = '&lt;';
                                }
-                               
                                $ret .= " $key=$quote" . strtr( $value, $map ) . $quote;
                        }
                }
index b19f6c4..c2f6b1e 100644 (file)
@@ -23,7 +23,7 @@
 
 /**
  * Some functions to help implement an external link filter for spam control.
- * 
+ *
  * @todo implement the filter. Currently these are just some functions to help
  * maintenance/cleanupSpam.php remove links to a single specified domain. The
  * next thing is to implement functions for checking a given page against a big
@@ -119,17 +119,17 @@ class LinkFilter {
                // Reverse the labels in the hostname, convert to lower case
                // For emails reverse domainpart only
                if ( $prot == 'mailto:' && strpos($host, '@') ) {
-                       // complete email adress 
+                       // complete email adress
                        $mailparts = explode( '@', $host );
                        $domainpart = strtolower( implode( '.', array_reverse( explode( '.', $mailparts[1] ) ) ) );
                        $host = $domainpart . '@' . $mailparts[0];
                        $like = array( "$prot$host", $db->anyString() );
                } elseif ( $prot == 'mailto:' ) {
                        // domainpart of email adress only. do not add '.'
-                       $host = strtolower( implode( '.', array_reverse( explode( '.', $host ) ) ) );   
-                       $like = array( "$prot$host", $db->anyString() );                        
+                       $host = strtolower( implode( '.', array_reverse( explode( '.', $host ) ) ) );
+                       $like = array( "$prot$host", $db->anyString() );
                } else {
-                       $host = strtolower( implode( '.', array_reverse( explode( '.', $host ) ) ) );   
+                       $host = strtolower( implode( '.', array_reverse( explode( '.', $host ) ) ) );
                        if ( substr( $host, -1, 1 ) !== '.' ) {
                                $host .= '.';
                        }
index bd5b571..28c5985 100644 (file)
@@ -1764,7 +1764,7 @@ class Linker {
         */
        public static function buildRollbackLink( $rev, IContextSource $context = null ) {
                global $wgShowRollbackEditCount, $wgMiserMode;
-               
+
                // To config which pages are effected by miser mode
                $disableRollbackEditCountSpecialPage = array( 'Recentchanges', 'Watchlist' );
 
@@ -2121,7 +2121,7 @@ class Linker {
         */
        static function makeBrokenLink( $title, $text = '', $query = '', $trail = '' ) {
                wfDeprecated( __METHOD__, '1.16' );
-               
+
                $nt = Title::newFromText( $title );
                if ( $nt instanceof Title ) {
                        return self::makeBrokenLinkObj( $nt, $text, $query, $trail );
@@ -2150,7 +2150,7 @@ class Linker {
         */
        static function makeLinkObj( $nt, $text = '', $query = '', $trail = '', $prefix = '' ) {
                # wfDeprecated( __METHOD__, '1.16' ); // See r105985 and it's revert. Somewhere still used.
-               
+
                wfProfileIn( __METHOD__ );
                $query = wfCgiToArray( $query );
                list( $inside, $trail ) = self::splitTrail( $trail );
@@ -2184,7 +2184,7 @@ class Linker {
                $title, $text = '', $query = '', $trail = '', $prefix = '' , $aprops = '', $style = ''
        ) {
                # wfDeprecated( __METHOD__, '1.16' ); // See r105985 and it's revert. Somewhere still used.
-               
+
                wfProfileIn( __METHOD__ );
 
                if ( $text == '' ) {
@@ -2220,7 +2220,7 @@ class Linker {
         */
        static function makeBrokenLinkObj( $title, $text = '', $query = '', $trail = '', $prefix = '' ) {
                wfDeprecated( __METHOD__, '1.16' );
-               
+
                wfProfileIn( __METHOD__ );
 
                list( $inside, $trail ) = self::splitTrail( $trail );
@@ -2252,7 +2252,7 @@ class Linker {
         */
        static function makeColouredLinkObj( $nt, $colour, $text = '', $query = '', $trail = '', $prefix = '' ) {
                wfDeprecated( __METHOD__, '1.16' );
-               
+
                if ( $colour != '' ) {
                        $style = self::getInternalLinkAttributesObj( $nt, $text, $colour );
                } else {
index 1873e7b..88383d8 100644 (file)
  * This is used as a fallback to mime.types files.
  * An extensive list of well known mime types is provided by
  * the file mime.types in the includes directory.
- * 
+ *
  * This list concatenated with mime.types is used to create a mime <-> ext
  * map. Each line contains a mime type followed by a space separated list of
- * extensions. If multiple extensions for a single mime type exist or if 
+ * extensions. If multiple extensions for a single mime type exist or if
  * multiple mime types exist for a single extension then in most cases
  * MediaWiki assumes that the first extension following the mime type is the
  * canonical extension, and the first time a mime type appears for a certain
  * extension is considered the canonical mime type.
- * 
+ *
  * (Note that appending $wgMimeTypeFile to the end of MM_WELL_KNOWN_MIME_TYPES
- * sucks because you can't redefine canonical types. This could be fixed by 
+ * sucks because you can't redefine canonical types. This could be fixed by
  * appending MM_WELL_KNOWN_MIME_TYPES behind $wgMimeTypeFile, but who knows
  * what will break? In practice this probably isn't a problem anyway -- Bryan)
  */
@@ -70,7 +70,7 @@ image/x-bmp bmp
 image/gif gif
 image/jpeg jpeg jpg jpe
 image/png png
-image/svg+xml svg 
+image/svg+xml svg
 image/svg svg
 image/tiff tiff tif
 image/vnd.djvu djvu
@@ -352,11 +352,11 @@ class MimeMagic {
                return self::$instance;
        }
 
-       /** 
-        * Returns a list of file extensions for a given mime type as a space 
+       /**
+        * Returns a list of file extensions for a given mime type as a space
         * separated string or null if the mime type was unrecognized. Resolves
         * mime type aliases.
-        * 
+        *
         * @param $mime string
         * @return string|null
         */
@@ -379,10 +379,10 @@ class MimeMagic {
                return null;
        }
 
-       /** 
-        * Returns a list of mime types for a given file extension as a space 
+       /**
+        * Returns a list of mime types for a given file extension as a space
         * separated string or null if the extension was unrecognized.
-        * 
+        *
         * @param $ext string
         * @return string|null
         */
@@ -393,10 +393,10 @@ class MimeMagic {
                return $r;
        }
 
-       /** 
+       /**
         * Returns a single mime type for a given file extension or null if unknown.
         * This is always the first type from the list returned by getTypesForExtension($ext).
-        * 
+        *
         * @param $ext string
         * @return string|null
         */
@@ -414,11 +414,11 @@ class MimeMagic {
        }
 
 
-       /** 
-        * Tests if the extension matches the given mime type. Returns true if a 
-        * match was found, null if the mime type is unknown, and false if the 
+       /**
+        * Tests if the extension matches the given mime type. Returns true if a
+        * match was found, null if the mime type is unknown, and false if the
         * mime type is known but no matches where found.
-        * 
+        *
         * @param $extension string
         * @param $mime string
         * @return bool|null
@@ -436,12 +436,12 @@ class MimeMagic {
                return  in_array( $extension, $ext );
        }
 
-       /** 
-        * Returns true if the mime type is known to represent an image format 
+       /**
+        * Returns true if the mime type is known to represent an image format
         * supported by the PHP GD library.
         *
         * @param $mime string
-        * 
+        *
         * @return bool
         */
        public function isPHPImageType( $mime ) {
@@ -489,19 +489,19 @@ class MimeMagic {
                return in_array( strtolower( $extension ), $types );
        }
 
-       /** 
+       /**
         * Improves a mime type using the file extension. Some file formats are very generic,
-        * so their mime type is not very meaningful. A more useful mime type can be derived 
-        * by looking at the file extension. Typically, this method would be called on the 
+        * so their mime type is not very meaningful. A more useful mime type can be derived
+        * by looking at the file extension. Typically, this method would be called on the
         * result of guessMimeType().
-        * 
+        *
         * Currently, this method does the following:
         *
         * If $mime is "unknown/unknown" and isRecognizableExtension( $ext ) returns false,
-        * return the result of guessTypesForExtension($ext). 
+        * return the result of guessTypesForExtension($ext).
         *
         * If $mime is "application/x-opc+zip" and isMatchingExtension( $ext, $mime )
-        * gives true, return the result of guessTypesForExtension($ext). 
+        * gives true, return the result of guessTypesForExtension($ext).
         *
         * @param $mime String: the mime type, typically guessed from a file's content.
         * @param $ext String: the file extension, as taken from the file name
@@ -511,10 +511,10 @@ class MimeMagic {
        public function improveTypeFromExtension( $mime, $ext ) {
                if ( $mime === 'unknown/unknown' ) {
                        if ( $this->isRecognizableExtension( $ext ) ) {
-                               wfDebug( __METHOD__. ': refusing to guess mime type for .' . 
+                               wfDebug( __METHOD__. ': refusing to guess mime type for .' .
                                        "$ext file, we should have recognized it\n" );
                        } else {
-                               // Not something we can detect, so simply 
+                               // Not something we can detect, so simply
                                // trust the file extension
                                $mime = $this->guessTypesForExtension( $ext );
                        }
@@ -525,7 +525,7 @@ class MimeMagic {
                                // find the proper mime type for that file extension
                                $mime = $this->guessTypesForExtension( $ext );
                        } else {
-                               wfDebug( __METHOD__. ": refusing to guess better type for $mime file, " . 
+                               wfDebug( __METHOD__. ": refusing to guess better type for $mime file, " .
                                        ".$ext is not a known OPC extension.\n" );
                                $mime = 'application/zip';
                        }
@@ -539,16 +539,16 @@ class MimeMagic {
                return $mime;
        }
 
-       /** 
-        * Mime type detection. This uses detectMimeType to detect the mime type 
-        * of the file, but applies additional checks to determine some well known 
-        * file formats that may be missed or misinterpreter by the default mime 
-        * detection (namely XML based formats like XHTML or SVG, as well as ZIP 
+       /**
+        * Mime type detection. This uses detectMimeType to detect the mime type
+        * of the file, but applies additional checks to determine some well known
+        * file formats that may be missed or misinterpreter by the default mime
+        * detection (namely XML based formats like XHTML or SVG, as well as ZIP
         * based formats like OPC/ODF files).
         *
         * @param $file String: the file to check
         * @param $ext Mixed: the file extension, or true (default) to extract it from the filename.
-        *             Set it to false to ignore the extension. DEPRECATED! Set to false, use 
+        *             Set it to false to ignore the extension. DEPRECATED! Set to false, use
         *             improveTypeFromExtension($mime, $ext) later to improve mime type.
         *
         * @return string the mime type of $file
@@ -587,7 +587,7 @@ class MimeMagic {
                // @todo FIXME: Shouldn't this be rb?
                $f = fopen( $file, 'rt' );
                wfRestoreWarnings();
-               
+
                if( !$f ) {
                        return 'unknown/unknown';
                }
@@ -750,7 +750,7 @@ class MimeMagic {
 
                return false;
        }
-       
+
        /**
         * Detect application-specific file type of a given ZIP file from its
         * header data.  Currently works for OpenDocument and OpenXML types...
@@ -759,7 +759,7 @@ class MimeMagic {
         * @param $header String: some reasonably-sized chunk of file header
         * @param $tail   String: the tail of the file
         * @param $ext Mixed: the file extension, or true to extract it from the filename.
-        *             Set it to false (default) to ignore the extension. DEPRECATED! Set to false, 
+        *             Set it to false (default) to ignore the extension. DEPRECATED! Set to false,
         *             use improveTypeFromExtension($mime, $ext) later to improve mime type.
         *
         * @return string
@@ -800,8 +800,8 @@ class MimeMagic {
                        wfDebug( __METHOD__.": detected $mime from ZIP archive\n" );
                } elseif ( preg_match( $openxmlRegex, substr( $header, 30 ) ) ) {
                        $mime = "application/x-opc+zip";
-                       # TODO: remove the block below, as soon as improveTypeFromExtension is used everywhere 
-                       if ( $ext !== true && $ext !== false ) { 
+                       # TODO: remove the block below, as soon as improveTypeFromExtension is used everywhere
+                       if ( $ext !== true && $ext !== false ) {
                                /** This is the mode used by getPropsFromPath
                                * These mime's are stored in the database, where we don't really want
                                * x-opc+zip, because we use it only for internal purposes
@@ -815,12 +815,12 @@ class MimeMagic {
                                }
                        }
                        wfDebug( __METHOD__.": detected an Open Packaging Conventions archive: $mime\n" );
-               } elseif ( substr( $header, 0, 8 ) == "\xd0\xcf\x11\xe0\xa1\xb1\x1a\xe1" && 
+               } elseif ( substr( $header, 0, 8 ) == "\xd0\xcf\x11\xe0\xa1\xb1\x1a\xe1" &&
                                ($headerpos = strpos( $tail, "PK\x03\x04" ) ) !== false &&
                                preg_match( $openxmlRegex, substr( $tail, $headerpos + 30 ) ) ) {
                        if ( substr( $header, 512, 4) == "\xEC\xA5\xC1\x00" ) {
                                $mime = "application/msword";
-                       } 
+                       }
                        switch( substr( $header, 512, 6) ) {
                                case "\xEC\xA5\xC1\x00\x0E\x00":
                                case "\xEC\xA5\xC1\x00\x1C\x00":
@@ -850,20 +850,20 @@ class MimeMagic {
                return $mime;
        }
 
-       /** 
-        * Internal mime type detection. Detection is done using an external 
-        * program, if $wgMimeDetectorCommand is set. Otherwise, the fileinfo 
-        * extension and mime_content_type are tried (in this order), if they 
-        * are available. If the dections fails and $ext is not false, the mime 
+       /**
+        * Internal mime type detection. Detection is done using an external
+        * program, if $wgMimeDetectorCommand is set. Otherwise, the fileinfo
+        * extension and mime_content_type are tried (in this order), if they
+        * are available. If the dections fails and $ext is not false, the mime
         * type is guessed from the file extension, using guessTypesForExtension.
-        * 
-        * If the mime type is still unknown, getimagesize is used to detect the 
-        * mime type if the file is an image. If no mime type can be determined, 
+        *
+        * If the mime type is still unknown, getimagesize is used to detect the
+        * mime type if the file is an image. If no mime type can be determined,
         * this function returns 'unknown/unknown'.
         *
         * @param $file String: the file to check
         * @param $ext Mixed: the file extension, or true (default) to extract it from the filename.
-        *             Set it to false to ignore the extension. DEPRECATED! Set to false, use 
+        *             Set it to false to ignore the extension. DEPRECATED! Set to false, use
         *             improveTypeFromExtension($mime, $ext) later to improve mime type.
         *
         * @return string the mime type of $file
@@ -1037,7 +1037,7 @@ class MimeMagic {
                return $type;
        }
 
-       /** 
+       /**
         * Returns a media code matching the given mime type or file extension.
         * File extensions are represented by a string starting with a dot (.) to
         * distinguish them from mime types.
@@ -1047,7 +1047,7 @@ class MimeMagic {
         * @return int|string
         */
        function findMediaType( $extMime ) {
-               if ( strpos( $extMime, '.' ) === 0 ) { 
+               if ( strpos( $extMime, '.' ) === 0 ) {
                        // If it's an extension, look up the mime types
                        $m = $this->getTypesForExtension( substr( $extMime, 1 ) );
                        if ( !$m ) {
@@ -1076,7 +1076,7 @@ class MimeMagic {
        }
 
        /**
-        * Get the MIME types that various versions of Internet Explorer would 
+        * Get the MIME types that various versions of Internet Explorer would
         * detect from a chunk of the content.
         *
         * @param $fileName String: the file name (unused at present)
index 7b98568..0e4decf 100644 (file)
@@ -38,7 +38,7 @@ $cookieName = $cookiePrefix . 'Selenium';
 // this is a fallback SQL file
 $testSqlFile = false;
 $testImageZip = false;
-       
+
 // if we find a request parameter containing the test name, set a cookie with the test name
 if ( isset( $_GET['setupTestSuite'] ) ) {
        $setupTestSuiteName = $_GET['setupTestSuite'];
@@ -62,7 +62,7 @@ if ( isset( $_GET['setupTestSuite'] ) ) {
                        true
                );
        }
-       
+
        $testIncludes = array(); // array containing all the includes needed for this test
        $testGlobalConfigs = array(); // an array containg all the global configs needed for this test
        $testResourceFiles = array(); // an array containing all the resource files needed for this test
@@ -72,11 +72,11 @@ if ( isset( $_GET['setupTestSuite'] ) ) {
        if ( isset( $testResourceFiles['images'] ) ) {
                $testImageZip = $testResourceFiles['images'];
        }
-       
+
        if ( isset( $testResourceFiles['db'] ) ) {
                $testSqlFile = $testResourceFiles['db'];
                $testResourceName = getTestResourceNameFromTestSuiteName( $setupTestSuiteName );
-       
+
                switchToTestResources( $testResourceName, false ); // false means do not switch database yet
                setupTestResources( $testResourceName, $testSqlFile, $testImageZip );
        }
@@ -86,7 +86,7 @@ if ( isset( $_GET['setupTestSuite'] ) ) {
 if ( isset( $_GET['clearTestSuite'] ) ) {
        $testSuiteName = getTestSuiteNameFromCookie( $cookieName );
 
-       $expire = time() - 600; 
+       $expire = time() - 600;
        setcookie(
                $cookieName,
                '',
@@ -96,22 +96,22 @@ if ( isset( $_GET['clearTestSuite'] ) ) {
                $wgCookieSecure,
                true
        );
-       
+
        $testResourceName = getTestResourceNameFromTestSuiteName( $testSuiteName );
        teardownTestResources( $testResourceName );
 }
 
 // if a cookie is found, run the appropriate callback to get the config params.
-if ( isset( $_COOKIE[$cookieName] ) ) {                
+if ( isset( $_COOKIE[$cookieName] ) ) {
        $testSuiteName = getTestSuiteNameFromCookie( $cookieName );
        if ( !isset( $wgSeleniumTestConfigs[$testSuiteName] ) ) {
                return;
        }
-       
+
        $testIncludes = array(); // array containing all the includes needed for this test
        $testGlobalConfigs = array(); // an array containg all the global configs needed for this test
        $testResourceFiles = array(); // an array containing all the resource files needed for this test
-       $callback = $wgSeleniumTestConfigs[$testSuiteName]; 
+       $callback = $wgSeleniumTestConfigs[$testSuiteName];
        call_user_func_array( $callback, array( &$testIncludes, &$testGlobalConfigs, &$testResourceFiles));
 
        if ( isset( $testResourceFiles['db'] ) ) {
@@ -123,9 +123,8 @@ if ( isset( $_COOKIE[$cookieName] ) ) {
                require_once( $file );
        }
        foreach ( $testGlobalConfigs as $key => $value ) {
-               if ( is_array( $value ) ) {             
+               if ( is_array( $value ) ) {
                        $GLOBALS[$key] = array_merge( $GLOBALS[$key], $value );
-                       
                } else {
                        $GLOBALS[$key] = $value;
                }
@@ -166,7 +165,7 @@ function setupTestResources( $testResourceName, $testSqlFile, $testImageZip ) {
        if ( $testResourceName == '' ) {
                die( 'Cannot identify a test the resources should be installed for.' );
        }
-       
+
        // create tables
        $dbw = wfGetDB( DB_MASTER );
        $dbw->query( 'DROP DATABASE IF EXISTS ' . $testResourceName );
index 147b0df..763c95c 100644 (file)
@@ -226,7 +226,7 @@ class Status {
        }
 
        /**
-        * Get the error message as HTML. This is done by parsing the wikitext error 
+        * Get the error message as HTML. This is done by parsing the wikitext error
         * message.
         */
        public function getHTML( $shortContext = false, $longContext = false ) {
index ee3e01f..c3e37a0 100644 (file)
@@ -2922,7 +2922,7 @@ class Title {
 
                $linkCache = LinkCache::singleton();
                $cached = $linkCache->getGoodLinkFieldObj( $this, 'redirect' );
-               if ( $cached === null ) { 
+               if ( $cached === null ) {
                        // TODO: check the assumption that the cache actually knows about this title
                        // and handle this, such as get the title from the database.
                        // See https://bugzilla.wikimedia.org/show_bug.cgi?id=37209
index 0a02dd2..3b1e034 100644 (file)
@@ -3013,8 +3013,8 @@ class User {
        }
 
        /**
-        * Add this existing user object to the database. If the user already 
-        * exists, a fatal status object is returned, and the user object is 
+        * Add this existing user object to the database. If the user already
+        * exists, a fatal status object is returned, and the user object is
         * initialised with the data from the database.
         *
         * Previously, this function generated a DB error due to a key conflict
@@ -3027,12 +3027,12 @@ class User {
         *   }
         *   // do something with $user...
         *
-        * However, this was vulnerable to a race condition (bug 16020). By 
+        * However, this was vulnerable to a race condition (bug 16020). By
         * initialising the user object if the user exists, we aim to support this
         * calling sequence as far as possible.
         *
         * Note that if the user exists, this function will acquire a write lock,
-        * so it is still advisable to make the call conditional on isLoggedIn(), 
+        * so it is still advisable to make the call conditional on isLoggedIn(),
         * and to commit the transaction after calling.
         *
         * @return Status
@@ -3062,7 +3062,7 @@ class User {
                        array( 'IGNORE' )
                );
                if ( !$dbw->affectedRows() ) {
-                       $this->mId = $dbw->selectField( 'user', 'user_id', 
+                       $this->mId = $dbw->selectField( 'user', 'user_id',
                                array( 'user_name' => $this->mName ), __METHOD__ );
                        $loaded = false;
                        if ( $this->mId ) {
index 0a5efae..c7f6a20 100644 (file)
  *       'DBprefix' => '',
  *   );
  *
- * All fields must be present.  These mean the same things as $wgDBtype, 
- * $wgDBserver, etc.  This implementation is quite crude; it could easily 
- * support multiple database servers, for instance, and memcached, and it 
- * probably has bugs.  Kind of hard to reuse code when things might rely on who 
+ * All fields must be present.  These mean the same things as $wgDBtype,
+ * $wgDBserver, etc.  This implementation is quite crude; it could easily
+ * support multiple database servers, for instance, and memcached, and it
+ * probably has bugs.  Kind of hard to reuse code when things might rely on who
  * knows what configuration globals.
  *
- * If either wiki uses the UserComparePasswords hook, password authentication 
- * might fail unexpectedly unless they both do the exact same validation.  
- * There may be other corner cases like this where this will fail, but it 
+ * If either wiki uses the UserComparePasswords hook, password authentication
+ * might fail unexpectedly unless they both do the exact same validation.
+ * There may be other corner cases like this where this will fail, but it
  * should be unlikely.
  *
  * @ingroup ExternalUser
@@ -62,8 +62,8 @@ class ExternalUser_MediaWiki extends ExternalUser {
         * @return bool
         */
        protected function initFromName( $name ) {
-               # We might not need the 'usable' bit, but let's be safe.  Theoretically 
-               # this might return wrong results for old versions, but it's probably 
+               # We might not need the 'usable' bit, but let's be safe.  Theoretically
+               # this might return wrong results for old versions, but it's probably
                # good enough.
                $name = User::getCanonicalName( $name, 'usable' );
 
@@ -130,14 +130,14 @@ class ExternalUser_MediaWiki extends ExternalUser {
        }
 
        public function authenticate( $password ) {
-               # This might be wrong if anyone actually uses the UserComparePasswords hook 
+               # This might be wrong if anyone actually uses the UserComparePasswords hook
                # (on either end), so don't use this if you those are incompatible.
                return User::comparePasswords( $this->mRow->user_password, $password,
-                       $this->mRow->user_id ); 
+                       $this->mRow->user_id );
        }
 
        public function getPref( $pref ) {
-               # @todo FIXME: Return other prefs too.  Lots of global-riddled code that does 
+               # @todo FIXME: Return other prefs too.  Lots of global-riddled code that does
                # this normally.
                if ( $pref === 'emailaddress'
                && $this->row->user_email_authenticated !== null ) {
index e07c99d..fda356e 100644 (file)
@@ -86,8 +86,8 @@ class FSFile {
 
        /**
         * Guess the MIME type from the file contents alone
-        * 
-        * @return string 
+        *
+        * @return string
         */
        public function getMimeType() {
                return MimeMagic::singleton()->guessMimeType( $this->path, false );
@@ -211,7 +211,7 @@ class FSFile {
 
        /**
         * Get the final file extension from a file system path
-        * 
+        *
         * @param $path string
         * @return string
         */
index 9c8d85d..635cb95 100644 (file)
@@ -24,9 +24,9 @@
 /**
  * A repository for files accessible via the local filesystem.
  * Does not support database access or registration.
- * 
+ *
  * This is a mostly a legacy class. New uses should not be added.
- * 
+ *
  * @ingroup FileRepo
  * @deprecated since 1.19
  */
index 4b206c3..1865985 100644 (file)
@@ -86,7 +86,7 @@ class ForeignDBRepo extends LocalRepo {
 
        /**
         * Get a key on the primary cache for this repository.
-        * Returns false if the repository's cache is not accessible at this site. 
+        * Returns false if the repository's cache is not accessible at this site.
         * The parameters are the parts of the key, as for wfMemcKey().
         * @return bool|mixed
         */
index bd76fce..7951fb1 100644 (file)
@@ -61,7 +61,7 @@ class ForeignDBViaLBRepo extends LocalRepo {
 
        /**
         * Get a key on the primary cache for this repository.
-        * Returns false if the repository's cache is not accessible at this site. 
+        * Returns false if the repository's cache is not accessible at this site.
         * The parameters are the parts of the key, as for wfMemcKey().
         * @return bool|string
         */
index 0954422..118e981 100644 (file)
@@ -238,7 +238,7 @@ class LocalRepo extends FileRepo {
                        __METHOD__,
                        array( 'ORDER BY' => 'img_name' )
                );
-               
+
                $result = array();
                foreach ( $res as $row ) {
                        $result[] = $this->newFileFromRow( $row );
@@ -299,7 +299,7 @@ class LocalRepo extends FileRepo {
 
        /**
         * Get a key on the primary cache for this repository.
-        * Returns false if the repository's cache is not accessible at this site. 
+        * Returns false if the repository's cache is not accessible at this site.
         * The parameters are the parts of the key, as for wfMemcKey().
         *
         * @return string
index f98266e..92e7fcf 100644 (file)
@@ -39,7 +39,7 @@ class ResourceLoader {
 
        /** Associative array mapping module name to info associative array */
        protected $moduleInfos = array();
+
        /** Associative array mapping framework ids to a list of names of test suite modules */
        /** like array( 'qunit' => array( 'mediawiki.tests.qunit.suites', 'ext.foo.tests', .. ), .. ) */
        protected $testModuleNames = array();
@@ -346,7 +346,7 @@ class ResourceLoader {
        public function getModuleNames() {
                return array_keys( $this->moduleInfos );
        }
+
        /**
         * Get a list of test module names for one (or all) frameworks.
         * If the given framework id is unknkown, or if the in-object variable is not an array,
index c570f0a..8fec0d6 100644 (file)
@@ -376,7 +376,7 @@ abstract class ResourceLoaderModule {
         * NOTE: The mtime of the module's messages is NOT automatically included.
         * If you want this to happen, you'll need to call getMsgBlobMtime()
         * yourself and take its result into consideration.
-        * 
+        *
         * @param $context ResourceLoaderContext: Context object
         * @return Integer: UNIX timestamp
         */
index 8e81c8d..bd026f3 100644 (file)
@@ -45,7 +45,7 @@ class ResourceLoaderNoscriptModule extends ResourceLoaderWikiModule {
 
        /**
         * Gets group name
-        * 
+        *
         * @return String: Name of group
         */
        public function getGroup() {
index 03fe1fe..1cc5c1a 100644 (file)
@@ -47,8 +47,8 @@ class ResourceLoaderSiteModule extends ResourceLoaderWikiModule {
                        'MediaWiki:Print.css' => array( 'type' => 'style', 'media' => 'print' ),
                );
                if ( $wgHandheldStyle ) {
-                       $pages['MediaWiki:Handheld.css'] = array( 
-                               'type' => 'style', 
+                       $pages['MediaWiki:Handheld.css'] = array(
+                               'type' => 'style',
                                'media' => 'handheld' );
                }
                return $pages;
@@ -58,7 +58,7 @@ class ResourceLoaderSiteModule extends ResourceLoaderWikiModule {
 
        /**
         * Gets group name
-        * 
+        *
         * @return String: Name of group
         */
        public function getGroup() {
index 139048c..d90e8c4 100644 (file)
@@ -48,7 +48,7 @@ class ResourceLoaderUserCSSPrefsModule extends ResourceLoaderModule {
                global $wgUser;
                return $this->modifiedTime[$hash] = wfTimestamp( TS_UNIX, $wgUser->getTouched() );
        }
-       
+
        /**
         * @param $context ResourceLoaderContext
         * @return array