]> scripts.mit.edu Git - autoinstalls/mediawiki.git/blobdiff - includes/WikiMap.php
MediaWiki 1.17.0
[autoinstalls/mediawiki.git] / includes / WikiMap.php
index 878e165fb5f911f107f31a5a3e6e3ca92cc4f07b..e12f7abe826436665c0856edca646cec7cc208be 100644 (file)
@@ -12,7 +12,7 @@ class WikiMap {
         * @return WikiReference object or null if the wiki was not found
         */
        public static function getWiki( $wikiID ) {
-               global $wgConf, $IP;
+               global $wgConf;
 
                $wgConf->loadFullData();
 
@@ -68,12 +68,14 @@ class WikiMap {
                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 );
        }
@@ -88,8 +90,9 @@ class WikiMap {
        public static function getForeignURL( $wikiID, $page ) {
                $wiki = WikiMap::getWiki( $wikiID );
                
-               if ( $wiki )
+               if ( $wiki ) {
                        return $wiki->getUrl( $page );
+               }
                        
                return false;
        }