Hard deprecate User::isAllowUsertalk
Callers should use User::getBlock and AbstractBlock::isUsertalkEditAllowed instead. Replace the only known usage left. Bug: T211276 Change-Id: I505a283433dbe32a0b8150bebb2b716bf6222475
This commit is contained in:
parent
d66e428747
commit
9065bc437d
3 changed files with 12 additions and 3 deletions
|
|
@ -675,6 +675,8 @@ because of Phabricator reports.
|
|||
- getTitleProtection()
|
||||
- flushRestrictions()
|
||||
- loadRestrictions()
|
||||
* User::isAllowUsertalk was hard deprecated. Use User::getBlock and
|
||||
AbstractBlock::isUsertalkEditAllowed instead.
|
||||
* …
|
||||
|
||||
=== Other changes in 1.37 ===
|
||||
|
|
|
|||
|
|
@ -359,7 +359,7 @@ class PermissionManager {
|
|||
}
|
||||
|
||||
// only for the purpose of the hook. We really don't need this here.
|
||||
$allowUsertalk = $user->isAllowUsertalk();
|
||||
$allowUsertalk = $block->isUsertalkEditAllowed();
|
||||
|
||||
// Allow extensions to let a blocked user access a particular page
|
||||
$this->hookRunner->onUserIsBlockedFrom( $user, $title, $blocked, $allowUsertalk );
|
||||
|
|
|
|||
|
|
@ -239,7 +239,11 @@ class User implements Authority, UserIdentity, UserEmailContact {
|
|||
*/
|
||||
public $mBlock;
|
||||
|
||||
/** @var bool */
|
||||
/**
|
||||
* TODO: This should be removed when User::isAllowUsertalk
|
||||
* is removed.
|
||||
* @var bool
|
||||
*/
|
||||
protected $mAllowUsertalk;
|
||||
|
||||
/** @var AbstractBlock|bool */
|
||||
|
|
@ -4264,9 +4268,12 @@ class User implements Authority, UserIdentity, UserEmailContact {
|
|||
/**
|
||||
* Checks if usertalk is allowed
|
||||
*
|
||||
* @return bool
|
||||
* @deprecated since 1.37 Use AbstractBlock::isUsertalkEditAllowed
|
||||
*
|
||||
* @return bool|null Returns null when no block has been loaded
|
||||
*/
|
||||
public function isAllowUsertalk() {
|
||||
wfDeprecated( __METHOD__, '1.37' );
|
||||
return $this->mAllowUsertalk;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue