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 "jsminplus: Fix JSNode memory leak from 'continue' statements"
[lhc/web/wiklou.git]
/
includes
/
api
/
ApiPurge.php
diff --git
a/includes/api/ApiPurge.php
b/includes/api/ApiPurge.php
index
f671103
..
83227a2
100644
(file)
--- a/
includes/api/ApiPurge.php
+++ b/
includes/api/ApiPurge.php
@@
-55,11
+55,11
@@
class ApiPurge extends ApiBase {
ApiQueryBase::addTitleInfo( $r, $title );
$page = WikiPage::factory( $title );
if ( !$user->pingLimiter( 'purge' ) ) {
ApiQueryBase::addTitleInfo( $r, $title );
$page = WikiPage::factory( $title );
if ( !$user->pingLimiter( 'purge' ) ) {
- $page->doPurge(); // Directly purge and skip the UI part of purge().
+ // Directly purge and skip the UI part of purge()
+ $page->doPurge();
$r['purged'] = true;
} else {
$r['purged'] = true;
} else {
- $error = $this->parseMsg( [ 'actionthrottledtext' ] );
- $this->setWarning( $error['info'] );
+ $this->addWarning( 'apierror-ratelimited' );
}
if ( $forceLinkUpdate || $forceRecursiveLinkUpdate ) {
}
if ( $forceLinkUpdate || $forceRecursiveLinkUpdate ) {
@@
-103,8
+103,7
@@
class ApiPurge extends ApiBase {
}
}
} else {
}
}
} else {
- $error = $this->parseMsg( [ 'actionthrottledtext' ] );
- $this->setWarning( $error['info'] );
+ $this->addWarning( 'apierror-ratelimited' );
$forceLinkUpdate = false;
}
}
$forceLinkUpdate = false;
}
}
@@
-149,8
+148,7
@@
class ApiPurge extends ApiBase {
}
public function mustBePosted() {
}
public function mustBePosted() {
- // Anonymous users are not allowed a non-POST request
- return !$this->getUser()->isAllowed( 'purge' );
+ return true;
}
public function getAllowedParams( $flags = 0 ) {
}
public function getAllowedParams( $flags = 0 ) {
@@
-178,6
+176,6
@@
class ApiPurge extends ApiBase {
}
public function getHelpUrls() {
}
public function getHelpUrls() {
- return 'https://www.mediawiki.org/wiki/API:Purge';
+ return 'https://www.mediawiki.org/wiki/
Special:MyLanguage/
API:Purge';
}
}
}
}