X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fapi%2FApiQueryUsers.php;h=65d3797a7471de8742cfabdd356c3468790e08f7;hb=4e6810e4a2c1d821d8d108c7974ac16917561764;hp=9b45b919239282f03919607adccf392f6763600c;hpb=345fcff394dbcfe0df9427c680bda0e1d080e330;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/api/ApiQueryUsers.php b/includes/api/ApiQueryUsers.php index 9b45b91923..65d3797a74 100644 --- a/includes/api/ApiQueryUsers.php +++ b/includes/api/ApiQueryUsers.php @@ -226,7 +226,7 @@ class ApiQueryUsers extends ApiQueryBase { foreach ( $params['token'] as $t ) { $val = call_user_func( $tokenFunctions[$t], $user ); if ( $val === false ) { - $this->setWarning( "Action '$t' is not allowed for the current user" ); + $this->addWarning( [ 'apiwarn-tokennotallowed', $t ] ); } else { $data[$name][$t . 'token'] = $val; } @@ -253,7 +253,7 @@ class ApiQueryUsers extends ApiQueryBase { foreach ( $params['token'] as $t ) { $val = call_user_func( $tokenFunctions[$t], $iwUser ); if ( $val === false ) { - $this->setWarning( "Action '$t' is not allowed for the current user" ); + $this->addWarning( [ 'apiwarn-tokennotallowed', $t ] ); } else { $data[$u][$t . 'token'] = $val; }