Remove is_numeric check from Title::checkUserBlock
authorKevin Israel <pleasestand@live.com>
Wed, 3 Apr 2013 21:44:00 +0000 (17:44 -0400)
committerGerrit Code Review <gerrit@wikimedia.org>
Wed, 24 Apr 2013 01:05:23 +0000 (01:05 +0000)
commit47d10603983ef8739f1964ad1d7f0f84b7d62f8f
tree226eacc5c165d978d4aa09a3b2a19c9711528a42
parent12f5ab9a3f40128b26a72a742602740c633b6fcc
Remove is_numeric check from Title::checkUserBlock

This should allow the usernames of administrators such as "7"
to show correctly on permissions error pages.

I extracted the working code from UserBlockedError::__construct
into a separate method Block::getPermissionsError, called from
both places with context provided as an argument.

Additional changes to get the test suite to pass are included.

Bug: 46768
Change-Id: I49d973992a99e03b4e8de112b47b737037a85338
RELEASE-NOTES-1.22
includes/Block.php
includes/Exception.php
includes/Title.php
languages/Language.php
tests/phpunit/MediaWikiLangTestCase.php
tests/phpunit/includes/TitlePermissionTest.php