diff options
Diffstat (limited to 'resources/src/mediawiki/mediawiki.Title.js')
-rw-r--r-- | resources/src/mediawiki/mediawiki.Title.js | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/resources/src/mediawiki/mediawiki.Title.js b/resources/src/mediawiki/mediawiki.Title.js index 7ced42fe..3efb7eca 100644 --- a/resources/src/mediawiki/mediawiki.Title.js +++ b/resources/src/mediawiki/mediawiki.Title.js @@ -8,7 +8,7 @@ /** * @class mw.Title * - * Parse titles into an object struture. Note that when using the constructor + * Parse titles into an object structure. Note that when using the constructor * directly, passing invalid titles will result in an exception. Use #newFromText to use the * logic directly and get null for invalid titles which is easier to work with. * @@ -119,7 +119,7 @@ rSplit = /^(.+?)_*:_*(.*)$/, - // See Title.php#getTitleInvalidRegex + // See MediaWikiTitleCodec.php#getTitleInvalidRegex rInvalid = new RegExp( '[^' + mw.config.get( 'wgLegalTitleChars' ) + ']' + // URL percent encoding sequences interfere with the ability @@ -508,7 +508,7 @@ normalizeExtension = function ( extension ) { // Remove only trailing space (that is removed by MW anyway) - extension = extension.toLowerCase().replace(/\s*$/, ''); + extension = extension.toLowerCase().replace( /\s*$/, '' ); return extension; }; @@ -731,7 +731,10 @@ set: function ( titles, state ) { titles = $.isArray( titles ) ? titles : [titles]; state = state === undefined ? true : !!state; - var pages = this.pages, i, len = titles.length; + var i, + pages = this.pages, + len = titles.length; + for ( i = 0; i < len; i++ ) { pages[ titles[i] ] = state; } |