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
API: i18n for warnings and errors
[lhc/web/wiklou.git]
/
includes
/
api
/
ApiQueryUsers.php
diff --git
a/includes/api/ApiQueryUsers.php
b/includes/api/ApiQueryUsers.php
index
cfc1e46
..
65d3797
100644
(file)
--- 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 ) {
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;
}
} 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 ) {
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;
}
} else {
$data[$u][$t . 'token'] = $val;
}
@@
-328,7
+328,6
@@
class ApiQueryUsers extends ApiQueryBase {
],
'attachedwiki' => null,
'users' => [
],
'attachedwiki' => null,
'users' => [
- ApiBase::PARAM_TYPE => 'user',
ApiBase::PARAM_ISMULTI => true
],
'token' => [
ApiBase::PARAM_ISMULTI => true
],
'token' => [