*/
/**
- * User-requested page cache purging.
- *
- * For users with 'purge', this will directly trigger the cache purging and
- * for users without that right, it will show a confirmation form.
+ * User-requested page cache purging
*
* @ingroup Actions
*/
}
public function onSubmit( $data ) {
- return $this->page->doPurge();
+ return $this->page->doPurge( WikiPage::PURGE_ALL );
}
- /**
- * purge is slightly weird because it can be either formed or formless depending
- * on user permissions
- */
public function show() {
$this->setHeaders();
return;
}
- if ( $user->isAllowed( 'purge' ) ) {
- // This will update the database immediately, even on HTTP GET.
- // Lots of uses may exist for this feature, so just ignore warnings.
- Profiler::instance()->getTransactionProfiler()->resetExpectations();
-
+ if ( $this->getRequest()->wasPosted() ) {
$this->redirectParams = wfArrayToCgi( array_diff_key(
$this->getRequest()->getQueryValues(),
[ 'title' => null, 'action' => null ]