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() );
}
}
* @param int|null $rc_id The rc_id of the change to add the tags to
* @param int|null $rev_id The rev_id of the change to add the tags to
* @param int|null $log_id The log_id of the change to add the tags to
- * @param string $params Params to put in the ct_params field of table
+ * @param string|null $params Params to put in the ct_params field of table
* 'change_tag' when adding tags
* @param string $reason Comment for the log
* @param User $user Who to give credit for the action
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.