jenkins-bot has submitted this change and it was merged.
Change subject: Return owner of collection in lstmode=allpublic
......................................................................
Return owner of collection in lstmode=allpublic
bug: T93148
Change-Id: If94f0fe3fb0ab3be69a98d9a54edbb991fb1baa5
---
M includes/api/ApiQueryLists.php
1 file changed, 5 insertions(+), 1 deletion(-)
Approvals:
Jdlrobson: Looks good to me, approved
jenkins-bot: Verified
diff --git a/includes/api/ApiQueryLists.php b/includes/api/ApiQueryLists.php
index d10ee8b..17c3f9f 100644
--- a/includes/api/ApiQueryLists.php
+++ b/includes/api/ApiQueryLists.php
@@ -98,7 +98,8 @@
$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
+ // won't know if private until later
+ $this->addFieldsIf( 'gl_user', $showPrivate === null ||
$modeAll );
if ( $owner ) {
$this->addWhereFld( 'gl_user', $owner->getId() );
}
@@ -215,6 +216,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: merged
Gerrit-Change-Id: If94f0fe3fb0ab3be69a98d9a54edbb991fb1baa5
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/Gather
Gerrit-Branch: master
Gerrit-Owner: Robmoen <[email protected]>
Gerrit-Reviewer: Jdlrobson <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits