Page MenuHomePhabricator

bug_21776.patch

Authored By
bzimport
Nov 21 2014, 10:48 PM
Size
1 KB
Referenced Files
None
Subscribers
None

bug_21776.patch

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

File Metadata

Mime Type
text/x-diff
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5560
Default Alt Text
bug_21776.patch (1 KB)

Event Timeline