From: Alexandre Emsenhuber Date: Thu, 26 May 2011 16:18:35 +0000 (+0000) Subject: Use WebRequest::getQueryValues() to get all query strings parameters instead of ... X-Git-Tag: 1.31.0-rc.0~29928 X-Git-Url: https://git.cyclocoop.org/%28%28?a=commitdiff_plain;h=3bc50f69840c978e81f1464f400921d39e74c39a;p=lhc%2Fweb%2Fwiklou.git Use WebRequest::getQueryValues() to get all query strings parameters instead of $_GET --- diff --git a/includes/LogEventsList.php b/includes/LogEventsList.php index 87ad6eeeee..3d24d4cfc8 100644 --- a/includes/LogEventsList.php +++ b/includes/LogEventsList.php @@ -185,8 +185,10 @@ class LogEventsList { } private function getDefaultQuery() { + global $wgRequest; + if ( !isset( $this->mDefaultQuery ) ) { - $this->mDefaultQuery = $_GET; + $this->mDefaultQuery = $wgRequest->getQueryValues(); unset( $this->mDefaultQuery['title'] ); unset( $this->mDefaultQuery['dir'] ); unset( $this->mDefaultQuery['offset'] ); diff --git a/includes/Pager.php b/includes/Pager.php index 8eb6c7c705..fb657f8df9 100644 --- a/includes/Pager.php +++ b/includes/Pager.php @@ -415,8 +415,10 @@ abstract class IndexPager implements Pager { * @return Associative array */ function getDefaultQuery() { + global $wgRequest; + if ( !isset( $this->mDefaultQuery ) ) { - $this->mDefaultQuery = $_GET; + $this->mDefaultQuery = $wgRequest->getQueryValues(); unset( $this->mDefaultQuery['title'] ); unset( $this->mDefaultQuery['dir'] ); unset( $this->mDefaultQuery['offset'] ); @@ -1025,14 +1027,16 @@ abstract class TablePager extends IndexPager { /** * Get elements for use in a method="get" form. - * Resubmits all defined elements of the $_GET array, except for a + * Resubmits all defined elements of the query string, except for a * blacklist, passed in the $blacklist parameter. * * @return String: HTML fragment */ function getHiddenFields( $blacklist = array() ) { + global $wgRequest; + $blacklist = (array)$blacklist; - $query = $_GET; + $query = $wgRequest->getQueryValues(); foreach ( $blacklist as $name ) { unset( $query[$name] ); } diff --git a/includes/SpecialPageFactory.php b/includes/SpecialPageFactory.php index c8113a68c8..ea0048c91a 100644 --- a/includes/SpecialPageFactory.php +++ b/includes/SpecialPageFactory.php @@ -435,7 +435,7 @@ class SpecialPageFactory { // generate self-links without being aware that their default name has // changed. if ( $name != $page->getLocalName() && !$context->request->wasPosted() ) { - $query = $_GET; + $query = $context->request->getQueryValues(); unset( $query['title'] ); $query = wfArrayToCGI( $query ); $title = $page->getTitle( $par );