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: Fixed documentation for hasmg parameter
[lhc/web/wiklou.git]
/
includes
/
api
/
ApiQueryInfo.php
diff --git
a/includes/api/ApiQueryInfo.php
b/includes/api/ApiQueryInfo.php
index
66178d4
..
c45e0ef
100644
(file)
--- a/
includes/api/ApiQueryInfo.php
+++ b/
includes/api/ApiQueryInfo.php
@@
-799,6
+799,7
@@
class ApiQueryInfo extends ApiQueryBase {
}
public function getCacheMode( $params ) {
}
public function getCacheMode( $params ) {
+ // Other props depend on something about the current user
$publicProps = array(
'protection',
'talkid',
$publicProps = array(
'protection',
'talkid',
@@
-807,13
+808,15
@@
class ApiQueryInfo extends ApiQueryBase {
'preload',
'displaytitle',
);
'preload',
'displaytitle',
);
- if ( !is_null( $params['prop'] ) ) {
- foreach ( $params['prop'] as $prop ) {
- if ( !in_array( $prop, $publicProps ) ) {
- return 'private';
- }
- }
+ if ( array_diff( (array)$params['prop'], $publicProps ) ) {
+ return 'private';
}
}
+
+ // testactions also depends on the current user
+ if ( $params['testactions'] ) {
+ return 'private';
+ }
+
if ( !is_null( $params['token'] ) ) {
return 'private';
}
if ( !is_null( $params['token'] ) ) {
return 'private';
}
@@
-868,6
+871,6
@@
class ApiQueryInfo extends ApiQueryBase {
}
public function getHelpUrls() {
}
public function getHelpUrls() {
- return 'https://www.mediawiki.org/wiki/API:
Properties#info_.2F_in
';
+ return 'https://www.mediawiki.org/wiki/API:
Info
';
}
}
}
}