Index: branches/REL1_18/phase3/includes/Wiki.php |
— | — | @@ -147,8 +147,10 @@ |
148 | 148 | array( &$title, null, &$output, &$user, $request, $this ) ); |
149 | 149 | |
150 | 150 | // 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' ) ); |
153 | 155 | // Die now before we mess up $wgArticle and the skin stops working |
154 | 156 | throw new ErrorPageError( 'badtitle', 'badtitletext' ); |
155 | 157 | // If the user is not logged in, the Namespace:title of the article must be in |