X-Git-Url: http://git.cyclocoop.org/?a=blobdiff_plain;f=includes%2Factions%2FPurgeAction.php;h=7e77846884d8710f044f8fb9e3a4e9332fd2e089;hb=5b1d551953623ed153225ebdfa630dba98536aca;hp=82cdc79ac9a0c103e6c32c84a1f1f5e4907a0962;hpb=cfcbb5e3badb2d8867170e564b1467a229a13434;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/actions/PurgeAction.php b/includes/actions/PurgeAction.php index 82cdc79ac9..7e77846884 100644 --- a/includes/actions/PurgeAction.php +++ b/includes/actions/PurgeAction.php @@ -44,14 +44,6 @@ class PurgeAction extends FormAction { return ''; } - /** - * Just get an empty form with a single submit button - * @return array - */ - protected function getFormFields() { - return array(); - } - public function onSubmit( $data ) { return $this->page->doPurge(); } @@ -66,12 +58,19 @@ class PurgeAction extends FormAction { // This will throw exceptions if there's a problem $this->checkCanExecute( $this->getUser() ); - if ( $this->getUser()->isAllowed( 'purge' ) ) { + $user = $this->getUser(); + + if ( $user->pingLimiter( 'purge' ) ) { + // TODO: Display actionthrottledtext + return; + } + + if ( $user->isAllowed( 'purge' ) ) { $this->redirectParams = wfArrayToCgi( array_diff_key( $this->getRequest()->getQueryValues(), array( 'title' => null, 'action' => null ) ) ); - if( $this->onSubmit( array() ) ) { + if ( $this->onSubmit( array() ) ) { $this->onSuccess(); } } else {