Follow-up I5f7f6da0 (cefb9ef): pass the User parameter to more LogEventsList::getExcl...
authorAlexandre Emsenhuber <ialex.wiki@gmail.com>
Wed, 19 Dec 2012 16:10:13 +0000 (17:10 +0100)
committerAlexandre Emsenhuber <ialex.wiki@gmail.com>
Wed, 19 Dec 2012 16:10:13 +0000 (17:10 +0100)
Per comment of Umherirrender, this is needed after the merge of Ia9709ed5 (c326de4).

Change-Id: I7e9c2c7ee7de4e8f26008134c54b6f341ed91f7f

includes/api/ApiQueryLogEvents.php

index 1b65168..7d39070 100644 (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';