MediaWiki
1.30.0
|
Helper tools for dealing with other locally-hosted wikis. More...
Static Public Member Functions | |
static | foreignUserLink ( $wikiID, $user, $text=null) |
Convenience to get a link to a user page on a foreign wiki. More... | |
static | getCanonicalServerInfoForAllWikis () |
Get canonical server info for all local wikis in the map that have one. More... | |
static | getForeignURL ( $wikiID, $page, $fragmentId=null) |
Convenience to get a url to a page on a foreign wiki. More... | |
static | getWiki ( $wikiID) |
Get a WikiReference object for $wikiID. More... | |
static | getWikiFromUrl ( $url) |
static | getWikiIdFromDomain ( $domain) |
Get the wiki ID of a database domain. More... | |
static | getWikiName ( $wikiID) |
Convenience to get the wiki's display name. More... | |
static | makeForeignLink ( $wikiID, $page, $text=null) |
Convenience to get a link to a page on a foreign wiki. More... | |
Static Private Member Functions | |
static | getWikiReferenceFromWgConf ( $wikiID) |
static | getWikiWikiReferenceFromSites ( $wikiID) |
Helper tools for dealing with other locally-hosted wikis.
Definition at line 29 of file WikiMap.php.
|
static |
Convenience to get a link to a user page on a foreign wiki.
string | $wikiID | Wiki'd id (generally database name) |
string | $user | User name (must be normalised before calling this function!) |
string | $text | Link's text; optional, default to "User:$user" |
Definition at line 137 of file WikiMap.php.
References makeForeignLink().
Referenced by RightsLogFormatter\makePageLink(), and WikiMapTest\testForeignUserLink().
|
static |
Get canonical server info for all local wikis in the map that have one.
Definition at line 187 of file WikiMap.php.
References $cache, $wgCanonicalServer, $wgLocalDatabases, as, getWiki(), global, wfParseUrl(), and wfWikiID().
Referenced by WikiMapTest\testGetCanonicalServerInfoForAllWikis().
|
static |
Convenience to get a url to a page on a foreign wiki.
string | $wikiID | Wiki'd id (generally database name) |
string | $page | Page name (must be normalised before calling this function!) |
string | null | $fragmentId |
Definition at line 171 of file WikiMap.php.
References getWiki().
Referenced by Linker\makeCommentLink(), makeForeignLink(), and WikiMapTest\testGetForeignURL().
|
static |
Get a WikiReference object for $wikiID.
string | $wikiID | Wiki'd id (generally database name) |
Definition at line 37 of file WikiMap.php.
References getWikiReferenceFromWgConf(), and getWikiWikiReferenceFromSites().
Referenced by getCanonicalServerInfoForAllWikis(), getForeignURL(), getWikiName(), and WikiMapTest\testGetWiki().
|
static |
string | $url |
Definition at line 222 of file WikiMap.php.
References as, and wfParseUrl().
Referenced by MediaWiki\getUrlDomainDistance(), and WikiMapTest\testGetWikiFromUrl().
|
static |
Get the wiki ID of a database domain.
This is like DatabaseDomain::getId() without encoding (for legacy reasons)
string | DatabaseDomain | $domain |
Definition at line 252 of file WikiMap.php.
Referenced by LinksDeletionUpdate\getAsJobSpecification(), LinksUpdate\getAsJobSpecification(), and WikiMapTest\testGetWikiIdFromDomain().
|
static |
Convenience to get the wiki's display name.
string | $wikiID | Wiki'd id (generally database name) |
Definition at line 120 of file WikiMap.php.
References getWiki().
Referenced by WikiMapTest\testGetWikiName().
|
staticprivate |
string | $wikiID |
Definition at line 51 of file WikiMap.php.
References $path, $wgConf, global, and list.
Referenced by getWiki().
|
staticprivate |
string | $wikiID |
Definition at line 86 of file WikiMap.php.
References $path, and wfParseUrl().
Referenced by getWiki().
|
static |
Convenience to get a link to a page on a foreign wiki.
string | $wikiID | Wiki'd id (generally database name) |
string | $page | Page name (must be normalised before calling this function!) |
string | $text | Link's text; optional, default to $page |
Definition at line 149 of file WikiMap.php.
References getForeignURL(), and Linker\makeExternalLink().
Referenced by foreignUserLink(), and WikiMapTest\testMakeForeignLink().