Index: trunk/phase3/includes/Interwiki.php |
— | — | @@ -50,7 +50,7 @@ |
51 | 51 | unset( self::$smCache[ key( self::$smCache ) ] ); |
52 | 52 | } |
53 | 53 | self::$smCache[$prefix] = $iw; |
54 | | - return true; |
| 54 | + return ($iw != false); |
55 | 55 | } |
56 | 56 | |
57 | 57 | /** |
— | — | @@ -175,7 +175,9 @@ |
176 | 176 | $iw = false; |
177 | 177 | if( $mc && is_array( $mc ) ){ // is_array is hack for old keys |
178 | 178 | $iw = Interwiki::loadFromArray( $mc ); |
179 | | - return $iw; |
| 179 | + if( $iw ){ |
| 180 | + return $iw; |
| 181 | + } |
180 | 182 | } |
181 | 183 | |
182 | 184 | $db = wfGetDB( DB_SLAVE ); |
Index: trunk/phase3/includes/Title.php |
— | — | @@ -675,7 +675,7 @@ |
676 | 676 | $query = wfArrayToCGI( $query ); |
677 | 677 | } |
678 | 678 | |
679 | | - if ( '' == $this->mInterwiki ) { |
| 679 | + if ( '' == $this->mInterwiki || !Interwiki::isValidInterwiki( $this->mInterwiki ) ) { |
680 | 680 | $url = $this->getLocalUrl( $query, $variant ); |
681 | 681 | |
682 | 682 | // Ugly quick hack to avoid duplicate prefixes (bug 4571 etc) |