From 81be7edb79278471598f996abcff6ba8d9e419a7 Mon Sep 17 00:00:00 2001 From: Brian Wolff Date: Thu, 22 May 2014 16:28:16 -0300 Subject: [PATCH] Do not include user column on Special:MyUploads If Special:ListFiles is being filtered to show only a specific user, then there's not much point showing which user uploaded the image, as they are all uploaded by the same user. Bug: 30627 Change-Id: Ibe1be82cb8f3354889051ef00f3c0b9f9ea5180e --- includes/specials/SpecialListfiles.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/includes/specials/SpecialListfiles.php b/includes/specials/SpecialListfiles.php index 6b54fe897b..3715b8b6e6 100644 --- a/includes/specials/SpecialListfiles.php +++ b/includes/specials/SpecialListfiles.php @@ -170,9 +170,14 @@ class ImageListPager extends TablePager { 'img_name' => $this->msg( 'listfiles_name' )->text(), 'thumb' => $this->msg( 'listfiles_thumb' )->text(), 'img_size' => $this->msg( 'listfiles_size' )->text(), - 'img_user_text' => $this->msg( 'listfiles_user' )->text(), - 'img_description' => $this->msg( 'listfiles_description' )->text(), ); + if ( is_null( $this->mUserName ) ) { + // Do not show username if filtering by username + $this->mFieldNames['img_user_text'] = $this->msg( 'listfiles_user' )->text(); + } + // img_description down here, in order so that its still after the username field. + $this->mFieldNames['img_description'] = $this->msg( 'listfiles_description' )->text(); + if ( !$wgMiserMode && !$this->mShowAll ) { $this->mFieldNames['count'] = $this->msg( 'listfiles_count' )->text(); } -- 2.20.1