* @return WikiReference object or null if the wiki was not found
*/
public static function getWiki( $wikiID ) {
- global $wgConf, $IP;
+ global $wgConf;
$wgConf->loadFullData();
global $wgUser;
$sk = $wgUser->getSkin();
- if ( !$text )
+ if ( !$text ) {
$text = $page;
+ }
$url = self::getForeignURL( $wikiID, $page );
- if ( $url === false )
+ if ( $url === false ) {
return false;
+ }
return $sk->makeExternalLink( $url, $text );
}
public static function getForeignURL( $wikiID, $page ) {
$wiki = WikiMap::getWiki( $wikiID );
- if ( $wiki )
+ if ( $wiki ) {
return $wiki->getUrl( $page );
+ }
return false;
}