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
Merge "Use correct progressive color on inputs"
[lhc/web/wiklou.git]
/
includes
/
api
/
ApiParamInfo.php
diff --git
a/includes/api/ApiParamInfo.php
b/includes/api/ApiParamInfo.php
index
935d5ae
..
067b2f5
100644
(file)
--- a/
includes/api/ApiParamInfo.php
+++ b/
includes/api/ApiParamInfo.php
@@
-198,6
+198,10
@@
class ApiParamInfo extends ApiBase {
$a['required'] = '';
}
$a['required'] = '';
}
+ if ( $n === 'token' && $obj->needsToken() ) {
+ $a['tokentype'] = $obj->needsToken();
+ }
+
if ( isset( $p[ApiBase::PARAM_DFLT] ) ) {
$type = $p[ApiBase::PARAM_TYPE];
if ( $type === 'boolean' ) {
if ( isset( $p[ApiBase::PARAM_DFLT] ) ) {
$type = $p[ApiBase::PARAM_TYPE];
if ( $type === 'boolean' ) {
@@
-224,7
+228,13
@@
class ApiParamInfo extends ApiBase {
}
if ( isset( $p[ApiBase::PARAM_TYPE] ) ) {
}
if ( isset( $p[ApiBase::PARAM_TYPE] ) ) {
- $a['type'] = $p[ApiBase::PARAM_TYPE];
+ if ( $p[ApiBase::PARAM_TYPE] === 'submodule' ) {
+ $a['type'] = $obj->getModuleManager()->getNames( $n );
+ sort( $a['type'] );
+ $a['submodules'] = '';
+ } else {
+ $a['type'] = $p[ApiBase::PARAM_TYPE];
+ }
if ( is_array( $a['type'] ) ) {
// To prevent sparse arrays from being serialized to JSON as objects
$a['type'] = array_values( $a['type'] );
if ( is_array( $a['type'] ) ) {
// To prevent sparse arrays from being serialized to JSON as objects
$a['type'] = array_values( $a['type'] );