MediaWiki master
|
Tools for dealing with other locally-hosted wikis. More...
Static Public Member Functions | |
static | foreignUserLink ( $wikiID, $user, $text=null) |
Convenience method to get a link to a user page on a foreign wiki. | |
static | getCanonicalServerInfoForAllWikis () |
Get canonical server info for all local wikis in the map that have one. | |
static | getCurrentWikiDbDomain () |
static | getCurrentWikiId () |
static | getForeignURL ( $wikiID, $page, $fragmentId=null) |
Convenience method to get a url to a page on a foreign wiki. | |
static | getWiki ( $wikiID) |
Get a WikiReference object for $wikiID. | |
static | getWikiFromUrl ( $url) |
static | getWikiIdFromDbDomain ( $domain) |
Get the wiki ID of a database domain. | |
static | getWikiName ( $wikiID) |
Convenience to get the wiki's display name. | |
static | isCurrentWikiDbDomain ( $domain) |
static | isCurrentWikiId ( $wikiId) |
static | makeForeignLink ( $wikiID, $page, $text=null) |
Convenience method to get a link to a page on a foreign wiki. | |
Tools for dealing with other locally-hosted wikis.
Definition at line 31 of file WikiMap.php.
|
static |
Convenience method to get a link to a user page on a foreign wiki.
string | $wikiID | Wiki's id (generally database name) |
string | $user | User name (must be normalised before calling this function!) |
string | null | $text | Link's text; optional, default to "User:$user" |
Definition at line 139 of file WikiMap.php.
References MediaWiki\WikiMap\WikiMap\makeForeignLink().
|
static |
Get canonical server info for all local wikis in the map that have one.
Definition at line 197 of file WikiMap.php.
References $url, $wgCanonicalServer, $wgLocalDatabases, MediaWiki\WikiMap\WikiMap\getCurrentWikiId(), MediaWiki\MediaWikiServices\getInstance(), MediaWiki\WikiMap\WikiMap\getWiki(), and wfGetUrlUtils().
|
static |
Definition at line 302 of file WikiMap.php.
References $wgDBmwschema, $wgDBname, and $wgDBprefix.
Referenced by MediaWiki\WikiMap\WikiMap\isCurrentWikiDbDomain().
|
static |
Definition at line 312 of file WikiMap.php.
References MediaWiki\WikiMap\WikiMap\getWikiIdFromDbDomain().
Referenced by MediaWiki\WikiMap\WikiMap\getCanonicalServerInfoForAllWikis(), and MediaWiki\WikiMap\WikiMap\getWikiFromUrl().
|
static |
Convenience method to get a url to a page on a foreign wiki.
string | $wikiID | Wiki's id (generally database name) |
string | $page | Page name (must be normalised before calling this function!) |
string | null | $fragmentId |
Definition at line 180 of file WikiMap.php.
References MediaWiki\WikiMap\WikiMap\getWiki().
Referenced by MediaWiki\WikiMap\WikiMap\makeForeignLink().
|
static |
Get a WikiReference object for $wikiID.
string | $wikiID | Wiki's id (generally database name) |
Definition at line 39 of file WikiMap.php.
Referenced by MediaWiki\WikiMap\WikiMap\getCanonicalServerInfoForAllWikis(), MediaWiki\WikiMap\WikiMap\getForeignURL(), and MediaWiki\WikiMap\WikiMap\getWikiName().
|
static |
string | $url |
Definition at line 233 of file WikiMap.php.
References $url, $wgCanonicalServer, MediaWiki\WikiMap\WikiMap\getCurrentWikiId(), and wfGetUrlUtils().
|
static |
Get the wiki ID of a database domain.
This is like DatabaseDomain::getId() without encoding (for legacy reasons) and without the schema if it is the generic installer default of "mediawiki"
string | DatabaseDomain | $domain |
Definition at line 278 of file WikiMap.php.
Referenced by MediaWiki\WikiMap\WikiMap\getCurrentWikiId().
|
static |
Convenience to get the wiki's display name.
string | $wikiID | Wiki's id (generally database name) |
Definition at line 126 of file WikiMap.php.
References MediaWiki\WikiMap\WikiMap\getWiki().
|
static |
DatabaseDomain | string | $domain |
Definition at line 321 of file WikiMap.php.
References MediaWiki\WikiMap\WikiMap\getCurrentWikiDbDomain().
|
static |
string | $wikiId |
Definition at line 330 of file WikiMap.php.
|
static |
Convenience method to get a link to a page on a foreign wiki.
string | $wikiID | Wiki's id (generally database name) |
string | $page | Page name (must be normalised before calling this function!) |
string | null | $text | Link's text; optional, default to $page |
Definition at line 151 of file WikiMap.php.
References $url, $wgTitle, MediaWiki\WikiMap\WikiMap\getForeignURL(), MediaWiki\MediaWikiServices\getInstance(), and MediaWiki\SpecialPage\SpecialPage\getTitleFor().
Referenced by MediaWiki\WikiMap\WikiMap\foreignUserLink().