r83546 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r83545‎ | r83546 | r83547 >
Date:21:21, 8 March 2011
Author:tparscal
Status:ok
Tags:
Comment:
Added session and info parameters to the edit page links, so that edit save tracking can take place too.
Modified paths:
  • /trunk/extensions/Vector/modules/ext.vector.sectionEditLinks.js (modified) (history)

Diff [purge]

Index: trunk/extensions/Vector/modules/ext.vector.sectionEditLinks.js
@@ -23,11 +23,17 @@
2424 if ( bucket ) {
2525 // Transform the targets of section edit links to route through the click tracking API
2626 $( 'span.editsection a' ).each( function() {
 27+ var session = $.cookie( 'clicktracking-session' );
 28+ var editUrl = $( this ).attr( 'href' );
 29+ editUrl += ( editUrl.indexOf( '?' ) >= 0 ? '&' : '?' ) + $.param( {
 30+ 'clicktrackingsession': session,
 31+ 'clicktrackinginfo': 'ext.vector.sectionEditLinks-bucket' + bucket + '-save'
 32+ } );
2733 $(this).attr( 'href', mediaWiki.config.get( 'wgScriptPath' ) + '/api.php?' + $.param( {
2834 'action': 'clicktracking',
2935 'eventid': 'ext.vector.sectionEditLinks-bucket' + bucket + '-click',
30 - 'token': $.cookie( 'clicktracking-session' ),
31 - 'redirectto': $( this ).attr( 'href' )
 36+ 'token': session,
 37+ 'redirectto': editUrl
3238 } ) );
3339 } );
3440 if ( bucket == 2 ) {

Follow-up revisions

RevisionCommit summaryAuthorDate
r836001.17wmf1: Merge Vector edit section links module plus required ClickTracking ...catrope18:55, 9 March 2011

Status & tagging log