we want to get the edit token, not edit the token...
authorJeroen De Dauw <jeroendedauw@users.mediawiki.org>
Wed, 19 Oct 2011 19:38:17 +0000 (19:38 +0000)
committerJeroen De Dauw <jeroendedauw@users.mediawiki.org>
Wed, 19 Oct 2011 19:38:17 +0000 (19:38 +0000)
includes/User.php

index ad3ba03..7657a7e 100644 (file)
@@ -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();
                }