r101056 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r101055‎ | r101056 | r101057 >
Date:21:17, 27 October 2011
Author:kaldari
Status:ok
Tags:
Comment:
using safer js for webitects form
Modified paths:
  • /trunk/extensions/DonationInterface/globalcollect_gateway/forms/js/webitects_2_3step.js (modified) (history)

Diff [purge]

Index: trunk/extensions/DonationInterface/globalcollect_gateway/forms/js/webitects_2_3step.js
@@ -140,7 +140,7 @@
141141 showStep3(); // Open the 3rd section
142142 var language = 'en'; // default value is English
143143 var matches = document.location.href.match(/uselang=(\w+)/i); // fine the real language
144 - if ( matches[1] ) {
 144+ if ( matches && matches[1] ) {
145145 language = matches[1];
146146 }
147147 var sendData = {
@@ -162,7 +162,7 @@
163163 'format': 'json'
164164 };
165165 $.ajax( {
166 - 'url': mw.util.wikiScript( 'api' ),
 166+ 'url': mw.config.get( 'wgServer' ) + mw.config.get( 'wgScriptPath' ) + '/api.php?',
167167 'data': sendData,
168168 'dataType': 'json',
169169 'type': 'GET',

Follow-up revisions

RevisionCommit summaryAuthorDate
r101102MFT r101056, r101071, r101072, r101099awjrichards00:49, 28 October 2011

Status & tagging log