r112632 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r112631‎ | r112632 | r112633 >
Date:20:41, 28 February 2012
Author:reedy
Status:ok
Tags:
Comment:
Modified paths:
  • /branches/wmf/1.19wmf1 (modified) (history)
  • /branches/wmf/1.19wmf1/resources/mediawiki/mediawiki.util.js (modified) (history)

Diff [purge]

Index: branches/wmf/1.19wmf1/resources/mediawiki/mediawiki.util.js
@@ -2,7 +2,7 @@
33 * Implements mediaWiki.util library
44 */
55 ( function ( $, mw ) {
6 -"use strict";
 6+ "use strict";
77
88 // Local cache and alias
99 var util = {
@@ -121,19 +121,19 @@
122122 * @param str string String to be encoded
123123 */
124124 wikiUrlencode: function ( str ) {
125 - return this.rawurlencode( str )
 125+ return util.rawurlencode( str )
126126 .replace( /%20/g, '_' ).replace( /%3A/g, ':' ).replace( /%2F/g, '/' );
127127 },
128128
129129 /**
130130 * Get the link to a page name (relative to wgServer)
131131 *
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.
134134 */
135135 wikiGetlink: function ( str ) {
136136 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' ) ) );
138138 },
139139
140140 /**
@@ -384,7 +384,7 @@
385385 $link.attr( 'title', tooltip );
386386 }
387387 if ( accesskey && tooltip ) {
388 - this.updateTooltipAccessKeys( $link );
 388+ util.updateTooltipAccessKeys( $link );
389389 }
390390
391391 // Where to put our node ?
Property changes on: branches/wmf/1.19wmf1
___________________________________________________________________
Modified: svn:mergeinfo
392392 Merged /trunk/phase3:r112170

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r112170[mw.util] bug fix and minor clean up...krinkle00:39, 23 February 2012

Status & tagging log