if ( !is_null( $user ) ) {
if ( !$user->isAllowed( 'applychangetags' ) ) {
return Status::newFatal( 'tags-apply-no-permission' );
- } elseif ( $user->isBlocked() ) {
+ } elseif ( $user->getBlock() ) {
+ // @TODO Ensure that the block does not apply to the `applychangetags`
+ // right.
return Status::newFatal( 'tags-apply-blocked', $user->getName() );
}
}
if ( !is_null( $user ) ) {
if ( !$user->isAllowed( 'changetags' ) ) {
return Status::newFatal( 'tags-update-no-permission' );
- } elseif ( $user->isBlocked() ) {
+ } elseif ( $user->getBlock() ) {
+ // @TODO Ensure that the block does not apply to the `changetags`
+ // right.
return Status::newFatal( 'tags-update-blocked', $user->getName() );
}
}
if ( !is_null( $user ) ) {
if ( !$user->isAllowed( 'managechangetags' ) ) {
return Status::newFatal( 'tags-manage-no-permission' );
- } elseif ( $user->isBlocked() ) {
+ } elseif ( $user->getBlock() ) {
+ // @TODO Ensure that the block does not apply to the `managechangetags`
+ // right.
return Status::newFatal( 'tags-manage-blocked', $user->getName() );
}
}
if ( !is_null( $user ) ) {
if ( !$user->isAllowed( 'managechangetags' ) ) {
return Status::newFatal( 'tags-manage-no-permission' );
- } elseif ( $user->isBlocked() ) {
+ } elseif ( $user->getBlock() ) {
+ // @TODO Ensure that the block does not apply to the `managechangetags`
+ // right.
return Status::newFatal( 'tags-manage-blocked', $user->getName() );
}
}
if ( !is_null( $user ) ) {
if ( !$user->isAllowed( 'managechangetags' ) ) {
return Status::newFatal( 'tags-manage-no-permission' );
- } elseif ( $user->isBlocked() ) {
+ } elseif ( $user->getBlock() ) {
+ // @TODO Ensure that the block does not apply to the `managechangetags`
+ // right.
return Status::newFatal( 'tags-manage-blocked', $user->getName() );
}
}
if ( !is_null( $user ) ) {
if ( !$user->isAllowed( 'deletechangetags' ) ) {
return Status::newFatal( 'tags-delete-no-permission' );
- } elseif ( $user->isBlocked() ) {
+ } elseif ( $user->getBlock() ) {
+ // @TODO Ensure that the block does not apply to the `deletechangetags`
+ // right.
return Status::newFatal( 'tags-manage-blocked', $user->getName() );
}
}
MediaWikiServices::getInstance()->getChangeTagDefStore()->reloadMap();
}
- /**
- * Invalidates the tag statistics cache only.
- * @since 1.25
- * @deprecated since 1.33 the cache this purges no longer exists
- */
- public static function purgeTagUsageCache() {
- wfDeprecated( __METHOD__, '1.33' );
- }
-
/**
* Returns a map of any tags used on the wiki to number of edits
* tagged with them, ordered descending by the hitcount.