r69904 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r69903‎ | r69904 | r69905 >
Date:20:44, 25 July 2010
Author:reedy
Status:ok (Comments)
Tags:
Comment:
Make getRandomString static as per comment

Fix usage in top of Parser (changed by me earlier)
Modified paths:
  • /trunk/phase3/includes/parser/Parser.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/parser/Parser.php
@@ -212,7 +212,7 @@
213213 */
214214 # $this->mUniqPrefix = "\x07UNIQ" . Parser::getRandomString();
215215 # Changed to \x7f to allow XML double-parsing -- TS
216 - $this->mUniqPrefix = "\x7fUNIQ" . $this->getRandomString();
 216+ $this->mUniqPrefix = "\x7fUNIQ" . $self::getRandomString();
217217
218218
219219 # Clear these on every parse, bug 4549
@@ -491,7 +491,7 @@
492492 * @private
493493 * @static
494494 */
495 - function getRandomString() {
 495+ static function getRandomString() {
496496 return dechex( mt_rand( 0, 0x7fffffff ) ) . dechex( mt_rand( 0, 0x7fffffff ) );
497497 }
498498

Follow-up revisions

RevisionCommit summaryAuthorDate
r69905Followup r69904 $self to selfreedy20:51, 25 July 2010
r74822Follow r69904. Make Parser::getRandomString real private....platonides22:12, 15 October 2010
r74910Followup r69904, make call to getRandomString static in Parser->unserialiseHa...reedy18:51, 17 October 2010

Comments

#Comment by Brion VIBBER (talk | contribs)   23:38, 16 October 2010

There's still a non-static use in Parser->unserialiseHalfParsedText(), which is called from Cite.

Status & tagging log