diff options
author | Pierre Schmitz <pierre@archlinux.de> | 2013-05-22 00:45:21 +0200 |
---|---|---|
committer | Pierre Schmitz <pierre@archlinux.de> | 2013-05-22 00:45:21 +0200 |
commit | 393e0d71f4c5478bea53ff62ff818aebbabb3e40 (patch) | |
tree | a40f0a205ee71a5c61fec5bf23557b7d1813340a /resources | |
parent | 953618714cb41a89b1f1078325f94579fc154b8a (diff) |
Update to MediaWiki 1.20.6
Diffstat (limited to 'resources')
-rw-r--r-- | resources/mediawiki/mediawiki.user.js | 20 |
1 files changed, 3 insertions, 17 deletions
diff --git a/resources/mediawiki/mediawiki.user.js b/resources/mediawiki/mediawiki.user.js index 5c5c87e2..e64d2e84 100644 --- a/resources/mediawiki/mediawiki.user.js +++ b/resources/mediawiki/mediawiki.user.js @@ -122,30 +122,16 @@ }; /** - * Gets the current user's name or a random ID automatically generated and kept in a cookie. - * - * This ID is persistent for anonymous users, staying in their browser up to 1 year. The - * expiration time is reset each time the ID is queried, so in most cases this ID will - * persist until the browser's cookies are cleared or the user doesn't visit for 1 year. + * Gets the current user's name or the session ID * * @return String: User name or random session ID */ this.id = function() { - var id, - name = user.getName(); + var name = user.getName(); if ( name ) { return name; } - id = $.cookie( 'mediaWiki.user.id' ); - if ( typeof id === 'undefined' || id === null ) { - id = generateId(); - } - // Set cookie if not set, or renew it if already set - $.cookie( 'mediaWiki.user.id', id, { - expires: 365, - path: '/' - } ); - return id; + return user.sessionId(); }; /** |