unset( self::$smCache[ key( self::$smCache ) ] );
}
self::$smCache[$prefix] = $iw;
- return true;
+ return ($iw != false);
}
/**
$iw = false;
if( $mc && is_array( $mc ) ){ // is_array is hack for old keys
$iw = Interwiki::loadFromArray( $mc );
- return $iw;
+ if( $iw ){
+ return $iw;
+ }
}
$db = wfGetDB( DB_SLAVE );
$query = wfArrayToCGI( $query );
}
- if ( '' == $this->mInterwiki ) {
+ if ( '' == $this->mInterwiki || !Interwiki::isValidInterwiki( $this->mInterwiki ) ) {
$url = $this->getLocalUrl( $query, $variant );
// Ugly quick hack to avoid duplicate prefixes (bug 4571 etc)