Robmoen has uploaded a new change for review.

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

Change subject: Return owner of collection in lstmode=allpublic
......................................................................

Return owner of collection in lstmode=allpublic

bug: T92782
Change-Id: If94f0fe3fb0ab3be69a98d9a54edbb991fb1baa5
---
M includes/api/ApiQueryLists.php
1 file changed, 4 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Gather 
refs/changes/11/198111/1

diff --git a/includes/api/ApiQueryLists.php b/includes/api/ApiQueryLists.php
index d10ee8b..cb7175f 100644
--- a/includes/api/ApiQueryLists.php
+++ b/includes/api/ApiQueryLists.php
@@ -98,7 +98,7 @@
                $this->addTables( 'gather_list' );
                $this->addFields( 'gl_id' );
                $this->addFieldsIf( 'gl_label', $fld_label || !$modeAll );
-               $this->addFieldsIf( 'gl_user', $showPrivate === null ); // 
won't know if private until later
+               $this->addFieldsIf( 'gl_user', $showPrivate === null || 
$modeAll ); // won't know if private until later
                if ( $owner ) {
                        $this->addWhereFld( 'gl_user', $owner->getId() );
                }
@@ -215,6 +215,9 @@
                                // TODO: check if this is the right wfMessage 
to show
                                $data['label'] = !$isWatchlist ? $row->gl_label 
: wfMessage( 'watchlist' )->plain();
                        }
+                       if ( $modeAll ) {
+                               $data['owner'] = User::newFromId( $row->gl_user 
)->getName();
+                       }
                        if ( $title ) {
                                if ( $isWatchlist ) {
                                        $data['title'] = 
$this->isTitleInWatchlist( $userId, $title );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If94f0fe3fb0ab3be69a98d9a54edbb991fb1baa5
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Gather
Gerrit-Branch: master
Gerrit-Owner: Robmoen <[email protected]>

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

Reply via email to