summaryrefslogtreecommitdiff
path: root/resources
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2013-05-22 00:45:21 +0200
committerPierre Schmitz <pierre@archlinux.de>2013-05-22 00:45:21 +0200
commit393e0d71f4c5478bea53ff62ff818aebbabb3e40 (patch)
treea40f0a205ee71a5c61fec5bf23557b7d1813340a /resources
parent953618714cb41a89b1f1078325f94579fc154b8a (diff)
Update to MediaWiki 1.20.6
Diffstat (limited to 'resources')
-rw-r--r--resources/mediawiki/mediawiki.user.js20
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();
};
/**