r89274 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r89273‎ | r89274 | r89275 >
Date:17:34, 1 June 2011
Author:tparscal
Status:ok
Tags:
Comment:
Fixes bug #29222 by conditionally adding the clicktracking parameters to the returnto URL.
Modified paths:
  • /trunk/extensions/ArticleFeedback/modules/ext.articleFeedback/ext.articleFeedback.js (modified) (history)

Diff [purge]

Index: trunk/extensions/ArticleFeedback/modules/ext.articleFeedback/ext.articleFeedback.js
@@ -290,15 +290,20 @@
291291 'action': function() {
292292 // Mute for 7 days
293293 mutePitch( 'edit', 7 );
294 - // Go to edit page
295 - // Track the click through an API redirect
 294+ // Setup edit page link
 295+ var params = {
 296+ 'title': mw.config.get( 'wgPageName' ),
 297+ 'action': 'edit'
 298+ };
 299+ if ( tracked ) {
 300+ // Keep track of tracked users' edits
 301+ params.clicktrackingsession = $.cookie( 'clicktracking-session' );
 302+ params.clicktrackingevent = prefix( 'pitch-edit-save' );
 303+ }
 304+ // Track the click through an API redirect (automatically bypasses if !tracked)
296305 window.location = trackClickURL(
297 - mw.config.get( 'wgScript' ) + '?' + $.param( {
298 - 'title': mw.config.get( 'wgPageName' ),
299 - 'action': 'edit',
300 - 'clicktrackingsession': $.cookie( 'clicktracking-session' ),
301 - 'clicktrackingevent': prefix( 'pitch-edit-save' )
302 - } ), 'pitch-edit-accept' );
 306+ mw.config.get( 'wgScript' ) + '?' + $.param( params ), 'pitch-edit-accept'
 307+ );
303308 return false;
304309 },
305310 'title': 'articlefeedback-pitch-thanks',

Follow-up revisions

RevisionCommit summaryAuthorDate
r893551.17wmf1: MFT r88146, r88151, r89198, r89274catrope18:54, 2 June 2011

Status & tagging log