Merge "Enable email in TemporaryPasswordPrimaryAuthenticationProviderTest"
[lhc/web/wiklou.git] / includes / changetags / ChangeTags.php
index 00eed14..9146429 100644 (file)
@@ -482,7 +482,9 @@ class ChangeTags {
                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() );
                        }
                }
@@ -555,7 +557,9 @@ class ChangeTags {
                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() );
                        }
                }
@@ -604,7 +608,7 @@ class ChangeTags {
         * @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
@@ -766,7 +770,7 @@ class ChangeTags {
                                        // Return nothing.
                                        $conds[] = '0';
                                        break;
-                               };
+                               }
                        }
 
                        if ( $filterTagIds !== [] ) {
@@ -973,7 +977,9 @@ class ChangeTags {
                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() );
                        }
                }
@@ -1045,7 +1051,9 @@ class ChangeTags {
                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() );
                        }
                }
@@ -1142,7 +1150,9 @@ class ChangeTags {
                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() );
                        }
                }
@@ -1258,7 +1268,9 @@ class ChangeTags {
                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() );
                        }
                }
@@ -1458,15 +1470,6 @@ class ChangeTags {
                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.