From 581eea8b1341d20093443a5bee7a0257605b1ac9 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Sat, 1 Jul 2006 17:08:51 +0000 Subject: [PATCH] * (bug 502) Avoid silly tabs on bad title by using virtual special page patch by Ilmari Karonen http://bugzilla.wikimedia.org/attachment.cgi?id=2034 --- RELEASE-NOTES | 1 + includes/Wiki.php | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index d89a7f37f1..be7a9857b7 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -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 == diff --git a/includes/Wiki.php b/includes/Wiki.php index 59967f4375..b50f510154 100644 --- a/includes/Wiki.php +++ b/includes/Wiki.php @@ -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' ) && -- 2.20.1