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
Remove "@author Bryan Davis" and "Brad Jorsch" annotations
[lhc/web/wiklou.git]
/
includes
/
api
/
ApiRevisionDelete.php
diff --git
a/includes/api/ApiRevisionDelete.php
b/includes/api/ApiRevisionDelete.php
index
763aef5
..
9d71a7d
100644
(file)
--- a/
includes/api/ApiRevisionDelete.php
+++ b/
includes/api/ApiRevisionDelete.php
@@
-2,7
+2,7
@@
/**
* Created on Jun 25, 2013
*
/**
* Created on Jun 25, 2013
*
- * Copyright © 2013
Brad Jorsch <bjorsch@wikimedia.org>
+ * Copyright © 2013
Wikimedia Foundation and contributors
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@
-46,6
+46,14
@@
class ApiRevisionDelete extends ApiBase {
$this->dieWithError( [ 'apierror-paramempty', 'ids' ], 'paramempty_ids' );
}
$this->dieWithError( [ 'apierror-paramempty', 'ids' ], 'paramempty_ids' );
}
+ // Check if user can add tags
+ if ( count( $params['tags'] ) ) {
+ $ableToTag = ChangeTags::canAddTagsAccompanyingChange( $params['tags'], $user );
+ if ( !$ableToTag->isOK() ) {
+ $this->dieStatus( $ableToTag );
+ }
+ }
+
$hide = $params['hide'] ?: [];
$show = $params['show'] ?: [];
if ( array_intersect( $hide, $show ) ) {
$hide = $params['hide'] ?: [];
$show = $params['show'] ?: [];
if ( array_intersect( $hide, $show ) ) {
@@
-90,9
+98,12
@@
class ApiRevisionDelete extends ApiBase {
$list = RevisionDeleter::createList(
$params['type'], $this->getContext(), $targetObj, $params['ids']
);
$list = RevisionDeleter::createList(
$params['type'], $this->getContext(), $targetObj, $params['ids']
);
- $status = $list->setVisibility(
- [ 'value' => $bitfield, 'comment' => $params['reason'], 'perItemStatus' => true ]
- );
+ $status = $list->setVisibility( [
+ 'value' => $bitfield,
+ 'comment' => $params['reason'],
+ 'perItemStatus' => true,
+ 'tags' => $params['tags']
+ ] );
$result = $this->getResult();
$data = $this->extractStatusInfo( $status );
$result = $this->getResult();
$data = $this->extractStatusInfo( $status );
@@
-165,6
+176,10
@@
class ApiRevisionDelete extends ApiBase {
ApiBase::PARAM_DFLT => 'nochange',
],
'reason' => null,
ApiBase::PARAM_DFLT => 'nochange',
],
'reason' => null,
+ 'tags' => [
+ ApiBase::PARAM_TYPE => 'tags',
+ ApiBase::PARAM_ISMULTI => true,
+ ],
];
}
];
}
@@
-184,6
+199,6
@@
class ApiRevisionDelete extends ApiBase {
}
public function getHelpUrls() {
}
public function getHelpUrls() {
- return 'https://www.mediawiki.org/wiki/API:Revisiondelete';
+ return 'https://www.mediawiki.org/wiki/
Special:MyLanguage/
API:Revisiondelete';
}
}
}
}