From: Jeroen De Dauw Date: Wed, 19 Oct 2011 19:38:17 +0000 (+0000) Subject: we want to get the edit token, not edit the token... X-Git-Tag: 1.31.0-rc.0~27001 X-Git-Url: http://git.cyclocoop.org//%27%40script%40/%27?a=commitdiff_plain;h=da250a635c0e20b2d4c3ca994b8aad065b319149;p=lhc%2Fweb%2Fwiklou.git we want to get the edit token, not edit the token... --- diff --git a/includes/User.php b/includes/User.php index ad3ba03fb9..7657a7eb53 100644 --- a/includes/User.php +++ b/includes/User.php @@ -3159,17 +3159,31 @@ class User { } } + /** + * Alias for getEditToken. + * @deprecated since 1.19, use getEditToken instead. + * + * @param $salt String|Array of Strings Optional function-specific data for hashing + * @param $request WebRequest object to use or null to use $wgRequest + * @return String The new edit token + */ + public function editToken( $salt = '', $request = null ) { + return $this->getEditToken( $salt, $request ); + } + /** * Initialize (if necessary) and return a session token value * which can be used in edit forms to show that the user's * login credentials aren't being hijacked with a foreign form * submission. * + * @since 1.19 + * * @param $salt String|Array of Strings Optional function-specific data for hashing * @param $request WebRequest object to use or null to use $wgRequest * @return String The new edit token */ - public function editToken( $salt = '', $request = null ) { + public function getEditToken( $salt = '', $request = null ) { if ( $request == null ) { $request = $this->getRequest(); }