r78347 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r78346‎ | r78347 | r78348 >
Date:00:02, 14 December 2010
Author:tparscal
Status:ok
Tags:
Comment:
Fixes r78104 much better than r78344 did. By adding jquery.cookie to the loading queue just after declaring mediaWiki we can ensure it's in the first batch of modules that are fetched - essentially adding it to the initial payload.
Modified paths:
  • /trunk/phase3/resources/mediawiki/mediawiki.js (modified) (history)

Diff [purge]

Index: trunk/phase3/resources/mediawiki/mediawiki.js
@@ -335,7 +335,6 @@
336336 if ( name ) {
337337 return name;
338338 }
339 - mediaWiki.loader.load( 'jquery.cookie' );
340339 var sessionId = $.cookie( 'mediaWiki.user.sessionId' );
341340 if ( typeof sessionId == 'undefined' || sessionId == null ) {
342341 sessionId = generateSessionId();
@@ -1143,6 +1142,9 @@
11441143 delete startUp;
11451144 }
11461145
 1146+// Add jQuery Cookie to initial payload (used in mediaWiki.user)
 1147+mediaWiki.loader.load( 'jquery.cookie' );
 1148+
11471149 // Alias $j to jQuery for backwards compatibility
11481150 window.$j = jQuery;
11491151 window.mw = mediaWiki;

Follow-up revisions

RevisionCommit summaryAuthorDate
r830371.17wmf1: Merge revs to mediawiki.js required by ArticleFeedback: r78104, r78...catrope19:23, 1 March 2011
r85080MFT r78108, r78179, r78344, r78347, r78350, r78365, r78380, r78425, r78539, r...demon19:09, 31 March 2011

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r78104Added name and sessionId methods to user object - now anonymous users have an...tparscal23:18, 8 December 2010
r78344Fixed issue in r78104 where jquery.cookie wouldn't load properly. Changed the...tparscal23:51, 13 December 2010

Status & tagging log