MediaWiki
master
|
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 | getCurrentWikiDbDomain () |
static | getCurrentWikiId () |
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 | getWikiIdFromDbDomain ( $domain) |
Get the wiki ID of a database domain. More... | |
static | getWikiName ( $wikiID) |
Convenience to get the wiki's display name. More... | |
static | isCurrentWikiDbDomain ( $domain) |
static | isCurrentWikiId ( $wikiId) |
static | makeForeignLink ( $wikiID, $page, $text=null) |
Convenience to get a link to a page on a foreign wiki. More... | |
Helper tools for dealing with other locally-hosted wikis.
Definition at line 30 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 | null | $text | Link's text; optional, default to "User:$user" |
Definition at line 134 of file WikiMap.php.
References makeForeignLink().
Referenced by RightsLogFormatter\makePageLink().
|
static |
Get canonical server info for all local wikis in the map that have one.
Definition at line 185 of file WikiMap.php.
References $wgCanonicalServer, $wgLocalDatabases, getCurrentWikiId(), getWiki(), and wfParseUrl().
|
static |
Definition at line 290 of file WikiMap.php.
References $wgDBmwschema, $wgDBname, and $wgDBprefix.
Referenced by LocalRepo\__construct(), CleanupInvalidDbKeys\execute(), CopyJobQueue\execute(), CreateAndPromote\execute(), GenerateSitemap\execute(), InitEditCount\execute(), UpdateMediaWiki\execute(), UpdateSearchIndex\execute(), Profiler\getProfileID(), isCurrentWikiDbDomain(), ApiMain\logRequest(), MediaWiki\JobQueue\JobQueueGroupFactory\makeJobQueueGroup(), TableCleanup\progress(), BackupDumper\showReport(), and TextPassDumper\showReport().
|
static |
Definition at line 300 of file WikiMap.php.
References getWikiIdFromDbDomain().
Referenced by MediaWiki\Interwiki\ClassicInterwikiLookup\__construct(), MediaWiki\Logger\Monolog\WikiProcessor\__invoke(), ApiQuerySiteinfo\appendGeneralInfo(), GrepPages\execute(), MediaWiki\Logger\LegacyLogger\formatAsWfDebugLog(), MediaWiki\Logger\LegacyLogger\formatAsWfLogDBError(), getCanonicalServerInfoForAllWikis(), MachineReadableRCFeedFormatter\getLine(), Skin\getNewtalks(), getWikiFromUrl(), and TextPassDumper\openSpawn().
|
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 168 of file WikiMap.php.
References getWiki().
Referenced by makeForeignLink().
|
static |
Get a WikiReference object for $wikiID.
string | $wikiID | Wiki'd id (generally database name) |
Definition at line 38 of file WikiMap.php.
Referenced by getCanonicalServerInfoForAllWikis(), getForeignURL(), and getWikiName().
|
static |
string | $url |
Definition at line 221 of file WikiMap.php.
References $wgCanonicalServer, getCurrentWikiId(), and wfParseUrl().
|
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 266 of file WikiMap.php.
Referenced by getCurrentWikiId(), JobQueue\getWiki(), and ExternalStoreMwstore\store().
|
static |
Convenience to get the wiki's display name.
string | $wikiID | Wiki'd id (generally database name) |
Definition at line 121 of file WikiMap.php.
References getWiki().
|
static |
DatabaseDomain | string | $domain |
Definition at line 309 of file WikiMap.php.
References getCurrentWikiDbDomain().
Referenced by JobQueueGroup\pop().
|
static |
string | $wikiId |
Definition at line 318 of file WikiMap.php.
Referenced by UserrightsPage\fetchUser(), SiteConfiguration\getConfig(), and UserRightsProxy\getDB().
|
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 | null | $text | Link's text; optional, default to $page |
Definition at line 146 of file WikiMap.php.
References getForeignURL().
Referenced by foreignUserLink().