r59792 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r59791‎ | r59792 | r59793 >
Date:18:28, 7 December 2009
Author:danny_b
Status:ok
Tags:
Comment:
* (bug 21776) Empty project + language interwikis do not work anymore [patch by Platonides]
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/Wiki.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Wiki.php
@@ -182,11 +182,13 @@
183183 global $wgContLang, $wgUser;
184184 $action = $this->getVal( 'Action' );
185185 $perferred = $wgContLang->getPreferredVariant( false );
186 - // Invalid titles
187 - if( is_null($title) || $title->getDBkey() == '' ) {
 186+
 187+ // Invalid titles. Bug 21776: The interwikis must redirect even if the page name is empty.
 188+ if( is_null($title) || ( ($title->getDBkey() == '') && ($title->getInterwiki() == '') ) ) {
188189 $title = SpecialPage::getTitleFor( 'Badtitle' );
189190 # Die now before we mess up $wgArticle and the skin stops working
190191 throw new ErrorPageError( 'badtitle', 'badtitletext' );
 192+
191193 // Interwiki redirects
192194 } else if( $title->getInterwiki() != '' ) {
193195 if( $rdfrom = $request->getVal( 'rdfrom' ) ) {
Index: trunk/phase3/RELEASE-NOTES
@@ -669,6 +669,7 @@
670670 * (bug 21559) "logempty" message is now wrapped in a div with class
671671 "mw-warning-logempty" when used in log extract
672672 * (bug 20549) Parser tests were broken on SQLite backend
 673+* (bug 21776) Interwiki urls like http://en.wikibooks.org/wiki/cs: should give a redirect instead of a baderror.
673674
674675 == API changes in 1.16 ==
675676

Status & tagging log