diff options
Diffstat (limited to 'includes/actions/PurgeAction.php')
-rw-r--r-- | includes/actions/PurgeAction.php | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/includes/actions/PurgeAction.php b/includes/actions/PurgeAction.php index cd58889d..ed0bff7b 100644 --- a/includes/actions/PurgeAction.php +++ b/includes/actions/PurgeAction.php @@ -1,8 +1,6 @@ <?php /** - * Formats credits for articles - * - * Copyright 2004, Evan Prodromou <evan@wikitravel.org>. + * User-requested page cache purging. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -20,9 +18,16 @@ * * @file * @ingroup Actions - * @author <evan@wikitravel.org> */ +/** + * 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. + * + * @ingroup Actions + */ class PurgeAction extends FormAction { private $redirectParams; @@ -62,11 +67,11 @@ class PurgeAction extends FormAction { $this->checkCanExecute( $this->getUser() ); if ( $this->getUser()->isAllowed( 'purge' ) ) { - $this->redirectParams = wfArrayToCGI( array_diff_key( + $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 { @@ -91,6 +96,6 @@ class PurgeAction extends FormAction { } public function onSuccess() { - $this->getOutput()->redirect( $this->getTitle()->getFullUrl( $this->redirectParams ) ); + $this->getOutput()->redirect( $this->getTitle()->getFullURL( $this->redirectParams ) ); } } |