From f5f30aa95913a47c480fea5b7c1f431aa118a71d Mon Sep 17 00:00:00 2001 From: Roan Kattouw Date: Fri, 9 Mar 2012 23:27:28 +0000 Subject: [PATCH] (bug 34521) Returning to the previous page after logging in loses any array-valued parameters in the query string. This happens because WebRequest::getValues() calls getVal() which strips arrays, even though the doc comment says that no transformation is applied. Changed getValues() to call getGPCVal() instead. The only difference is that arrays are no longer stripped, so the doc comment is no longer a lie --- RELEASE-NOTES-1.20 | 2 ++ includes/WebRequest.php | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/RELEASE-NOTES-1.20 b/RELEASE-NOTES-1.20 index afa814d980..9abc6e0589 100644 --- a/RELEASE-NOTES-1.20 +++ b/RELEASE-NOTES-1.20 @@ -45,6 +45,8 @@ production. * (bug 34929) Show the correct diff when a section edit is rejected by the spam filter * (bug 15816) Add a switch for SETting the search_path (Postgres) +* (bug 34521) Returning to the previous page after logging in loses any array- + valued parameters in the query string === API changes in 1.20 === * (bug 34316) Add ability to retrieve maximum upload size from MediaWiki API. diff --git a/includes/WebRequest.php b/includes/WebRequest.php index 33376cfc21..879edf6b1a 100644 --- a/includes/WebRequest.php +++ b/includes/WebRequest.php @@ -535,7 +535,7 @@ class WebRequest { $retVal = array(); foreach ( $names as $name ) { - $value = $this->getVal( $name ); + $value = $this->getGPCVal( $this->data, $name ); if ( !is_null( $value ) ) { $retVal[$name] = $value; } -- 2.20.1