dépôts
/
lhc
/
web
/
wiklou.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0785dfa
)
Clean up ApiEditPage content handler undo logic
author
DannyS712
<DannyS712.enwiki@gmail.com>
Mon, 19 Aug 2019 02:13:32 +0000
(
02:13
+0000)
committer
DannyS712
<DannyS712.enwiki@gmail.com>
Mon, 19 Aug 2019 07:53:21 +0000
(07:53 +0000)
Bug: T230702
Change-Id: I79d528866c54f40c5adcffde8410b9e2d5336ea7
includes/api/ApiEditPage.php
patch
|
blob
|
history
diff --git
a/includes/api/ApiEditPage.php
b/includes/api/ApiEditPage.php
index
3f63a00
..
554df61
100644
(file)
--- a/
includes/api/ApiEditPage.php
+++ b/
includes/api/ApiEditPage.php
@@
-92,9
+92,8
@@
class ApiEditPage extends ApiBase {
$name = $titleObj->getPrefixedDBkey();
$model = $contentHandler->getModelID();
- if ( $params['undo'] > 0 ) {
- // allow undo via api
- } elseif ( $contentHandler->supportsDirectApiEditing() === false ) {
+ // always allow undo via api, T230702
+ if ( !( $params['undo'] > 0 ) && $contentHandler->supportsDirectApiEditing() === false ) {
$this->dieWithError( [ 'apierror-no-direct-editing', $model, $name ] );
}