mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/AbuseFilter.git
synced 2024-11-24 06:03:49 +00:00
(bug 42814) Fix the visibility of action=query&list=abuselog
Made prop=details invisible for hidden filters if the current user isn't allowed to see that. Visibility should match the web interface now. Change-Id: I2cd682a2ec298473e5398fbf20d850b710f4e93a
This commit is contained in:
parent
7a21a8f76a
commit
ad9f60a9d3
|
@ -158,11 +158,14 @@ class ApiQueryAbuseLog extends ApiQueryBase {
|
|||
$entry['timestamp'] = $ts->getTimestamp( TS_ISO_8601 );
|
||||
}
|
||||
if ( $fld_details ) {
|
||||
$vars = AbuseFilter::loadVarDump( $row->afl_var_dump );
|
||||
if ( $vars instanceof AbuseFilterVariableHolder ) {
|
||||
$entry['details'] = $vars->exportAllVars();
|
||||
} else {
|
||||
$entry['details'] = array_change_key_case( $vars, CASE_LOWER );
|
||||
$entry['details'] = array();
|
||||
if ( !AbuseFilter::filterHidden( $row->afl_filter ) || SpecialAbuseLog::canSeePrivate() ) {
|
||||
$vars = AbuseFilter::loadVarDump( $row->afl_var_dump );
|
||||
if ( $vars instanceof AbuseFilterVariableHolder ) {
|
||||
$entry['details'] = $vars->exportAllVars();
|
||||
} else {
|
||||
$entry['details'] = array_change_key_case( $vars, CASE_LOWER );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue