Index: branches/wmf/1.16wmf4/includes/specials/SpecialRandompage.php |
— | — | @@ -33,7 +33,7 @@ |
34 | 34 | } |
35 | 35 | |
36 | 36 | public function execute( $par ) { |
37 | | - global $wgOut, $wgContLang; |
| 37 | + global $wgOut, $wgContLang, $wgRequest; |
38 | 38 | |
39 | 39 | if ($par) { |
40 | 40 | $this->setNamespace( $wgContLang->getNsIndex( $par ) ); |
— | — | @@ -48,7 +48,9 @@ |
49 | 49 | return; |
50 | 50 | } |
51 | 51 | |
52 | | - $query = $this->isRedirect() ? 'redirect=no' : ''; |
| 52 | + $redirectParam = $this->isRedirect() ? array( 'redirect' => 'no' ) : array(); |
| 53 | + $query = array_merge( $wgRequest->getValues(), $redirectParam ); |
| 54 | + unset( $query['title'] ); |
53 | 55 | $wgOut->redirect( $title->getFullUrl( $query ) ); |
54 | 56 | } |
55 | 57 | |