Helper tools for dealing with other locally-hosted wikis.
More...
Helper tools for dealing with other locally-hosted wikis.
Definition at line 29 of file WikiMap.php.
◆ foreignUserLink()
static WikiMap::foreignUserLink |
( |
|
$wikiID, |
|
|
|
$user, |
|
|
|
$text = null |
|
) |
| |
|
static |
Convenience to get a link to a user page on a foreign wiki.
- Parameters
-
string | $wikiID | Wiki'd 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" |
- Returns
- string HTML link or false if the wiki was not found
Definition at line 137 of file WikiMap.php.
◆ getCanonicalServerInfoForAllWikis()
static WikiMap::getCanonicalServerInfoForAllWikis |
( |
| ) |
|
|
static |
◆ getCurrentWikiDbDomain()
static WikiMap::getCurrentWikiDbDomain |
( |
| ) |
|
|
static |
◆ getCurrentWikiId()
static WikiMap::getCurrentWikiId |
( |
| ) |
|
|
static |
◆ getForeignURL()
static WikiMap::getForeignURL |
( |
|
$wikiID, |
|
|
|
$page, |
|
|
|
$fragmentId = null |
|
) |
| |
|
static |
Convenience to get a url to a page on a foreign wiki.
- Parameters
-
string | $wikiID | Wiki'd id (generally database name) |
string | $page | Page name (must be normalised before calling this function!) |
string | null | $fragmentId | |
- Returns
- string|bool URL or false if the wiki was not found
Definition at line 171 of file WikiMap.php.
◆ getWiki()
static WikiMap::getWiki |
( |
|
$wikiID | ) |
|
|
static |
Get a WikiReference object for $wikiID.
- Parameters
-
string | $wikiID | Wiki'd id (generally database name) |
- Returns
- WikiReference|null WikiReference object or null if the wiki was not found
Definition at line 37 of file WikiMap.php.
◆ getWikiFromUrl()
static WikiMap::getWikiFromUrl |
( |
|
$url | ) |
|
|
static |
◆ getWikiIdFromDbDomain()
static WikiMap::getWikiIdFromDbDomain |
( |
|
$domain | ) |
|
|
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"
- See also
- $wgDBmwschema
-
PostgresInstaller
- Parameters
-
string | DatabaseDomain | $domain | |
- Returns
- string
- Since
- 1.31
Definition at line 269 of file WikiMap.php.
◆ getWikiName()
static WikiMap::getWikiName |
( |
|
$wikiID | ) |
|
|
static |
Convenience to get the wiki's display name.
- Todo:
- We can give more info than just the wiki id!
- Parameters
-
string | $wikiID | Wiki'd id (generally database name) |
- Returns
- string|int Wiki's name or $wiki_id if the wiki was not found
Definition at line 120 of file WikiMap.php.
◆ getWikiReferenceFromWgConf()
static WikiMap::getWikiReferenceFromWgConf |
( |
|
$wikiID | ) |
|
|
staticprivate |
◆ getWikiWikiReferenceFromSites()
static WikiMap::getWikiWikiReferenceFromSites |
( |
|
$wikiID | ) |
|
|
staticprivate |
◆ isCurrentWikiDbDomain()
static WikiMap::isCurrentWikiDbDomain |
( |
|
$domain | ) |
|
|
static |
- Parameters
-
DatabaseDomain | string | $domain | |
- Returns
- bool Whether $domain matches the DB domain of the current wiki
- Since
- 1.33
Definition at line 312 of file WikiMap.php.
◆ isCurrentWikiId()
static WikiMap::isCurrentWikiId |
( |
|
$wikiId | ) |
|
|
static |
- Parameters
-
- Returns
- bool Whether $wikiId matches the wiki ID of the current wiki
- Since
- 1.33
Definition at line 321 of file WikiMap.php.
◆ makeForeignLink()
static WikiMap::makeForeignLink |
( |
|
$wikiID, |
|
|
|
$page, |
|
|
|
$text = null |
|
) |
| |
|
static |
Convenience to get a link to a page on a foreign wiki.
- Parameters
-
string | $wikiID | Wiki'd 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 |
- Returns
- string|false HTML link or false if the wiki was not found
Definition at line 149 of file WikiMap.php.
References Linker\makeExternalLink().
The documentation for this class was generated from the following file: