From: Daimona Eaytoy Date: Tue, 8 May 2018 09:44:06 +0000 (+0200) Subject: Replace underscores with spaces in DeletedContribs form X-Git-Tag: 1.34.0-rc.0~4278^2 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/banques/One?a=commitdiff_plain;h=313237cb56d1dd66ddad20e061a20376e8bebb41;p=lhc%2Fweb%2Fwiklou.git 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 --- 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' );