Index: trunk/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 | throw new ErrorPageError( 'badtitle', 'badtitletext' ); |
154 | 156 | // If the user is not logged in, the Namespace:title of the article must be in |
155 | 157 | // the Read array in order for the user to see it. (We have to check here to |