dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
SECURITY: rate-limit and prevent blocked users from changing email
[lhc/web/wiklou.git]
/
includes
/
api
/
ApiAuthManagerHelper.php
diff --git
a/includes/api/ApiAuthManagerHelper.php
b/includes/api/ApiAuthManagerHelper.php
index
d6b9f76
..
2f66277
100644
(file)
--- a/
includes/api/ApiAuthManagerHelper.php
+++ b/
includes/api/ApiAuthManagerHelper.php
@@
-48,7
+48,7
@@
class ApiAuthManagerHelper {
$this->module = $module;
$params = $module->extractRequestParams();
$this->module = $module;
$params = $module->extractRequestParams();
- $this->messageFormat =
isset( $params['messageformat'] ) ? $params['messageformat'] :
'wikitext';
+ $this->messageFormat =
$params['messageformat'] ??
'wikitext';
}
/**
}
/**
@@
-345,10
+345,10
@@
class ApiAuthManagerHelper {
/**
* Fetch the standard parameters this helper recognizes
* @param string $action AuthManager action
/**
* Fetch the standard parameters this helper recognizes
* @param string $action AuthManager action
- * @param string
$param,...
Parameters to use
+ * @param string
...$wantedParams
Parameters to use
* @return array
*/
* @return array
*/
- public static function getStandardParams( $action,
$param /* ... */
) {
+ public static function getStandardParams( $action,
...$wantedParams
) {
$params = [
'requests' => [
ApiBase::PARAM_TYPE => 'string',
$params = [
'requests' => [
ApiBase::PARAM_TYPE => 'string',
@@
-384,8
+384,6
@@
class ApiAuthManagerHelper {
];
$ret = [];
];
$ret = [];
- $wantedParams = func_get_args();
- array_shift( $wantedParams );
foreach ( $wantedParams as $name ) {
if ( isset( $params[$name] ) ) {
$ret[$name] = $params[$name];
foreach ( $wantedParams as $name ) {
if ( isset( $params[$name] ) ) {
$ret[$name] = $params[$name];