From 8bb062d73d40df6fd641279a7c8c29e74ebc1035 Mon Sep 17 00:00:00 2001 From: Alexandre Emsenhuber Date: Wed, 9 Dec 2009 21:47:06 +0000 Subject: [PATCH] * (bug 21803) Special:MyContributions now keeps the query string parameters As side effect: * Redirecting special pages now keep query string paramters set to "0" (e.g. for namespace) --- RELEASE-NOTES | 3 +++ includes/SpecialPage.php | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 6752aea75c..a360a3d083 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -674,6 +674,9 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN * (bug 20549) Parser tests were broken on SQLite backend * (bug 21776) Interwiki urls like http://en.wikibooks.org/wiki/cs: should give a redirect instead of a baderror. +* (bug 21803) Special:MyContributions now keeps the query string parameters +* Redirecting special pages now keep query string paramters set to "0" (e.g. + for namespace) == API changes in 1.16 == diff --git a/includes/SpecialPage.php b/includes/SpecialPage.php index f6781ed81a..a7556d7394 100644 --- a/includes/SpecialPage.php +++ b/includes/SpecialPage.php @@ -858,7 +858,7 @@ Perhaps no page aliases are defined for it?" ); global $wgRequest; $params = array(); foreach( $this->mAllowedRedirectParams as $arg ) { - if( $val = $wgRequest->getVal( $arg, false ) ) + if( ( $val = $wgRequest->getVal( $arg, null ) ) !== null ) $params[] = $arg . '=' . $val; } @@ -965,6 +965,8 @@ class SpecialMytalk extends UnlistedSpecialPage { class SpecialMycontributions extends UnlistedSpecialPage { function __construct() { parent::__construct( 'Mycontributions' ); + $this->mAllowedRedirectParams = array( 'limit', 'namespace', 'tagfilter', + 'offset', 'dir', 'year', 'month', 'feed' ); } function getRedirect( $subpage ) { -- 2.20.1