Merge "Let Html::element do the HTML encoding"
[lhc/web/wiklou.git] / includes / api / ApiTag.php
index e0c7a28..aff0183 100644 (file)
@@ -20,7 +20,7 @@
  */
 
 use MediaWiki\MediaWikiServices;
-use MediaWiki\Storage\RevisionStore;
+use MediaWiki\Revision\RevisionStore;
 
 /**
  * @ingroup API
@@ -40,8 +40,10 @@ class ApiTag extends ApiBase {
                // make sure the user is allowed
                $this->checkUserRightsAny( 'changetags' );
 
-               if ( $user->isBlocked() ) {
-                       $this->dieBlocked( $user->getBlock() );
+               // @TODO Use PermissionManager::isBlockedFrom() instead.
+               $block = $user->getBlock();
+               if ( $block ) {
+                       $this->dieBlocked( $block );
                }
 
                // Check if user can add tags