r83051 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r83050‎ | r83051 | r83052 >
Date:21:51, 1 March 2011
Author:catrope
Status:ok
Tags:
Comment:
1.17wmf1: MFT r78544
Modified paths:
  • /branches/wmf/1.17wmf1/resources/mediawiki/mediawiki.js (modified) (history)

Diff [purge]

Index: branches/wmf/1.17wmf1/resources/mediawiki/mediawiki.js
@@ -236,7 +236,7 @@
237237
238238 /* Public Methods */
239239
240 - /*
 240+ /**
241241 * Generates a random user session ID (32 alpha-numeric characters).
242242 *
243243 * This information would potentially be stored in a cookie to identify a user during a
@@ -254,7 +254,7 @@
255255 return id;
256256 }
257257
258 - /*
 258+ /**
259259 * Gets the current user's name.
260260 *
261261 * @return mixed user name string or null if users is anonymous
@@ -263,7 +263,16 @@
264264 return mediaWiki.config.get( 'wgUserName' );
265265 };
266266
267 - /*
 267+ /**
 268+ * Checks if the current user is anonymous.
 269+ *
 270+ * @return boolean
 271+ */
 272+ this.anonymous = function() {
 273+ return that.name() ? false : true;
 274+ };
 275+
 276+ /**
268277 * Gets a random session ID automatically generated and kept in a cookie.
269278 *
270279 * This ID is ephemeral for everyone, staying in their browser only until they close
@@ -284,7 +293,7 @@
285294 return sessionId;
286295 };
287296
288 - /*
 297+ /**
289298 * Gets the current user's name or a random ID automatically generated and kept in a cookie.
290299 *
291300 * This ID is persistent for anonymous users, staying in their browser up to 1 year. The
Property changes on: branches/wmf/1.17wmf1/resources/mediawiki/mediawiki.js
___________________________________________________________________
Modified: svn:mergeinfo
292301 Merged /trunk/phase3/resources/mediawiki/mediawiki.js:r78544

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r78544Added anonymous function to mediaWiki.usertparscal19:18, 17 December 2010

Status & tagging log