Only redirect to canonical title on view URLs.

This commit is contained in:
Brion Vibber 2004-02-01 04:51:50 +00:00
parent db820a9f14
commit a21c4e109f

View file

@ -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() ) {