Index: trunk/phase3/includes/actions/PurgeAction.php |
— | — | @@ -25,6 +25,8 @@ |
26 | 26 | |
27 | 27 | class PurgeAction extends FormAction { |
28 | 28 | |
| 29 | + private $redirectParams; |
| 30 | + |
29 | 31 | public function getName() { |
30 | 32 | return 'purge'; |
31 | 33 | } |
— | — | @@ -65,9 +67,14 @@ |
66 | 68 | $this->checkCanExecute( $this->getUser() ); |
67 | 69 | |
68 | 70 | if ( $this->getUser()->isAllowed( 'purge' ) ) { |
| 71 | + $this->redirectParams = wfArrayToCGI( array_diff_key( |
| 72 | + $this->getRequest()->getQueryValues(), |
| 73 | + array( 'title' => null, 'action' => null ) |
| 74 | + ) ); |
69 | 75 | $this->onSubmit( array() ); |
70 | 76 | $this->onSuccess(); |
71 | 77 | } else { |
| 78 | + $this->redirectParams = $this->getRequest()->getVal( 'redirectparams', '' ); |
72 | 79 | $form = $this->getForm(); |
73 | 80 | if ( $form->show() ) { |
74 | 81 | $this->onSuccess(); |
— | — | @@ -88,6 +95,6 @@ |
89 | 96 | } |
90 | 97 | |
91 | 98 | public function onSuccess() { |
92 | | - $this->getOutput()->redirect( $this->getTitle()->getFullUrl( $this->getRequest()->getVal( 'redirectparams', '' ) ) ); |
| 99 | + $this->getOutput()->redirect( $this->getTitle()->getFullUrl( $this->redirectParams ) ); |
93 | 100 | } |
94 | 101 | } |