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 "Follow-up 3535a5f327: Remove old CSS now caches have expired"
[lhc/web/wiklou.git]
/
includes
/
api
/
ApiRevisionDelete.php
diff --git
a/includes/api/ApiRevisionDelete.php
b/includes/api/ApiRevisionDelete.php
index
6121c3d
..
1ee91c2
100644
(file)
--- a/
includes/api/ApiRevisionDelete.php
+++ b/
includes/api/ApiRevisionDelete.php
@@
-21,7
+21,7
@@
* @since 1.23
*/
* @since 1.23
*/
-use MediaWiki\
Storage
\RevisionRecord;
+use MediaWiki\
Revision
\RevisionRecord;
/**
* API interface to RevDel. The API equivalent of Special:RevisionDelete.
/**
* API interface to RevDel. The API equivalent of Special:RevisionDelete.
@@
-38,8
+38,10
@@
class ApiRevisionDelete extends ApiBase {
$user = $this->getUser();
$this->checkUserRightsAny( RevisionDeleter::getRestriction( $params['type'] ) );
$user = $this->getUser();
$this->checkUserRightsAny( RevisionDeleter::getRestriction( $params['type'] ) );
- if ( $user->isBlocked() ) {
- $this->dieBlocked( $user->getBlock() );
+ // @TODO Use PermissionManager::isBlockedFrom() instead.
+ $block = $user->getBlock();
+ if ( $block ) {
+ $this->dieBlocked( $block );
}
if ( !$params['ids'] ) {
}
if ( !$params['ids'] ) {
@@
-116,7
+118,6
@@
class ApiRevisionDelete extends ApiBase {
}
$list->reloadFromMaster();
}
$list->reloadFromMaster();
- // phpcs:ignore Generic.CodeAnalysis.ForLoopWithTestFunctionCall
for ( $item = $list->reset(); $list->current(); $item = $list->next() ) {
$data['items'][$item->getId()] += $item->getApiData( $this->getResult() );
}
for ( $item = $list->reset(); $list->current(); $item = $list->next() ) {
$data['items'][$item->getId()] += $item->getApiData( $this->getResult() );
}