Whitespace and typo fix
authorlupo <lupo.bugzilla@gmail.com>
Thu, 26 Apr 2012 20:53:11 +0000 (22:53 +0200)
committerlupo <lupo.bugzilla@gmail.com>
Thu, 26 Apr 2012 20:53:11 +0000 (22:53 +0200)
Change-Id: I060482b31959a78ecee4ad8851aebcac1f77e905

includes/OutputPage.php
resources/mediawiki/mediawiki.js

index 3ef7ceb..bdf2223 100644 (file)
@@ -2803,7 +2803,7 @@ $templates
                                $defaultModules['user'] = 'ready';
                        }
                } else {
-                       // User JS diabled
+                       // User JS disabled
                        $defaultModules['user'] = 'missing';
                }
 
index eb281f8..4f345ab 100644 (file)
@@ -138,7 +138,7 @@ var mw = ( function ( $, undefined ) {
                /**
                 * Simple message parser, does $N replacement and nothing else.
                 * This may be overridden to provide a more complex message parser.
-                * 
+                *
                 * This function will not be called for nonexistent messages.
                 */
                parser: function() {
@@ -148,7 +148,7 @@ var mw = ( function ( $, undefined ) {
                                return parameters[index] !== undefined ? parameters[index] : '$' + match;
                        } );
                },
-               
+
                /**
                 * Appends (does not replace) parameters for replacement to the .parameters property.
                 *
@@ -192,7 +192,7 @@ var mw = ( function ( $, undefined ) {
                                text = this.parser();
                                text = mw.html.escape( text );
                        }
-                       
+
                        if ( this.format === 'parse' ) {
                                text = this.parser();
                        }
@@ -248,7 +248,7 @@ var mw = ( function ( $, undefined ) {
                 * emulates console.log in console-less environments.
                 */
                log: function() { },
-       
+
                /**
                 * @var constructor Make the Map constructor publicly available.
                 */
@@ -258,7 +258,7 @@ var mw = ( function ( $, undefined ) {
                 * @var constructor Make the Message constructor publicly available.
                 */
                Message: Message,
-       
+
                /**
                 * List of configuration values
                 *
@@ -267,25 +267,25 @@ var mw = ( function ( $, undefined ) {
                 * in the global window object.
                 */
                config: null,
-       
+
                /**
                 * @var object
                 *
                 * Empty object that plugins can be installed in.
                 */
                libs: {},
-       
+
                /* Extension points */
-       
+
                legacy: {},
-       
+
                /**
                 * Localization system
                 */
                messages: new Map(),
-       
+
                /* Public Methods */
-       
+
                /**
                 * Gets a message object, similar to wfMessage()
                 *
@@ -305,7 +305,7 @@ var mw = ( function ( $, undefined ) {
                        }
                        return new Message( mw.messages, key, parameters );
                },
-       
+
                /**
                 * Gets a message string, similar to wfMsg()
                 *
@@ -317,14 +317,14 @@ var mw = ( function ( $, undefined ) {
                msg: function ( /* key, parameter_1, parameter_2, .. */ ) {
                        return mw.message.apply( mw.message, arguments ).toString();
                },
-       
+
                /**
                 * Client-side module loader which integrates with the MediaWiki ResourceLoader
                 */
                loader: ( function () {
-       
+
                        /* Private Members */
-       
+
                        /**
                         * Mapping of registered modules
                         *
@@ -372,15 +372,15 @@ var mw = ( function ( $, undefined ) {
                                ready = false,
                                // Selector cache for the marker element. Use getMarker() to get/use the marker!
                                $marker = null;
-       
+
                        /* Cache document ready status */
-       
+
                        $(document).ready( function () {
                                ready = true;
                        } );
-       
+
                        /* Private methods */
-       
+
                        function getMarker() {
                                // Cached ?
                                if ( $marker ) {
@@ -464,7 +464,7 @@ var mw = ( function ( $, undefined ) {
                                }
                                return true;
                        }
-       
+
                        /**
                         * Generates an ISO8601 "basic" string from a UNIX timestamp
                         */
@@ -479,13 +479,13 @@ var mw = ( function ( $, undefined ) {
                                        pad( d.getUTCHours(), d.getUTCMinutes(), d.getUTCSeconds() ), 'Z'
                                ].join( '' );
                        }
-       
+
                        /**
                         * Recursively resolves dependencies and detects circular references
                         */
                        function recurse( module, resolved, unresolved ) {
                                var n, deps, len;
-       
+
                                if ( registry[module] === undefined ) {
                                        throw new Error( 'Unknown dependency: ' + module );
                                }
@@ -518,7 +518,7 @@ var mw = ( function ( $, undefined ) {
                                }
                                resolved[resolved.length] = module;
                        }
-       
+
                        /**
                         * Gets a list of module names that a module depends on in their proper dependency order
                         *
@@ -528,7 +528,7 @@ var mw = ( function ( $, undefined ) {
                         */
                        function resolve( module ) {
                                var modules, m, deps, n, resolved;
-       
+
                                // Allow calling with an array of module names
                                if ( $.isArray( module ) ) {
                                        modules = [];
@@ -549,7 +549,7 @@ var mw = ( function ( $, undefined ) {
 
                                throw new Error( 'Invalid module argument: ' + module );
                        }
-       
+
                        /**
                         * Narrows a list of module names down to those matching a specific
                         * state (see comment on top of this scope for a list of valid states).
@@ -563,7 +563,7 @@ var mw = ( function ( $, undefined ) {
                         */
                        function filter( states, modules ) {
                                var list, module, s, m;
-       
+
                                // Allow states to be given as a string
                                if ( typeof states === 'string' ) {
                                        states = [states];
@@ -596,7 +596,7 @@ var mw = ( function ( $, undefined ) {
                                }
                                return list;
                        }
-       
+
                        /**
                         * Automatically executes jobs and modules which are pending with satistifed dependencies.
                         *
@@ -604,7 +604,7 @@ var mw = ( function ( $, undefined ) {
                         */
                        function handlePending( module ) {
                                var j, r;
-       
+
                                try {
                                        // Run jobs whose dependencies have just been met
                                        for ( j = 0; j < jobs.length; j += 1 ) {
@@ -645,7 +645,7 @@ var mw = ( function ( $, undefined ) {
                                        throw e;
                                }
                        }
-       
+
                        /**
                         * Adds a script tag to the DOM, either using document.write or low-level DOM manipulation,
                         * depending on whether document-ready has occured yet and whether we are in async mode.
@@ -665,7 +665,7 @@ var mw = ( function ( $, undefined ) {
                                        if ( $.isFunction( callback ) ) {
                                                // Attach handlers for all browsers (based on jQuery.ajax)
                                                script.onload = script.onreadystatechange = function() {
-       
+
                                                        if (
                                                                !done
                                                                && (
@@ -673,11 +673,11 @@ var mw = ( function ( $, undefined ) {
                                                                        || /loaded|complete/.test( script.readyState )
                                                                )
                                                        ) {
-       
+
                                                                done = true;
-       
+
                                                                callback();
-       
+
                                                                // Handle memory leak in IE. This seems to fail in
                                                                // IE7 sometimes (Permission Denied error when
                                                                // accessing script.parentNode) so wrap it in
@@ -687,14 +687,14 @@ var mw = ( function ( $, undefined ) {
                                                                        if ( script.parentNode ) {
                                                                                script.parentNode.removeChild( script );
                                                                        }
-               
+
                                                                        // Dereference the script
                                                                        script = undefined;
                                                                } catch ( e ) { }
                                                        }
                                                };
                                        }
-                                       
+
                                        if ( window.opera ) {
                                                // Appending to the <head> blocks rendering completely in Opera,
                                                // so append to the <body> after document ready. This means the
@@ -719,7 +719,7 @@ var mw = ( function ( $, undefined ) {
                                        }
                                }
                        }
-       
+
                        /**
                         * Executes a loaded module, making it ready to use
                         *
@@ -727,7 +727,7 @@ var mw = ( function ( $, undefined ) {
                         */
                        function execute( module, callback ) {
                                var style, media, i, script, markModuleReady, nestedAddScript;
-       
+
                                if ( registry[module] === undefined ) {
                                        throw new Error( 'Module has not been registered yet: ' + module );
                                } else if ( registry[module].state === 'registered' ) {
@@ -737,7 +737,7 @@ var mw = ( function ( $, undefined ) {
                                } else if ( registry[module].state === 'ready' ) {
                                        throw new Error( 'Module has already been loaded: ' + module );
                                }
-       
+
                                // Add styles
                                if ( $.isPlainObject( registry[module].style ) ) {
                                        // 'media' type ignored, see documentation of mw.loader.implement
@@ -778,12 +778,12 @@ var mw = ( function ( $, undefined ) {
                                                        callback();
                                                        return;
                                                }
-       
+
                                                addScript( arr[i], function() {
                                                        nestedAddScript( arr, callback, async, i + 1 );
                                                }, async );
                                        };
-       
+
                                        if ( $.isArray( script ) ) {
                                                registry[module].state = 'loading';
                                                nestedAddScript( script, markModuleReady, registry[module].async, 0 );
@@ -801,7 +801,7 @@ var mw = ( function ( $, undefined ) {
                                        registry[module].state = 'error';
                                }
                        }
-       
+
                        /**
                         * Adds a dependencies to the queue with optional callbacks to be run
                         * when the dependencies are ready or fail
@@ -814,7 +814,7 @@ var mw = ( function ( $, undefined ) {
                         */
                        function request( dependencies, ready, error, async ) {
                                var regItemDeps, regItemDepLen, n;
-       
+
                                // Allow calling by single module name
                                if ( typeof dependencies === 'string' ) {
                                        dependencies = [dependencies];
@@ -856,7 +856,7 @@ var mw = ( function ( $, undefined ) {
                                // Work the queue
                                mw.loader.work();
                        }
-       
+
                        function sortQuery(o) {
                                var sorted = {}, key, a = [];
                                for ( key in o ) {
@@ -870,7 +870,7 @@ var mw = ( function ( $, undefined ) {
                                }
                                return sorted;
                        }
-       
+
                        /**
                         * Converts a module map of the form { foo: [ 'bar', 'baz' ], bar: [ 'baz, 'quux' ] }
                         * to a query string of the form foo.bar,baz|bar.baz,quux
@@ -883,7 +883,7 @@ var mw = ( function ( $, undefined ) {
                                }
                                return arr.join( '|' );
                        }
-       
+
                        /**
                         * Asynchronously append a script tag to the end of the body
                         * that invokes load.php
@@ -902,7 +902,7 @@ var mw = ( function ( $, undefined ) {
                                // Append &* to avoid triggering the IE6 extension check
                                addScript( sourceLoadScript + '?' + $.param( request ) + '&*', null, async );
                        }
-       
+
                        /* Public Methods */
                        return {
                                addStyleTag: addStyleTag,
@@ -915,7 +915,7 @@ var mw = ( function ( $, undefined ) {
                                                source, group, g, i, modules, maxVersion, sourceLoadScript,
                                                currReqBase, currReqBaseLength, moduleMap, l,
                                                lastDotIndex, prefix, suffix, bytesAdded, async;
-               
+
                                        // Build a list of request parameters common to all requests.
                                        reqBase = {
                                                skin: mw.config.get( 'skin' ),
@@ -925,7 +925,7 @@ var mw = ( function ( $, undefined ) {
                                        // Split module batch by source and by group.
                                        splits = {};
                                        maxQueryLength = mw.config.get( 'wgResourceLoaderMaxQueryLength', -1 );
-               
+
                                        // Appends a list of modules from the queue to the batch
                                        for ( q = 0; q < queue.length; q += 1 ) {
                                                // Only request modules which are registered
@@ -942,14 +942,14 @@ var mw = ( function ( $, undefined ) {
                                        if ( !batch.length ) {
                                                return;
                                        }
-               
+
                                        // The queue has been processed into the batch, clear up the queue.
                                        queue = [];
-               
+
                                        // Always order modules alphabetically to help reduce cache
                                        // misses for otherwise identical content.
                                        batch.sort();
-               
+
                                        // Split batch by source and by group.
                                        for ( b = 0; b < batch.length; b += 1 ) {
                                                bSource = registry[batch[b]].source;
@@ -963,24 +963,24 @@ var mw = ( function ( $, undefined ) {
                                                bSourceGroup = splits[bSource][bGroup];
                                                bSourceGroup[bSourceGroup.length] = batch[b];
                                        }
-               
+
                                        // Clear the batch - this MUST happen before we append any
                                        // script elements to the body or it's possible that a script
                                        // will be locally cached, instantly load, and work the batch
                                        // again, all before we've cleared it causing each request to
                                        // include modules which are already loaded.
                                        batch = [];
-               
+
                                        for ( source in splits ) {
-               
+
                                                sourceLoadScript = sources[source].loadScript;
-               
+
                                                for ( group in splits[source] ) {
-               
+
                                                        // Cache access to currently selected list of
                                                        // modules for this group from this source.
                                                        modules = splits[source][group];
-               
+
                                                        // Calculate the highest timestamp
                                                        maxVersion = 0;
                                                        for ( g = 0; g < modules.length; g += 1 ) {
@@ -988,16 +988,16 @@ var mw = ( function ( $, undefined ) {
                                                                        maxVersion = registry[modules[g]].version;
                                                                }
                                                        }
-               
+
                                                        currReqBase = $.extend( { 'version': formatVersionNumber( maxVersion ) }, reqBase );
                                                        currReqBaseLength = $.param( currReqBase ).length;
                                                        async = true;
                                                        // We may need to split up the request to honor the query string length limit,
                                                        // so build it piece by piece.
                                                        l = currReqBaseLength + 9; // '&modules='.length == 9
-               
+
                                                        moduleMap = {}; // { prefix: [ suffixes ] }
-               
+
                                                        for ( i = 0; i < modules.length; i += 1 ) {
                                                                // Determine how many bytes this module would add to the query string
                                                                lastDotIndex = modules[i].lastIndexOf( '.' );
@@ -1007,7 +1007,7 @@ var mw = ( function ( $, undefined ) {
                                                                bytesAdded = moduleMap[prefix] !== undefined
                                                                        ? suffix.length + 3 // '%2C'.length == 3
                                                                        : modules[i].length + 3; // '%7C'.length == 3
-               
+
                                                                // If the request would become too long, create a new one,
                                                                // but don't create empty requests
                                                                if ( maxQueryLength > 0 && !$.isEmptyObject( moduleMap ) && l + bytesAdded > maxQueryLength ) {
@@ -1037,7 +1037,7 @@ var mw = ( function ( $, undefined ) {
                                                }
                                        }
                                },
-               
+
                                /**
                                 * Register a source.
                                 *
@@ -1055,16 +1055,16 @@ var mw = ( function ( $, undefined ) {
                                                }
                                                return true;
                                        }
-               
+
                                        if ( sources[id] !== undefined ) {
                                                throw new Error( 'source already registered: ' + id );
                                        }
-               
+
                                        sources[id] = props;
-               
+
                                        return true;
                                },
-               
+
                                /**
                                 * Registers a module, letting the system know about it and its
                                 * properties. Startup modules contain calls to this function.
@@ -1115,7 +1115,7 @@ var mw = ( function ( $, undefined ) {
                                                registry[module].dependencies = dependencies;
                                        }
                                },
-               
+
                                /**
                                 * Implements a module, giving the system a course of action to take
                                 * upon loading. Results of a request for one or more modules contain
@@ -1171,7 +1171,7 @@ var mw = ( function ( $, undefined ) {
                                                execute( module );
                                        }
                                },
-               
+
                                /**
                                 * Executes a function as soon as one or more required modules are ready
                                 *
@@ -1210,7 +1210,7 @@ var mw = ( function ( $, undefined ) {
                                                request( dependencies, ready, error );
                                        }
                                },
-               
+
                                /**
                                 * Loads an external script or one or more modules for future use
                                 *
@@ -1283,7 +1283,7 @@ var mw = ( function ( $, undefined ) {
                                        request( filtered, null, null, async );
                                        return;
                                },
-               
+
                                /**
                                 * Changes the state of a module
                                 *
@@ -1311,7 +1311,7 @@ var mw = ( function ( $, undefined ) {
                                                registry[module].state = state;
                                        }
                                },
-               
+
                                /**
                                 * Gets the version of a module
                                 *
@@ -1323,14 +1323,14 @@ var mw = ( function ( $, undefined ) {
                                        }
                                        return null;
                                },
-               
+
                                /**
                                 * @deprecated since 1.18 use mw.loader.getVersion() instead
                                 */
                                version: function () {
                                        return mw.loader.getVersion.apply( mw.loader, arguments );
                                },
-               
+
                                /**
                                 * Gets the state of a module
                                 *
@@ -1342,7 +1342,7 @@ var mw = ( function ( $, undefined ) {
                                        }
                                        return null;
                                },
-               
+
                                /**
                                 * Get names of all registered modules.
                                 *
@@ -1353,7 +1353,7 @@ var mw = ( function ( $, undefined ) {
                                                return key;
                                        } );
                                },
-               
+
                                /**
                                 * For backwards-compatibility with Squid-cached pages. Loads mw.user
                                 */
@@ -1362,7 +1362,7 @@ var mw = ( function ( $, undefined ) {
                                }
                        };
                }() ),
-       
+
                /** HTML construction helper functions */
                html: ( function () {
                        function escapeCallback( s ) {
@@ -1388,7 +1388,7 @@ var mw = ( function ( $, undefined ) {
                                escape: function ( s ) {
                                        return s.replace( /['"<>&]/g, escapeCallback );
                                },
-               
+
                                /**
                                 * Wrapper object for raw HTML passed to mw.html.element().
                                 * @constructor
@@ -1396,7 +1396,7 @@ var mw = ( function ( $, undefined ) {
                                Raw: function ( value ) {
                                        this.value = value;
                                },
-               
+
                                /**
                                 * Wrapper object for CDATA element contents passed to mw.html.element()
                                 * @constructor
@@ -1404,7 +1404,7 @@ var mw = ( function ( $, undefined ) {
                                Cdata: function ( value ) {
                                        this.value = value;
                                },
-               
+
                                /**
                                 * Create an HTML element string, with safe escaping.
                                 *
@@ -1426,7 +1426,7 @@ var mw = ( function ( $, undefined ) {
                                 */
                                element: function ( name, attrs, contents ) {
                                        var v, attrName, s = '<' + name;
-               
+
                                        for ( attrName in attrs ) {
                                                v = attrs[attrName];
                                                // Convert name=true, to name=name
@@ -1481,7 +1481,7 @@ var mw = ( function ( $, undefined ) {
                        tokens: new Map()
                }
        };
-       
+
 }( jQuery ) );
 
 // Alias $j to jQuery for backwards compatibility