MediaWiki
1.34.4
|
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 | 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... | |
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 | null | $text | Link's text; optional, default to "User:$user" |
Definition at line 137 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 187 of file WikiMap.php.
References $cache, $wgCanonicalServer, $wgLocalDatabases, getWiki(), getWikiIdFromDbDomain(), and wfParseUrl().
|
static |
Definition at line 292 of file WikiMap.php.
References $wgDBmwschema, $wgDBname, and $wgDBprefix.
Referenced by ApiMain\__construct(), MediaWiki\Logger\Monolog\WikiProcessor\__invoke(), ApiQuerySiteinfo\appendGeneralInfo(), UserDupes\checkDupes(), WikiPage\doDeleteUpdates(), SpecialContributions\execute(), InitEditCount\execute(), CopyJobQueue\execute(), CreateAndPromote\execute(), UpdateSearchIndex\execute(), CleanupInvalidDbKeys\execute(), UpdateMediaWiki\execute(), GenerateSitemap\execute(), MediaWiki\Logger\LegacyLogger\formatAsWfDebugLog(), MediaWiki\Logger\LegacyLogger\formatAsWfLogDBError(), MediaWiki\Interwiki\ClassicInterwikiLookup\getAllPrefixesCached(), ResourceLoaderStartUpModule\getConfigSettings(), ObjectCache\getDefaultKeyspace(), MediaWiki\Interwiki\ClassicInterwikiLookup\getInterwikiCacheEntry(), MachineReadableRCFeedFormatter\getLine(), User\getNewMessageLinks(), Profiler\getProfileID(), isCurrentWikiDbDomain(), ApiMain\logRequest(), RecompressTracked\logToFile(), UserMailer\makeMsgId(), EnqueueJob\newFromLocalJobs(), TextPassDumper\openSpawn(), TableCleanup\progress(), WikiPage\purgeInterwikiCheckKey(), FileBackendGroup\register(), TextPassDumper\showReport(), BackupDumper\showReport(), JobQueueGroup\singleton(), and RecompressTracked\startChildProcs().
|
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(), and makeForeignLink().
|
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(), and getWikiName().
|
static |
string | $url |
Definition at line 223 of file WikiMap.php.
References $wgCanonicalServer, getWikiIdFromDbDomain(), and wfParseUrl().
Referenced by MediaWiki\getUrlDomainDistance().
|
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 268 of file WikiMap.php.
Referenced by MediaWiki\Logger\Monolog\WikiProcessor\__invoke(), ApiQuerySiteinfo\appendGeneralInfo(), MediaWiki\Logger\LegacyLogger\formatAsWfDebugLog(), MediaWiki\Logger\LegacyLogger\formatAsWfLogDBError(), MediaWiki\Interwiki\ClassicInterwikiLookup\getAllPrefixesCached(), JobQueueGroup\getCachedConfigVar(), getCanonicalServerInfoForAllWikis(), ResourceLoaderStartUpModule\getConfigSettings(), MediaWiki\Interwiki\ClassicInterwikiLookup\getInterwikiCacheEntry(), MachineReadableRCFeedFormatter\getLine(), User\getNewMessageLinks(), JobQueueRedis\getQueueKey(), JobQueue\getWiki(), getWikiFromUrl(), TextPassDumper\openSpawn(), FileBackendGroup\register(), JobQueueGroup\singleton(), RecompressTracked\startChildProcs(), and ExternalStoreMwstore\store().
|
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().
|
staticprivate |
string | $wikiID |
Definition at line 51 of file WikiMap.php.
References $path, and $wgConf.
Referenced by getWiki().
|
staticprivate |
string | $wikiID |
Definition at line 86 of file WikiMap.php.
References $path, and wfParseUrl().
Referenced by getWiki().
|
static |
DatabaseDomain | string | $domain |
Definition at line 303 of file WikiMap.php.
References getCurrentWikiDbDomain().
Referenced by JobQueueGroup\getCachedConfigVar(), JobQueueGroup\pop(), and JobQueueGroup\singleton().
|
static |
string | $wikiId |
Definition at line 312 of file WikiMap.php.
Referenced by UserrightsPage\fetchUser(), SiteConfiguration\getConfig(), UserRightsProxy\getDB(), User\getNewMessageRevisionId(), Skin\getNewtalks(), MediaWiki\getUrlDomainDistance(), and LocalIdLookup\isAttached().
|
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 149 of file WikiMap.php.
References getForeignURL(), and Linker\makeExternalLink().
Referenced by foreignUserLink().