From: Roan Kattouw Date: Thu, 15 Apr 2010 11:54:16 +0000 (+0000) Subject: Special:Random now carries over query string parameters X-Git-Tag: 1.31.0-rc.0~37104 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/exercices/modifier.php?a=commitdiff_plain;h=ff975f393205cdd50c87ba23c4eb1a9fe1b915a5;p=lhc%2Fweb%2Fwiklou.git Special:Random now carries over query string parameters --- diff --git a/RELEASE-NOTES b/RELEASE-NOTES index ed91637c4c..d75078fed3 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -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 diff --git a/includes/specials/SpecialRandompage.php b/includes/specials/SpecialRandompage.php index fd3f17f2ff..ed6651fd53 100644 --- a/includes/specials/SpecialRandompage.php +++ b/includes/specials/SpecialRandompage.php @@ -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 ) ); }