Slight adjustment to self-interwiki fix: disallow empty title links
authorBrion Vibber <brion@users.mediawiki.org>
Sat, 27 Nov 2004 09:03:16 +0000 (09:03 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Sat, 27 Nov 2004 09:03:16 +0000 (09:03 +0000)
includes/Title.php

index 7615050..435c534 100644 (file)
@@ -1111,6 +1111,11 @@ class Title {
        
                                                # Redundant interwiki prefix to the local wiki
                                                if ( 0 == strcasecmp( $this->mInterwiki, $wgLocalInterwiki ) ) {
+                                                       if( $t == '' ) {
+                                                               # Can't have an empty self-link
+                                                               wfProfileOut( $fname );
+                                                               return false;
+                                                       }
                                                        $this->mInterwiki = '';
                                                        $firstPass = false;
                                                        # Do another namespace split...