From da250a635c0e20b2d4c3ca994b8aad065b319149 Mon Sep 17 00:00:00 2001 From: Jeroen De Dauw Date: Wed, 19 Oct 2011 19:38:17 +0000 Subject: [PATCH] we want to get the edit token, not edit the token... --- includes/User.php | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) 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(); } -- 2.20.1