Only redirect to canonical title on view URLs.
This commit is contained in:
parent
db820a9f14
commit
a21c4e109f
1 changed files with 1 additions and 1 deletions
|
|
@ -61,7 +61,7 @@ if ( "" != $search ) {
|
|||
} else if( !$wgTitle or $wgTitle->getInterwiki() != "" or $wgTitle->getDBkey() == "" ) {
|
||||
$wgTitle = Title::newFromText( wfMsg( "badtitle" ) );
|
||||
$wgOut->errorpage( "badtitle", "badtitletext" );
|
||||
} else if ( $wgTitle->getPrefixedDBKey() != $title ) {
|
||||
} else if ( ( $action == "view" ) && $wgTitle->getPrefixedDBKey() != $title ) {
|
||||
/* redirect to canonical url */
|
||||
$wgOut->redirect( wfLocalUrl( $wgTitle->getPrefixedURL() ) );
|
||||
} else if ( Namespace::getSpecial() == $wgTitle->getNamespace() ) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue