r96236 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r96235‎ | r96236 | r96237 >
Date:16:50, 4 September 2011
Author:krinkle
Status:ok
Tags:
Comment:
Revert r93063 per r93063 CR
Modified paths:
  • /trunk/phase3/resources/mediawiki/mediawiki.user.js (modified) (history)

Diff [purge]

Index: trunk/phase3/resources/mediawiki/mediawiki.user.js
@@ -29,7 +29,7 @@
3030 *
3131 * @return String: Random set of 32 alpha-numeric characters
3232 */
33 - this.generateId = function() {
 33+ function generateId() {
3434 var id = '';
3535 var seed = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz';
3636 for ( var i = 0, r; i < 32; i++ ) {
@@ -37,7 +37,7 @@
3838 id += seed.substring( r, r + 1 );
3939 }
4040 return id;
41 - };
 41+ }
4242
4343 /**
4444 * Gets the current user's name.
@@ -68,7 +68,7 @@
6969 this.sessionId = function () {
7070 var sessionId = $.cookie( 'mediaWiki.user.sessionId' );
7171 if ( typeof sessionId == 'undefined' || sessionId === null ) {
72 - sessionId = that.generateId();
 72+ sessionId = generateId();
7373 $.cookie( 'mediaWiki.user.sessionId', sessionId, { 'expires': null, 'path': '/' } );
7474 }
7575 return sessionId;
@@ -90,7 +90,7 @@
9191 }
9292 var id = $.cookie( 'mediaWiki.user.id' );
9393 if ( typeof id == 'undefined' || id === null ) {
94 - id = that.generateId();
 94+ id = generateId();
9595 }
9696 // Set cookie if not set, or renew it if already set
9797 $.cookie( 'mediaWiki.user.id', id, { 'expires': 365, 'path': '/' } );

Follow-up revisions

RevisionCommit summaryAuthorDate
r96237Add local generator function to account for revert of r93063 in r96236.krinkle17:04, 4 September 2011

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r93063mw.user.js: Make sessionId publicdiebuche16:54, 25 July 2011

Status & tagging log