From: umherirrender Date: Fri, 27 Jul 2012 12:43:55 +0000 (+0200) Subject: Add hints to comment of ApiBase::needsToken/getTokenSalt X-Git-Tag: 1.31.0-rc.0~22930^2 X-Git-Url: http://git.cyclocoop.org/%24href?a=commitdiff_plain;h=ea47fb834f6ae48302f7108762ec55068da018f5;p=lhc%2Fweb%2Fwiklou.git Add hints to comment of ApiBase::needsToken/getTokenSalt Change-Id: I7141256527aaff5496ac4e163199c947fb27fed0 --- 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;