diff options
author | Pierre Schmitz <pierre@archlinux.de> | 2010-04-07 04:33:59 +0200 |
---|---|---|
committer | Pierre Schmitz <pierre@archlinux.de> | 2010-04-07 04:33:59 +0200 |
commit | 03e45da6f96fd9aa411e015554f559b3ee9a61da (patch) | |
tree | 4936acbffcd395763235288a09bfd5576d16d3ff /includes/User.php | |
parent | 6f5403ca6e8561c3dcd19284f86b4c3c8dd715ff (diff) |
update to MediaWiki 1.15.3
Diffstat (limited to 'includes/User.php')
-rw-r--r-- | includes/User.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/includes/User.php b/includes/User.php index cc861ad4..2ccc695b 100644 --- a/includes/User.php +++ b/includes/User.php @@ -2771,7 +2771,7 @@ class User { return EDIT_TOKEN_SUFFIX; } else { if( !isset( $_SESSION['wsEditToken'] ) ) { - $token = $this->generateToken(); + $token = self::generateToken(); $_SESSION['wsEditToken'] = $token; } else { $token = $_SESSION['wsEditToken']; @@ -2789,7 +2789,7 @@ class User { * @param $salt \string Optional salt value * @return \string The new random token */ - function generateToken( $salt = '' ) { + public static function generateToken( $salt = '' ) { $token = dechex( mt_rand() ) . dechex( mt_rand() ); return md5( $token . $salt ); } @@ -2884,7 +2884,7 @@ class User { $now = time(); $expires = $now + 7 * 24 * 60 * 60; $expiration = wfTimestamp( TS_MW, $expires ); - $token = $this->generateToken( $this->mId . $this->mEmail . $expires ); + $token = self::generateToken( $this->mId . $this->mEmail . $expires ); $hash = md5( $token ); $this->load(); $this->mEmailToken = $hash; |