return 'purge';
}
- public function getRestriction() {
- return null;
- }
-
public function requiresUnblock() {
return false;
}
}
public function onSubmit( $data ) {
- $this->page->doPurge();
- return true;
+ return $this->page->doPurge();
}
/**
- * purge is slightly wierd because it can be either formed or formless depending
+ * purge is slightly weird because it can be either formed or formless depending
* on user permissions
*/
public function show() {
$this->getRequest()->getQueryValues(),
array( 'title' => null, 'action' => null )
) );
- $this->onSubmit( array() );
- $this->onSuccess();
+ if( $this->onSubmit( array() ) ) {
+ $this->onSuccess();
+ }
} else {
$this->redirectParams = $this->getRequest()->getVal( 'redirectparams', '' );
$form = $this->getForm();
}
protected function alterForm( HTMLForm $form ) {
- $form->setSubmitText( wfMsg( 'confirm_purge_button' ) );
+ $form->setSubmitTextMsg( 'confirm_purge_button' );
}
protected function preText() {
- return wfMessage( 'confirm-purge-top' )->parse();
+ return $this->msg( 'confirm-purge-top' )->parse();
}
protected function postText() {
- return wfMessage( 'confirm-purge-bottom' )->parse();
+ return $this->msg( 'confirm-purge-bottom' )->parse();
}
public function onSuccess() {