r78886 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r78885‎ | r78886 | r78887 >
Date:14:07, 23 December 2010
Author:catrope
Status:ok (Comments)
Tags:
Comment:
Followup r78539: don't renew a cookie that expires at the end of the session anyway, no point in doing that.
Modified paths:
  • /trunk/phase3/resources/mediawiki/mediawiki.js (modified) (history)

Diff [purge]

Index: trunk/phase3/resources/mediawiki/mediawiki.js
@@ -349,9 +349,8 @@
350350 var sessionId = $.cookie( 'mediaWiki.user.sessionId' );
351351 if ( typeof sessionId == 'undefined' || sessionId == null ) {
352352 sessionId = generateId();
 353+ $.cookie( 'mediaWiki.user.sessionId', sessionId, { 'expires': null, 'path': '/' } );
353354 }
354 - // Set cookie if not set, or renew it if already set
355 - $.cookie( 'mediaWiki.user.sessionId', sessionId, { 'expires': null, 'path': '/' } );
356355 return sessionId;
357356 };
358357

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
r78539Split the functionality of mediaWiki.user.sessionId into id and sessionId - t...tparscal18:32, 17 December 2010

Comments

#Comment by Trevor Parscal (WMF) (talk | contribs)   23:01, 5 January 2011

The point was that the expiration would be pushed back each time - making it never expire so long as you visit it once in a while.

#Comment by Catrope (talk | contribs)   23:03, 5 January 2011

Yes, and that's a perfectly valid point if the expiry is set to a number. But if the cookie expires at the end of the session, there's no point, is there?

#Comment by Trevor Parscal (WMF) (talk | contribs)   23:04, 5 January 2011

Yes, you are right - of course! I will stop responding to things until I've been back for more than a few hours... :)

Status & tagging log