From ea47fb834f6ae48302f7108762ec55068da018f5 Mon Sep 17 00:00:00 2001 From: umherirrender Date: Fri, 27 Jul 2012 14:43:55 +0200 Subject: [PATCH] Add hints to comment of ApiBase::needsToken/getTokenSalt Change-Id: I7141256527aaff5496ac4e163199c947fb27fed0 --- includes/api/ApiBase.php | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/includes/api/ApiBase.php b/includes/api/ApiBase.php index bc94ee4808..63624cb58e 100644 --- a/includes/api/ApiBase.php +++ b/includes/api/ApiBase.php @@ -1440,7 +1440,9 @@ abstract class ApiBase extends ContextSource { } /** - * Returns whether this module requires a Token to execute + * Returns whether this module requires a token to execute + * It is used to show possible errors in action=paraminfo + * see bug 25248 * @return bool */ public function needsToken() { @@ -1448,8 +1450,12 @@ abstract class ApiBase extends ContextSource { } /** - * Returns the token salt if there is one, '' if the module doesn't require a salt, else false if the module doesn't need a token - * @return bool|string + * Returns the token salt if there is one, + * '' if the module doesn't require a salt, + * else false if the module doesn't need a token + * You have also to override needsToken() + * Value is passed to User::getEditToken + * @return bool|string|array */ public function getTokenSalt() { return false; -- 2.20.1