Matthias Mullie has uploaded a new change for review.

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

Change subject: Always respond with log info when querying 
ApiQueryRecentChanges for loginfo
......................................................................

Always respond with log info when querying ApiQueryRecentChanges for loginfo

When specifically requesting loginfo from ApiQueryRecentChanges, it would
only output rc_params when loginfo is requested AND the type that was
requested is log.
The reason it was originally omitted seems to have been that there just
isn't any of that info available for types other than 'log'. However,
I think that when specific info is requested, it should always respond
with the requested info, even if it's nothing (logid 0, logtype null,
logaction "" and logparams {})
The assumption that types other than log don't have that data is also
no longer true. Flow, for examples stores ids that reference topics/post
in there. Without exposing rc_params, it is currently impossible to
figure out which post the RC entry is for.

Change-Id: I9295cb6ced6f2381f03c39b59efacd48b32f5a8d
---
M includes/api/ApiQueryRecentChanges.php
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/73/213473/1

diff --git a/includes/api/ApiQueryRecentChanges.php 
b/includes/api/ApiQueryRecentChanges.php
index 56c37cb..e145b35 100644
--- a/includes/api/ApiQueryRecentChanges.php
+++ b/includes/api/ApiQueryRecentChanges.php
@@ -512,7 +512,7 @@
                        $vals['unpatrolled'] = ChangesList::isUnpatrolled( 
$row, $user );
                }
 
-               if ( $this->fld_loginfo && $row->rc_type == RC_LOG ) {
+               if ( $this->fld_loginfo ) {
                        if ( $row->rc_deleted & LogPage::DELETED_ACTION ) {
                                $vals['actionhidden'] = true;
                                $anyHidden = true;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9295cb6ced6f2381f03c39b59efacd48b32f5a8d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Matthias Mullie <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to