r111985 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r111984‎ | r111985 | r111986 >
Date:00:00, 21 February 2012
Author:tstarling
Status:ok
Tags:
Comment:
* Fixed load order like bug 34538
* Fixed accidental global variable reference in the case where the configuration variable is false. Returned early instead of adding another indent level, so that the diff is easier to interpret.
* Untested.
Modified paths:
  • /trunk/extensions/Vector/modules/ext.vector.sectionEditLinks.js (modified) (history)

Diff [purge]

Index: trunk/extensions/Vector/modules/ext.vector.sectionEditLinks.js
@@ -5,13 +5,13 @@
66
77 var eventBase = 'ext.vector.sectionEditLinks-bucket:';
88 var cookieBase = 'ext.vector.sectionEditLinks-';
 9+var bucket = null;
910
1011 if ( mw.config.get( 'wgVectorSectionEditLinksBucketTest', false ) ) {
1112 // If the version in the client's cookie doesn't match wgVectorSectionEditLinksExperiment, then
1213 // we need to disregard the bucket they may already be in to ensure accurate redistribution
1314 var currentExperiment = $.cookie( cookieBase + 'experiment' );
1415 var experiment = Number( mw.config.get( 'wgVectorSectionEditLinksExperiment', 0 ) );
15 - var bucket = null;
1616 if ( currentExperiment === null || Number( currentExperiment ) != experiment ) {
1717 $.cookie( cookieBase + 'experiment', experiment );
1818 } else {
@@ -32,7 +32,12 @@
3333 }
3434 }
3535 }
36 -if ( bucket > 0 ) {
 36+
 37+if ( bucket <= 0 ) {
 38+ return;
 39+}
 40+
 41+$(document).ready( function() {
3742 // Transform the targets of section edit links to route through the click tracking API
3843 var session = $.cookie( 'clicktracking-session' );
3944 $( 'span.editsection a, #ca-edit a' ).each( function() {
@@ -70,6 +75,6 @@
7176 .remove();
7277 } );
7378 }
74 -}
 79+} );
7580
7681 } )( jQuery, mediaWiki );

Sign-offs

UserFlagDate
Nikerabbitinspected09:20, 21 February 2012
Krinkleinspected11:23, 24 February 2012

Follow-up revisions

RevisionCommit summaryAuthorDate
r111989* (bug 34538) Fixed compatibility with $wgResourceLoaderExperimentalAsyncLoad...tstarling04:03, 21 February 2012
r112462(bug 34538) Fixed compatibility with $wgResourceLoaderExperimentalAsyncLoadin...tstarling00:56, 27 February 2012
r112573[mediawiki.action.edit] Clean up and bug fixes...krinkle03:17, 28 February 2012

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r111983* Fixed failure of the edit toolbar to load when $wgResourceLoaderExperimenta...tstarling23:29, 20 February 2012
r111984Bug 34538 again. Bug reproduced and fix tested.tstarling23:47, 20 February 2012

Status & tagging log