don't redirect to the canonical title if other parameters have been passed in $_GET
This commit is contained in:
parent
7abb986676
commit
629601a5dc
2 changed files with 7 additions and 1 deletions
|
|
@ -117,6 +117,10 @@ class WebRequest {
|
|||
|
||||
function getValues() {
|
||||
$names = func_get_args();
|
||||
if ( count( $names ) == 0 ) {
|
||||
$names = array_keys( $_REQUEST );
|
||||
}
|
||||
|
||||
$retVal = array();
|
||||
foreach ( $names as $name ) {
|
||||
$value = $this->getVal( $name );
|
||||
|
|
|
|||
|
|
@ -74,7 +74,9 @@ if ( $search = $wgRequest->getText( 'search' ) ) {
|
|||
$wgTitle = Title::newFromText( wfMsg( "badtitle" ) );
|
||||
$wgOut->errorpage( "badtitle", "badtitletext" );
|
||||
}
|
||||
} else if ( ( $action == "view" ) && $wgTitle->getPrefixedDBKey() != $title ) {
|
||||
} else if ( ( $action == "view" ) && $wgTitle->getPrefixedDBKey() != $title &&
|
||||
!count( array_diff( array_keys( $_GET ), array( 'action', 'title' ) ) ) )
|
||||
{
|
||||
/* redirect to canonical url, make it a 301 to allow caching */
|
||||
$wgOut->redirect( $wgTitle->getFullURL(), '301');
|
||||
} else if ( Namespace::getSpecial() == $wgTitle->getNamespace() ) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue