From 313237cb56d1dd66ddad20e061a20376e8bebb41 Mon Sep 17 00:00:00 2001 From: Daimona Eaytoy Date: Tue, 8 May 2018 11:44:06 +0200 Subject: [PATCH] Replace underscores with spaces in DeletedContribs form If you go to Special:Contributions/User_Foo and click on the link to Special:DeletedContributions/User_Foo, the form field for selecting the user is populated with the value "User_Foo", which isn't pretty to see. Instead, let's replace underscores with spaces to directly show "User Foo". Change-Id: I2b144c9dbe41e2dd01bbb530dc5b43547fc4230f --- includes/specials/SpecialDeletedContributions.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/includes/specials/SpecialDeletedContributions.php b/includes/specials/SpecialDeletedContributions.php index 975d64e348..3f8771265d 100644 --- a/includes/specials/SpecialDeletedContributions.php +++ b/includes/specials/SpecialDeletedContributions.php @@ -61,7 +61,9 @@ class DeletedContributionsPage extends SpecialPage { $opts->validateIntBounds( 'limit', 0, $this->getConfig()->get( 'QueryPageDefaultLimit' ) ); if ( $par !== null ) { - $opts->setValue( 'target', $par ); + // Beautify the username + $par = User::getCanonicalName( $par, false ); + $opts->setValue( 'target', (string)$par ); } $ns = $opts->getValue( 'namespace' ); -- 2.20.1