r90128 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r90127‎ | r90128 | r90129 >
Date:18:18, 15 June 2011
Author:catrope
Status:ok
Tags:
Comment:
1.17wmf1: Copy mw.util.wikiScript() from trunk, needed by WikiLove
Modified paths:
  • /branches/wmf/1.17wmf1/resources/mediawiki.util/mediawiki.util.js (modified) (history)

Diff [purge]

Index: branches/wmf/1.17wmf1/resources/mediawiki.util/mediawiki.util.js
@@ -125,6 +125,17 @@
126126 'wikiGetlink' : function( str ) {
127127 return wgServer + wgArticlePath.replace( '$1', this.wikiUrlencode( str ) );
128128 },
 129+
 130+ /**
 131+ * Get address to a script in the wiki root.
 132+ * For index.php use mw.config.get( 'wgScript' )
 133+ *
 134+ * @param str string Name of script (eg. 'api'), defaults to 'index'
 135+ * @return string Address to script (eg. '/w/api.php' )
 136+ */
 137+ 'wikiScript' : function( str ) {
 138+ return mw.config.get( 'wgScriptPath' ) + '/' + ( str || 'index' ) + mw.config.get( 'wgScriptExtension' );
 139+ },
129140
130141 /**
131142 * Grab the URL parameter value for the given parameter.

Status & tagging log