http://www.mediawiki.org/wiki/Special:Code/MediaWiki/75642
Revision: 75642 Author: krinkle Date: 2010-10-29 14:44:18 +0000 (Fri, 29 Oct 2010) Log Message: ----------- Follow-up r75577 Modified Paths: -------------- trunk/phase3/resources/mediawiki.util/mediawiki.util.js trunk/phase3/resources/mediawiki.util/mediawiki.util.test.js Modified: trunk/phase3/resources/mediawiki.util/mediawiki.util.js =================================================================== --- trunk/phase3/resources/mediawiki.util/mediawiki.util.js 2010-10-29 12:20:11 UTC (rev 75641) +++ trunk/phase3/resources/mediawiki.util/mediawiki.util.js 2010-10-29 14:44:18 UTC (rev 75642) @@ -74,8 +74,8 @@ * Checks if the current browser matches * * @example mw.util.isBrowser( 'safari' ); - * @param String str name of a browser (case insensitive). Check jquery.client.js for possible values - * @return Boolean true of the browsername matches the clients browser + * @param String str name of a browser (case insensitive). Check jquery.client.js for possible values + * @return Boolean true of the browsername matches the clients browser */ 'isBrowser' : function( str ) { str = (str + '').toLowerCase(); @@ -86,8 +86,8 @@ * Checks if the current layout matches * * @example mw.util.isLayout( 'webkit' ); - * @param String str name of a layout engine (case insensitive). Check jquery.client.js for possible values - * @return Boolean true of the layout engine matches the clients browser + * @param String str name of a layout engine (case insensitive). Check jquery.client.js for possible values + * @return Boolean true of the layout engine matches the clients browser */ 'isLayout' : function( str ) { str = (str + '').toLowerCase(); @@ -98,8 +98,8 @@ * Checks if the current layout matches * * @example mw.util.isPlatform( 'mac' ); - * @param String str name of a platform (case insensitive). Check jquery.client.js for possible values - * @return Boolean true of the platform matches the clients platform + * @param String str name of a platform (case insensitive). Check jquery.client.js for possible values + * @return Boolean true of the platform matches the clients platform */ 'isPlatform' : function( str ) { str = (str + '').toLowerCase(); @@ -110,8 +110,8 @@ * Checks if the current browser version matches * * @example mw.util.isBrowserVersion( '5' ); - * @param String str version number without decimals - * @return Boolean true of the version number matches the clients browser + * @param String str version number without decimals + * @return Boolean true of the version number matches the clients browser */ 'isBrowserVersion' : function( str ) { return this.clientProfile.versionBase === str; @@ -135,24 +135,24 @@ * * @param String str string to be encoded */ - 'wfUrlencode' : function( str ) { + 'wikiUrlencode' : function( str ) { return this.rawurlencode( str ).replace( /%20/g, '_' ).replace( /%3A/g, ':' ).replace( /%2F/g, '/' ); }, /** * Get the full url to a pagename * - * @param String str pagename to link to + * @param String str pagename to link to */ - 'wfGetlink' : function( str ) { - return wgServer + wgArticlePath.replace( '$1', this.wfUrlencode( str ) ); + 'wikiGetlink' : function( str ) { + return wgServer + wgArticlePath.replace( '$1', this.wikiUrlencode( str ) ); }, /** * Check is a variable is empty. Support for strings, booleans, arrays and objects. * String "0" is considered empty. String containing only whitespace (ie. " ") is considered not empty. * - * @param Mixed v the variable to check for empty ness + * @param Mixed v the variable to check for empty ness */ 'isEmpty' : function( v ) { var key; @@ -246,7 +246,7 @@ return; } - $nodes.each(function ( i ) { + $nodes.each( function ( i ) { var tip = $(this).attr( 'title' ); if ( !!tip && mw.util.tooltipAccessKeyRegexp.exec( tip ) ) { tip = tip.replace( mw.util.tooltipAccessKeyRegexp, '[' + mw.util.tooltipAccessKeyPrefix + "$5]" ); Modified: trunk/phase3/resources/mediawiki.util/mediawiki.util.test.js =================================================================== --- trunk/phase3/resources/mediawiki.util/mediawiki.util.test.js 2010-10-29 12:20:11 UTC (rev 75641) +++ trunk/phase3/resources/mediawiki.util/mediawiki.util.test.js 2010-10-29 14:44:18 UTC (rev 75642) @@ -90,7 +90,7 @@ 'function (string)'); mw.test.addTest('mw.util.rawurlencode( \'Test: A&B/Here\' )', 'Test%3A%20A%26B%2FHere (string)'); - mw.test.addTest('typeof mw.util.wfGetlink', + mw.test.addTest('typeof mw.util.wikiGetlink', 'function (string)'); mw.test.addTest('typeof mw.util.getParamValue', 'function (string)'); _______________________________________________ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs