* (bug 502) Avoid silly tabs on bad title by using virtual special page
authorBrion Vibber <brion@users.mediawiki.org>
Sat, 1 Jul 2006 17:08:51 +0000 (17:08 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Sat, 1 Jul 2006 17:08:51 +0000 (17:08 +0000)
patch by Ilmari Karonen
http://bugzilla.wikimedia.org/attachment.cgi?id=2034

RELEASE-NOTES
includes/Wiki.php

index d89a7f3..be7a985 100644 (file)
@@ -620,6 +620,7 @@ Some default configuration options have changed:
   $wgImportTargetNamespace specifies the default, to be used for
   Wiktionary's 'Transwiki:' namespace etc.
 * (bug 6506) Update to German localisation (de)
+* (bug 502) Avoid silly tabs on bad title by using virtual special page
 
 
 == Compatibility ==
index 59967f4..b50f510 100644 (file)
@@ -128,7 +128,7 @@ class MediaWiki {
                        $title = Title::makeTitle( NS_SPECIAL, 'Search' );
                        wfSpecialSearch();
                } else if( !$title or $title->getDBkey() == '' ) {
-                       $title = Title::newFromText( wfMsgForContent( 'badtitle' ) );
+                       $title = Title::makeTitle( NS_SPECIAL, 'Badtitle' );
                        # Die now before we mess up $wgArticle and the skin stops working
                        throw new ErrorPageError( 'badtitle', 'badtitletext' );
                } else if ( $title->getInterwiki() != '' ) {
@@ -141,7 +141,7 @@ class MediaWiki {
                        if ( !preg_match( '/^' . preg_quote( $this->getVal('Server'), '/' ) . '/', $url ) && $title->isLocal() ) {
                                $output->redirect( $url );
                        } else {
-                               $title = Title::newFromText( wfMsgForContent( 'badtitle' ) );
+                               $title = Title::makeTitle( NS_SPECIAL, 'Badtitle' );
                                throw new ErrorPageError( 'badtitle', 'badtitletext' );
                        }
                } else if ( ( $action == 'view' ) &&