Index: trunk/extensions/VariablePage/VariablePage.body.php |
— | — | @@ -30,19 +30,7 @@ |
31 | 31 | |
32 | 32 | // determine the URL to which we will redirect the user |
33 | 33 | $url = $this->determinePage( $wgVariablePagePossibilities ); |
34 | | - |
35 | | - // check if we have a pre-existing query string in the URL, merge it with our previously generated query |
36 | | - $url_parts = parse_url( $url ); |
37 | | - $url_query = parse_url( $url, PHP_URL_QUERY ); |
38 | | - if ( $url_query ) { |
39 | | - foreach ( explode( "&", $url_query ) as $params ) { |
40 | | - list( $key, $value ) = explode( "=", $params ); |
41 | | - $query_orig[ $key ] = $value; |
42 | | - } |
43 | | - $query = array_merge( $query, $query_orig ); |
44 | | - } |
45 | | - $full_query = $wgRequest->appendQueryArray( $query, true ); |
46 | | - $wgOut->redirect( $url_parts[ 'scheme' ] . '://' . $url_parts[ 'host' ] . $url_parts[ 'path' ] . '?' . $full_query ); |
| 34 | + $wgOut->redirect( wfAppendQuery( $url, $query )); |
47 | 35 | } |
48 | 36 | |
49 | 37 | /** |