Follow-up I5f7f6da0 (cefb9ef): pass the User parameter to more LogEventsList::getExcludeClause() calls

Per comment of Umherirrender, this is needed after the merge of Ia9709ed5 (c326de4).

Change-Id: I7e9c2c7ee7de4e8f26008134c54b6f341ed91f7f
This commit is contained in:
Alexandre Emsenhuber 2012-12-19 17:10:13 +01:00
parent cefb9ef907
commit e506fccbaf

View file

@ -58,7 +58,7 @@ class ApiQueryLogEvents extends ApiQueryBase {
$this->fld_details = isset( $prop['details'] );
$this->fld_tags = isset( $prop['tags'] );
$hideLogs = LogEventsList::getExcludeClause( $db, 'user' );
$hideLogs = LogEventsList::getExcludeClause( $db, 'user', $this->getUser() );
if ( $hideLogs !== false ) {
$this->addWhere( $hideLogs );
}
@ -367,7 +367,9 @@ class ApiQueryLogEvents extends ApiQueryBase {
if ( !is_null( $params['prop'] ) && in_array( 'parsedcomment', $params['prop'] ) ) {
// formatComment() calls wfMessage() among other things
return 'anon-public-user-private';
} elseif ( LogEventsList::getExcludeClause( $this->getDB(), 'user' ) === LogEventsList::getExcludeClause( $this->getDB(), 'public' ) ) { // Output can only contain public data.
} elseif ( LogEventsList::getExcludeClause( $this->getDB(), 'user', $this->getUser() )
=== LogEventsList::getExcludeClause( $this->getDB(), 'public' )
) { // Output can only contain public data.
return 'public';
} else {
return 'anon-public-user-private';