From: Brion Vibber Date: Sat, 1 Jul 2006 17:08:51 +0000 (+0000) Subject: * (bug 502) Avoid silly tabs on bad title by using virtual special page X-Git-Tag: 1.31.0-rc.0~56490 X-Git-Url: http://git.cyclocoop.org/data/Luca_Pacioli_%28Gemaelde%29.jpeg?a=commitdiff_plain;h=581eea8b1341d20093443a5bee7a0257605b1ac9;p=lhc%2Fweb%2Fwiklou.git * (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 --- 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' ) &&