From c326de458117062d19375330a5c8f07f30795eab Mon Sep 17 00:00:00 2001 From: Alex Monk Date: Sun, 16 Dec 2012 13:28:50 +0000 Subject: [PATCH] (bug 43096) Fix querying suppression logs Change-Id: Ia9709ed5f694e07b7544887b49c99db5ed7063df --- includes/api/ApiQueryLogEvents.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/includes/api/ApiQueryLogEvents.php b/includes/api/ApiQueryLogEvents.php index e51b5585ca..1b651680f0 100644 --- a/includes/api/ApiQueryLogEvents.php +++ b/includes/api/ApiQueryLogEvents.php @@ -58,7 +58,7 @@ class ApiQueryLogEvents extends ApiQueryBase { $this->fld_details = isset( $prop['details'] ); $this->fld_tags = isset( $prop['tags'] ); - $hideLogs = LogEventsList::getExcludeClause( $db ); + $hideLogs = LogEventsList::getExcludeClause( $db, 'user' ); if ( $hideLogs !== false ) { $this->addWhere( $hideLogs ); } @@ -367,8 +367,10 @@ 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'; - } else { + } elseif ( LogEventsList::getExcludeClause( $this->getDB(), 'user' ) === LogEventsList::getExcludeClause( $this->getDB(), 'public' ) ) { // Output can only contain public data. return 'public'; + } else { + return 'anon-public-user-private'; } } -- 2.20.1