From: Roan Kattouw Date: Fri, 9 Mar 2012 23:27:28 +0000 (+0000) Subject: (bug 34521) Returning to the previous page after logging in loses any array-valued... X-Git-Tag: 1.31.0-rc.0~24308 X-Git-Url: http://git.cyclocoop.org//%27%40script%40/%27?a=commitdiff_plain;h=f5f30aa95913a47c480fea5b7c1f431aa118a71d;p=lhc%2Fweb%2Fwiklou.git (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 --- 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; }