user: Remove use of Message:text() from User::isUsableName()
authorTimo Tijhof <krinklemail@gmail.com>
Sat, 29 Sep 2018 01:01:55 +0000 (02:01 +0100)
committerTimo Tijhof <krinklemail@gmail.com>
Sat, 29 Sep 2018 01:09:35 +0000 (02:09 +0100)
commitadf774f0b1881a18b751c73a0efad948e8d68505
treedaa9ec57ea0898a9cb16259013ccbcc5136a3f03
parent0560dd430f8a2595b01226ef471650f4ea144031
user: Remove use of Message:text() from User::isUsableName()

None of the current translations use of "&", "{" or "[", which
presumably means they don't require tranformation. I'd also
very much prefer such dynamic constructs not be added into
this system which would make it rather unpredictable given these
reserved usernames shouldn't change from time to time.

The only match for the below command is qqq.json,

> $ git grep -E '"(double-redirect-fixer|usermessage-editor|\
> proxyblocker|sorbs|spambot.username|autochange-username)"\
> ' | grep -E '[{&[]'

This code was originally introduced with r37928 (5ad5cb4f0a64),
which used wfMsgForContent() and made no explicit mention of
transformation, it just happened to be the default. Later, when
that function was deprecated, it got batch-replaced by
->inContentLanguage()->text().

Bug: T189966
Change-Id: Ia4ddf215e83f15de552f8311b9e737559c72b49a
includes/user/User.php