Special:Random now carries over query string parameters
This commit is contained in:
parent
8a24d1232e
commit
ff975f3932
2 changed files with 5 additions and 2 deletions
|
|
@ -46,6 +46,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
|
|||
* (bug 22474) {{urlencode:}} now takes an optional second paramter for type of
|
||||
escaping.
|
||||
* Special:Listfiles now supports a username parameter
|
||||
* Special:Random carries over query string parameters
|
||||
|
||||
=== Bug fixes in 1.17 ===
|
||||
* (bug 17560) Half-broken deletion moved image files to deletion archive
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ class RandomPage extends SpecialPage {
|
|||
}
|
||||
|
||||
public function execute( $par ) {
|
||||
global $wgOut, $wgContLang;
|
||||
global $wgOut, $wgContLang, $wgRequest;
|
||||
|
||||
if ($par) {
|
||||
$this->setNamespace( $wgContLang->getNsIndex( $par ) );
|
||||
|
|
@ -48,7 +48,9 @@ class RandomPage extends SpecialPage {
|
|||
return;
|
||||
}
|
||||
|
||||
$query = $this->isRedirect() ? 'redirect=no' : '';
|
||||
$redirectParam = $this->isRedirect() ? array( 'redirect' => 'no' ) : array();
|
||||
$query = array_merge( $wgRequest->getValues(), $redirectParam );
|
||||
unset( $query['title'] );
|
||||
$wgOut->redirect( $title->getFullUrl( $query ) );
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue