Index: branches/wmf/1.19wmf1/resources/mediawiki/mediawiki.util.js |
— | — | @@ -2,7 +2,7 @@ |
3 | 3 | * Implements mediaWiki.util library |
4 | 4 | */ |
5 | 5 | ( function ( $, mw ) { |
6 | | -"use strict"; |
| 6 | + "use strict"; |
7 | 7 | |
8 | 8 | // Local cache and alias |
9 | 9 | var util = { |
— | — | @@ -121,19 +121,19 @@ |
122 | 122 | * @param str string String to be encoded |
123 | 123 | */ |
124 | 124 | wikiUrlencode: function ( str ) { |
125 | | - return this.rawurlencode( str ) |
| 125 | + return util.rawurlencode( str ) |
126 | 126 | .replace( /%20/g, '_' ).replace( /%3A/g, ':' ).replace( /%2F/g, '/' ); |
127 | 127 | }, |
128 | 128 | |
129 | 129 | /** |
130 | 130 | * Get the link to a page name (relative to wgServer) |
131 | 131 | * |
132 | | - * @param str string Page name to get the link for. |
133 | | - * @return string Location for a page with name of 'str' or boolean false on error. |
| 132 | + * @param str String: Page name to get the link for. |
| 133 | + * @return String: Location for a page with name of 'str' or boolean false on error. |
134 | 134 | */ |
135 | 135 | wikiGetlink: function ( str ) { |
136 | 136 | return mw.config.get( 'wgArticlePath' ).replace( '$1', |
137 | | - this.wikiUrlencode( str || mw.config.get( 'wgPageName' ) ) ); |
| 137 | + util.wikiUrlencode( typeof str === 'string' ? str : mw.config.get( 'wgPageName' ) ) ); |
138 | 138 | }, |
139 | 139 | |
140 | 140 | /** |
— | — | @@ -384,7 +384,7 @@ |
385 | 385 | $link.attr( 'title', tooltip ); |
386 | 386 | } |
387 | 387 | if ( accesskey && tooltip ) { |
388 | | - this.updateTooltipAccessKeys( $link ); |
| 388 | + util.updateTooltipAccessKeys( $link ); |
389 | 389 | } |
390 | 390 | |
391 | 391 | // Where to put our node ? |
Property changes on: branches/wmf/1.19wmf1 |
___________________________________________________________________ |
Modified: svn:mergeinfo |
392 | 392 | Merged /trunk/phase3:r112170 |