https://www.mediawiki.org/wiki/Special:Code/MediaWiki/102202

Revision: 102202
Author:   platonides
Date:     2011-11-06 22:59:07 +0000 (Sun, 06 Nov 2011)
Log Message:
-----------
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: branches/REL1_18/phase3/includes/Wiki.php
===================================================================
--- branches/REL1_18/phase3/includes/Wiki.php   2011-11-06 22:50:32 UTC (rev 
102201)
+++ branches/REL1_18/phase3/includes/Wiki.php   2011-11-06 22:59:07 UTC (rev 
102202)
@@ -147,8 +147,10 @@
                        array( &$title, null, &$output, &$user, $request, $this 
) );
 
                // Invalid titles. Bug 21776: The interwikis must redirect even 
if the page name is empty.
-               if ( is_null( $title ) || ( ( $title->getDBkey() == '' ) && ( 
$title->getInterwiki() == '' ) ) ) {
-                       $this->context->title = SpecialPage::getTitleFor( 
'Badtitle' );
+               if ( is_null( $title ) || ( $title->getDBkey() == '' && 
$title->getInterwiki() == '' ) ||
+                       $title->isSpecial( 'Badtitle' ) )
+               {
+                       $this->context->setTitle( SpecialPage::getTitleFor( 
'Badtitle' ) );
                        // Die now before we mess up $wgArticle and the skin 
stops working
                        throw new ErrorPageError( 'badtitle', 'badtitletext' );
                // If the user is not logged in, the Namespace:title of the 
article must be in


_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to