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
API: Use ConvertibleTimestamp::setFakeTime for testing curtimestamp
[lhc/web/wiklou.git]
/
includes
/
api
/
ApiRevisionDelete.php
diff --git
a/includes/api/ApiRevisionDelete.php
b/includes/api/ApiRevisionDelete.php
index
1ee91c2
..
60b24f0
100644
(file)
--- a/
includes/api/ApiRevisionDelete.php
+++ b/
includes/api/ApiRevisionDelete.php
@@
-38,12
+38,6
@@
class ApiRevisionDelete extends ApiBase {
$user = $this->getUser();
$this->checkUserRightsAny( RevisionDeleter::getRestriction( $params['type'] ) );
$user = $this->getUser();
$this->checkUserRightsAny( RevisionDeleter::getRestriction( $params['type'] ) );
- // @TODO Use PermissionManager::isBlockedFrom() instead.
- $block = $user->getBlock();
- if ( $block ) {
- $this->dieBlocked( $block );
- }
-
if ( !$params['ids'] ) {
$this->dieWithError( [ 'apierror-paramempty', 'ids' ], 'paramempty_ids' );
}
if ( !$params['ids'] ) {
$this->dieWithError( [ 'apierror-paramempty', 'ids' ], 'paramempty_ids' );
}
@@
-97,6
+91,10
@@
class ApiRevisionDelete extends ApiBase {
$this->dieWithError( [ 'apierror-revdel-needtarget' ], 'needtarget' );
}
$this->dieWithError( [ 'apierror-revdel-needtarget' ], 'needtarget' );
}
+ if ( $this->getPermissionManager()->isBlockedFrom( $user, $targetObj ) ) {
+ $this->dieBlocked( $user->getBlock() );
+ }
+
$list = RevisionDeleter::createList(
$params['type'], $this->getContext(), $targetObj, $params['ids']
);
$list = RevisionDeleter::createList(
$params['type'], $this->getContext(), $targetObj, $params['ids']
);