Alex Monk has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/71184


Change subject: Make list=logevents display log entries by anonymous users
......................................................................

Make list=logevents display log entries by anonymous users

Bug: 50315
Change-Id: I4df1c8c1040fb39d75ead5851d42b02d9de87a5a
---
M includes/api/ApiQueryLogEvents.php
1 file changed, 3 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/84/71184/1

diff --git a/includes/api/ApiQueryLogEvents.php 
b/includes/api/ApiQueryLogEvents.php
index 2aa5c28..ff434c8 100644
--- a/includes/api/ApiQueryLogEvents.php
+++ b/includes/api/ApiQueryLogEvents.php
@@ -67,7 +67,7 @@
                $this->addTables( array( 'logging', 'user', 'page' ) );
                $this->addOption( 'STRAIGHT_JOIN' );
                $this->addJoinConds( array(
-                       'user' => array( 'JOIN',
+                       'user' => array( 'LEFT JOIN',
                                'user_id=log_user' ),
                        'page' => array( 'LEFT JOIN',
                                array( 'log_namespace=page_namespace',
@@ -82,7 +82,7 @@
                ) );
 
                $this->addFieldsIf( array( 'log_id', 'page_id' ), 
$this->fld_ids );
-               $this->addFieldsIf( array( 'log_user', 'user_name' ), 
$this->fld_user );
+               $this->addFieldsIf( array( 'log_user', 'log_user_text', 
'user_name' ), $this->fld_user );
                $this->addFieldsIf( 'user_id', $this->fld_userid );
                $this->addFieldsIf( array( 'log_namespace', 'log_title' ), 
$this->fld_title || $this->fld_parsedcomment );
                $this->addFieldsIf( 'log_comment', $this->fld_comment || 
$this->fld_parsedcomment );
@@ -336,7 +336,7 @@
                                $vals['userhidden'] = '';
                        } else {
                                if ( $this->fld_user ) {
-                                       $vals['user'] = $row->user_name;
+                                       $vals['user'] = $row->user_name === 
null ? $row->log_user_text : $row->user_name;
                                }
                                if ( $this->fld_userid ) {
                                        $vals['userid'] = $row->user_id;

-- 
To view, visit https://gerrit.wikimedia.org/r/71184
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4df1c8c1040fb39d75ead5851d42b02d9de87a5a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Alex Monk <kren...@gmail.com>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to