Index: trunk/phase3/includes/actions/PurgeAction.php |
— | — | @@ -88,6 +88,6 @@ |
89 | 89 | } |
90 | 90 | |
91 | 91 | public function onSuccess() { |
92 | | - $this->getOutput()->redirect( $this->getTitle() ); |
| 92 | + $this->getOutput()->redirect( $this->getTitle()->getFullUrl( $this->getRequest()->getVal( 'redirectparams', '' ) ) ); |
93 | 93 | } |
94 | 94 | } |
Index: trunk/phase3/includes/Action.php |
— | — | @@ -285,8 +285,15 @@ |
286 | 286 | |
287 | 287 | $form = new HTMLForm( $this->fields, $this->getContext() ); |
288 | 288 | $form->setSubmitCallback( array( $this, 'onSubmit' ) ); |
289 | | - $form->addHiddenField( 'action', $this->getName() ); |
290 | 289 | |
| 290 | + // Retain query parameters (uselang etc) |
| 291 | + $form->addHiddenField( 'action', $this->getName() ); // Might not be the same as the query string |
| 292 | + $params = array_diff_key( |
| 293 | + $this->getRequest()->getQueryValues(), |
| 294 | + array( 'action' => null, 'title' => null ) |
| 295 | + ); |
| 296 | + $form->addHiddenField( 'redirectparams', wfArrayToCGI( $params ) ); |
| 297 | + |
291 | 298 | $form->addPreText( $this->preText() ); |
292 | 299 | $form->addPostText( $this->postText() ); |
293 | 300 | $this->alterForm( $form ); |