dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge "Fix class name handling in DeprecationHelper"
[lhc/web/wiklou.git]
/
includes
/
api
/
ApiTag.php
diff --git
a/includes/api/ApiTag.php
b/includes/api/ApiTag.php
index
e0c7a28
..
aff0183
100644
(file)
--- a/
includes/api/ApiTag.php
+++ b/
includes/api/ApiTag.php
@@
-20,7
+20,7
@@
*/
use MediaWiki\MediaWikiServices;
*/
use MediaWiki\MediaWikiServices;
-use MediaWiki\
Storage
\RevisionStore;
+use MediaWiki\
Revision
\RevisionStore;
/**
* @ingroup API
/**
* @ingroup API
@@
-40,8
+40,10
@@
class ApiTag extends ApiBase {
// make sure the user is allowed
$this->checkUserRightsAny( 'changetags' );
// 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
}
// Check if user can add tags