r102202 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r102201‎ | r102202 | r102203 >
Date:22:59, 6 November 2011
Author:platonides
Status:ok
Tags:
Comment:
Bug 31886: Wrong titles redirecting to Special:Badtitle in the 1.18 deployment
MFT r98764 to 1.18
Modified paths:
  • /branches/REL1_18/phase3/includes/Wiki.php (modified) (history)

Diff [purge]

Index: branches/REL1_18/phase3/includes/Wiki.php
@@ -147,8 +147,10 @@
148148 array( &$title, null, &$output, &$user, $request, $this ) );
149149
150150 // Invalid titles. Bug 21776: The interwikis must redirect even if the page name is empty.
151 - if ( is_null( $title ) || ( ( $title->getDBkey() == '' ) && ( $title->getInterwiki() == '' ) ) ) {
152 - $this->context->title = SpecialPage::getTitleFor( 'Badtitle' );
 151+ if ( is_null( $title ) || ( $title->getDBkey() == '' && $title->getInterwiki() == '' ) ||
 152+ $title->isSpecial( 'Badtitle' ) )
 153+ {
 154+ $this->context->setTitle( SpecialPage::getTitleFor( 'Badtitle' ) );
153155 // Die now before we mess up $wgArticle and the skin stops working
154156 throw new ErrorPageError( 'badtitle', 'badtitletext' );
155157 // If the user is not logged in, the Namespace:title of the article must be in

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r98764Also catch Special:Badtitle to display the "Bad title" error message since th...ialex14:04, 3 October 2011

Status & tagging log