Add isCurrentWikiId()/isCurrentWikiDomain()/getCurrentWikiDomain() to WikiMap
[lhc/web/wiklou.git] / includes / MediaWiki.php
index bc57637..99b1a78 100644 (file)
@@ -684,9 +684,10 @@ class MediaWiki {
         */
        private static function getUrlDomainDistance( $url ) {
                $clusterWiki = WikiMap::getWikiFromUrl( $url );
-               if ( $clusterWiki === wfWikiID() ) {
+               if ( WikiMap::isCurrentWikiId( $clusterWiki ) ) {
                        return 'local'; // the current wiki
-               } elseif ( $clusterWiki !== false ) {
+               }
+               if ( $clusterWiki !== false ) {
                        return 'remote'; // another wiki in this cluster/farm
                }