AbstractBlock::setReason now accepts a string, Message or CommentStoreComment. The CommentStoreComment is accessed via AbstractBlock::getReasonComment. AbstractBlock::getReason returns the reason as a string, with the language and format consistent with how block reasons were built before this commit. This method is deprecated, since it makes assumptions about the language and format needed. The deprecated mReason property is no longer public. Doing this (and T227005) will remove the implicit dependency of BlockManager::getUserBlock on language, which causes a recursion error if the block is checked before the user has loaded. It also provides a mechanism for getting the block reason in a language specified by the caller. (This does not apply to DatabaseBlock reasons entered via the Special:Block form, which were not and are still not translatable.) This commit also updates authentication classes to return the translated reason. Bug: T227007 Change-Id: Iec36876e930dff96a256aebbdc39cbfb331c244e |
||
|---|---|---|
| .. | ||
| Restriction | ||
| BlockErrorFormatterTest.php | ||
| BlockManagerTest.php | ||
| BlockRestrictionStoreTest.php | ||
| CompositeBlockTest.php | ||
| DatabaseBlockTest.php | ||