MediaWiki  master
Setup.php File Reference

Include most things that are needed to make MediaWiki work. More...

Go to the source code of this file.

Variables

 $cpPosInfo
 
if(defined( 'MW_SETUP_CALLBACK')) $fname = 'Setup.php'
 Customization point after all loading (constants, functions, classes, DefaultSettings, LocalSettings). More...
 
 $messageMemc = wfGetMessageCacheStorage()
 
 $ps_default = Profiler::instance()->scopedProfileIn( $fname . '-defaults' )
 
foreach([ 'wgArticlePath', 'wgVariantArticlePath'] as $varName) $ps_default2 = Profiler::instance()->scopedProfileIn( $fname . '-defaults2' )
 
 $ps_extensions = Profiler::instance()->scopedProfileIn( $fname . '-extensions' )
 
 $ps_globals = Profiler::instance()->scopedProfileIn( $fname . '-globals' )
 
 $ps_misc = Profiler::instance()->scopedProfileIn( $fname . '-misc' )
 
 $ps_setup = Profiler::instance()->scopedProfileIn( $fname )
 
 $rcMaxAgeDays = $wgRCMaxAge / ( 3600 * 24 )
 
if( $wgCanonicalServer===false$serverParts = wfParseUrl( $wgCanonicalServer )
 
 $wgCanonicalNamespaceNames
 Definitions of the NS_ constants are in Defines.php. More...
 
global $wgCommandLineMode
 
 $wgContLang = MediaWikiServices::getInstance()->getContentLanguage()
 
if(is_array( $wgExtraNamespaces)) if(count( $wgDummyLanguageCodes) !==0) foreach(LanguageCode::getNonstandardLanguageCodeMapping() as $code=> $bcp47) $wgContLanguageCode = $wgLanguageCode
 
if( $wgLocalInterwiki) if( $wgSharedPrefix===false) if( $wgSharedSchema===false) if(! $wgCookiePrefix) $wgCookiePrefix = strtr( $wgCookiePrefix, '=,; +."\'\\[', '__________' )
 
if( $wgRCFilterByAge) $wgDefaultUserOptions ['rcdays']
 
 $wgDefaultUserOptions ['watchlistdays']
 
if(is_null( $wgLocalTZoffset)) $wgDefaultUserOptions ['timecorrection'] = "System|$wgLocalTZoffset"
 
if(is_array( $wgExtraNamespaces)) if(count( $wgDummyLanguageCodes) !==0) $wgDummyLanguageCodes
 
 $wgEmailAuthentication = false
 
 $wgEnableUserEmail = false
 
 $wgEnotifFromEditor = false
 
 $wgEnotifImpersonal = false
 
 $wgEnotifMaxRecips = 0
 
 $wgEnotifMinorEdits = false
 
 $wgEnotifRevealEditorAddress = false
 
 $wgEnotifUseRealName = false
 
 $wgEnotifUserTalk = false
 
 $wgEnotifWatchlist = false
 
 $wgFileExtensions = array_values( array_diff( $wgFileExtensions, $wgFileBlacklist ) )
 
foreach( $wgExtensionFunctions as $func) if(!defined( 'MW_NO_SESSION') &&! $wgCommandLineMode) if(! $wgCommandLineMode) $wgFullyInitialised = true
 
 $wgGalleryOptions
 Default parameters for the "<gallery>" tag. More...
 
if( $wgUseFileCache|| $wgUseSquid) $wgHtml5 = true
 
 $wgInitialSessionId = null
 
 $wgJsMimeType = 'text/javascript'
 
 $wgLang = new StubUserLang
 
 $wgLockManagers []
 Initialise $wgLockManagers to include basic FS version. More...
 
 $wgMemc = ObjectCache::getLocalClusterInstance()
 
if( $wgMetaNamespace===false) if( $wgResourceLoaderMaxQueryLength===false$wgMinUploadChunkSize
 
 $wgNamespaceAliases ['Image'] = NS_FILE
 The canonical names of namespaces 6 and 7 are, as of v1.14, "File" and "File_talk". More...
 
 $wgNamespaceAliases ['Image_talk'] = NS_FILE_TALK
 
if( $wgScript===false) if( $wgLoadScript===false) if( $wgArticlePath===false) if(!empty( $wgActionPaths) &&!isset( $wgActionPaths['view'])) if( $wgResourceBasePath===null) if( $wgStylePath===false) if( $wgLocalStylePath===false) if( $wgExtensionAssetsPath===false) if( $wgLogo===false) if( $wgUploadPath===false) if( $wgUploadDirectory===false) if( $wgReadOnlyFile===false) if( $wgFileCacheDirectory===false) if( $wgDeletedDirectory===false) if( $wgGitInfoCacheDirectory===false && $wgCacheDirectory !==false) if( $wgEnableParserCache===false) if( $wgRightsIcon) if(isset( $wgFooterIcons['copyright']['copyright']) && $wgFooterIcons['copyright']['copyright']===[]) if(isset( $wgFooterIcons['poweredby']) &&isset( $wgFooterIcons['poweredby']['mediawiki']) && $wgFooterIcons['poweredby']['mediawiki']['src']===null$wgNamespaceProtection [NS_MEDIAWIKI] = 'editinterface'
 Unconditional protection for NS_MEDIAWIKI since otherwise it's too easy for a sysadmin to set $wgNamespaceProtection incorrectly and leave the wiki insecure. More...
 
 $wgOut = RequestContext::getMain()->getOutput()
 
 $wgParser
 
if(! $wgDBerrorLogTZ) $wgRequest = RequestContext::getMain()->getRequest()
 
if(!defined( 'MEDIAWIKI')) $wgScopeTest = 'MediaWiki Setup.php scope test'
 This file is not a valid entry point, perform no further processing unless MEDIAWIKI is defined. More...
 
if( $wgServerName !==false$wgServerName = $serverParts['host']
 
if( $wgInvalidateCacheOnLocalSettingsChange) if( $wgNewUserLog) if( $wgPageCreationLog) if( $wgPageLanguageUseDB) if( $wgCookieSecure==='detect') if( $wgProfileOnly) if( $wgMinimalPasswordLength !==false) if( $wgMaximalPasswordLength !==false) if(! $wgSessionsInObjectCache) $wgSessionsInObjectCache = true
 
if( $wgSkipSkin) $wgSkipSkins [] = 'fallback'
 
 $wgTitle = null
 
 $wgUseEnotif = false
 
 $wgUserEmailUseReplyTo = false
 
 $wgUsersNotifiedOnAllChanges = []
 
if(! $wgEmergencyContact) if(! $wgPasswordSender) if(! $wgNoReplyAddress) if( $wgSecureLogin &&substr( $wgServer, 0, 2) !=='//') $wgVirtualRestConfig ['global']['domain'] = $wgCanonicalServer
 
 $wgXhtmlDefaultNamespace = 'http://www.w3.org/1999/xhtml'
 
if(defined( 'MW_CONFIG_CALLBACK')) else
 Load LocalSettings.php. More...
 
 if (ini_get('mbstring.func_overload'))
 Pre-config setup: Before loading LocalSettings.php. More...
 
const MW_SERVICE_BOOTSTRAP_COMPLETE ( $wgSharedDB && $wgSharedTables) 1
 
 NS_SPECIAL
 

Detailed Description

Include most things that are needed to make MediaWiki work.

This file is included by WebStart.php and doMaintenance.php so that both web and maintenance scripts share a final set up phase to include necessary files and create global object variables.

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. http://www.gnu.org/copyleft/gpl.html

Definition in file Setup.php.

Variable Documentation

◆ $cpPosInfo

$cpPosInfo
Initial value:
= LBFactory::getCPInfoFromCookieValue(
$wgRequest->getCookie( 'cpPosIndex', '' ),
time() - ChronologyProtector::POSITION_COOKIE_TTL
)
if(! $wgDBerrorLogTZ) $wgRequest
Definition: Setup.php:746

Definition at line 748 of file Setup.php.

◆ $fname

if (defined('MW_SETUP_CALLBACK')) $fname = 'Setup.php'

Customization point after all loading (constants, functions, classes, DefaultSettings, LocalSettings).

Specifically, this is before usage of settings, before instantiation of Profiler (and other singletons), and before any setup functions or hooks run. Main setup

Definition at line 121 of file Setup.php.

Referenced by Article\__get(), Article\__set(), User\addToDatabase(), MediaWiki\Tests\Maintenance\DumpTestCase\assertDumpStart(), Wikimedia\Rdbms\DatabaseSqlite\attachDatabase(), Wikimedia\Rdbms\Database\begin(), Wikimedia\Rdbms\LBFactory\beginMasterChanges(), Wikimedia\Rdbms\LoadBalancer\beginMasterChanges(), MediaWiki\Auth\LocalPasswordPrimaryAuthenticationProvider\beginPrimaryAuthentication(), Maintenance\beginTransaction(), RangeChronologicalPager\buildQueryInfo(), IndexPager\buildQueryInfo(), Wikimedia\Rdbms\Database\buildSelectSubquery(), Hooks\callHook(), DatabaseTestHelper\checkFunctionName(), AjaxResponse\checkLastModified(), PopulateArchiveRevId\checkMysqlAutoIncrementBug(), MediaWiki\Tests\Maintenance\TextPassDumperDatabaseTest\checkpointHelper(), Wikimedia\Rdbms\LoadBalancer\closeAll(), SectionProfiler\collateData(), Wikimedia\Rdbms\LBFactory\commitAll(), Wikimedia\Rdbms\LoadBalancer\commitAll(), Wikimedia\Rdbms\LBFactory\commitAndWaitForReplication(), Wikimedia\Rdbms\LBFactory\commitMasterChanges(), Wikimedia\Rdbms\LoadBalancer\commitMasterChanges(), Maintenance\commitTransaction(), User\createNew(), Wikimedia\Rdbms\DatabaseMssql\deleteJoin(), Wikimedia\Rdbms\DatabaseMysqlBase\deleteJoin(), Wikimedia\Rdbms\Database\deleteJoin(), JobQueueDB\doBatchPush(), Wikimedia\Rdbms\DatabaseSqlite\doBegin(), Wikimedia\Rdbms\Database\doProfiledQuery(), IndexPager\doQuery(), DatabasePostgresTest\doTestInsertIgnore(), DatabasePostgresTest\doTestInsertSelectIgnore(), UserEditCountUpdate\doUpdate(), Wikimedia\Rdbms\DatabasePostgres\duplicateTableStructure(), Wikimedia\Rdbms\DatabaseSqlite\duplicateTableStructure(), Wikimedia\Rdbms\DatabaseMysqlBase\duplicateTableStructure(), Wikimedia\Rdbms\DatabasePostgres\estimateRowCount(), Wikimedia\Rdbms\DatabaseMysqlBase\estimateRowCount(), Wikimedia\Rdbms\Database\estimateRowCount(), ApiRollback\execute(), ApiQueryUserContribs\execute(), ConvertExtensionToRegistration\execute(), ResourceLoaderWikiModule\fetchTitleInfo(), Wikimedia\Rdbms\LoadBalancer\flushMasterSnapshots(), Wikimedia\Rdbms\LBFactory\flushReplicaSnapshots(), Wikimedia\Rdbms\LoadBalancer\flushReplicaSnapshots(), QueryPage\getCachedTimestamp(), SectionProfiler\getCallTreeLine(), ForeignDBFile\getDescriptionText(), File\getDescriptionText(), SectionProfiler\getFunctionStats(), ProfilerXhprof\getFunctionStats(), Wikimedia\Rdbms\DatabaseMysqlBase\getMasterServerInfo(), MediaWiki\Storage\NameTableStore\getName(), Wikimedia\Rdbms\Database\getScopedLockAndFlush(), Wikimedia\Rdbms\DatabaseMysqlBase\getServerGTIDs(), Wikimedia\Rdbms\DatabaseMysqlBase\getServerId(), Wikimedia\Rdbms\DatabaseMysqlBase\getServerRoleStatus(), Wikimedia\Rdbms\Database\getWikiID(), MediaWiki\Tests\Maintenance\DumpTestCase\gunzip(), Wikimedia\Rdbms\Database\indexExists(), Wikimedia\Rdbms\DatabasePostgres\indexInfo(), Wikimedia\Rdbms\DatabaseSqlite\indexInfo(), Wikimedia\Rdbms\DatabaseMysqlBase\indexInfo(), Wikimedia\Rdbms\DatabasePostgres\indexUnique(), Wikimedia\Rdbms\DatabaseSqlite\indexUnique(), DatabaseOracle\insert(), Wikimedia\Rdbms\DatabasePostgres\insert(), Wikimedia\Rdbms\DatabaseSqlite\insert(), Wikimedia\Rdbms\Database\insert(), Revision\RevisionStore\insertRevisionOn(), Revision\RevisionStore\insertRevisionRowOn(), Parser\interwikiTransclude(), Title\invalidateCache(), PurgeJobUtils\invalidatePages(), ChangeTags\listExplicitlyDefinedTags(), Wikimedia\Rdbms\DatabasePostgres\listTables(), Wikimedia\Rdbms\DatabaseMysqlBase\listTables(), MediaWiki\Interwiki\ClassicInterwikiLookup\load(), MessageCache\loadCachedMessagePageEntry(), LocalFile\loadExtraFieldsWithTimestamp(), LocalFile\loadExtraFromDB(), LocalFile\loadFromDB(), Title\loadRestrictions(), BagOStuff\lock(), Wikimedia\Rdbms\Database\lockForUpdate(), ProfilerOutputDb\log(), Wikimedia\Rdbms\Database\makeQueryException(), moveToExternal(), Wikimedia\Rdbms\DatabasePostgres\nativeInsertSelect(), DatabaseTestHelper\nativeReplace(), Wikimedia\Rdbms\Database\nativeReplace(), RecentChange\newFromConds(), XmlTypeCheck\newFromFilename(), ImportStreamSource\newFromUpload(), LocalFile\nextHistoryLine(), Wikimedia\Rdbms\Database\normalizeConditions(), SiteStats\numberingroup(), ComposerVendorHtaccessCreator\onEvent(), Wikimedia\Rdbms\Database\onTransactionCommitOrIdle(), Wikimedia\Rdbms\Database\onTransactionPreCommitOrIdle(), Wikimedia\Rdbms\Database\onTransactionResolution(), RollbackAction\onView(), InfoAction\pageCounts(), SiteStats\pagesInNs(), ApiStashEdit\parseAndStash(), ResourceLoaderWikiModule\preloadTitleInfo(), Block\purgeExpired(), Title\purgeExpiredRestrictions(), DatabaseTestHelper\query(), Wikimedia\Rdbms\Database\query(), DatabaseOracle\queryIgnore(), Installer\readExtension(), ShortPagesPage\reallyDoQuery(), ContribsPager\reallyDoQuery(), ImageListPager\reallyDoQuery(), IndexPager\reallyDoQuery(), QueryPage\reallyDoQuery(), PopulateArchiveRevId\reassignArRevIds(), QueryPage\recache(), LocalFile\recordUpload2(), Wikimedia\Rdbms\TransactionProfiler\redefineExpectations(), Wikimedia\Rdbms\DatabaseMysqlBase\replace(), Wikimedia\Rdbms\DatabaseSqlite\replace(), Wikimedia\Rdbms\Database\replace(), Wikimedia\Rdbms\Database\reportQueryError(), Wikimedia\Rdbms\DatabasePostgres\resetSequenceForTable(), Wikimedia\Rdbms\DatabaseSqlite\resetSequenceForTable(), resolveStub(), resolveStubs(), Wikimedia\Rdbms\LBFactory\rollbackMasterChanges(), Wikimedia\Rdbms\LoadBalancer\rollbackMasterChanges(), Maintenance\rollbackTransaction(), Wikimedia\Rdbms\LoadBalancer\runMasterTransactionIdleCallbacks(), Hooks\runWithoutAbort(), User\saveSettings(), Wikimedia\Rdbms\DatabaseMssql\select(), Wikimedia\Rdbms\Database\select(), Wikimedia\Rdbms\Database\selectField(), Wikimedia\Rdbms\Database\selectFieldValues(), RandomPage\selectRandomPageFromDB(), SpecialRandomInCategory\selectRandomPageFromDB(), DatabaseOracle\selectRow(), Wikimedia\Rdbms\Database\selectRow(), Wikimedia\Rdbms\Database\selectRowCount(), Wikimedia\Rdbms\DatabaseMssql\selectSQLText(), Wikimedia\Rdbms\DatabasePostgres\selectSQLText(), Wikimedia\Rdbms\Database\selectSQLText(), StreamFile\send404Message(), HTTPFileStreamer\send404Message(), Wikimedia\Rdbms\TransactionProfiler\setExpectation(), Wikimedia\Rdbms\TransactionProfiler\setExpectations(), MediaWiki\Tests\Maintenance\BaseDumpTest\setUpPrefetch(), MediaWiki\Tests\Maintenance\TextPassDumperDatabaseTest\setUpStub(), ImportImages\splitFilename(), Wikimedia\Rdbms\Database\startAtomic(), StreamFile\stream(), DatabaseTestHelper\tableExists(), Wikimedia\Rdbms\DatabaseMysqlBase\tableExists(), DatabaseSQLTest\testAtomicSections(), DatabaseSQLTest\testAtomicSectionsCallbackCancellation(), MediaWiki\Tests\Maintenance\BackupDumperPageTest\testCurrentStubGzip(), MediaWiki\Tests\Maintenance\BackupDumperPageTest\testCurrentStubPlain(), ExportDemoTest\testExportDemo(), MediaWiki\Tests\Maintenance\BackupDumperPageTest\testFullStubPlain(), MediaWiki\Tests\Maintenance\BackupDumperPageTest\testFullTextPlain(), MediaWiki\Tests\Maintenance\BaseDumpTest\testPageMissAtEnd(), MediaWiki\Tests\Maintenance\BackupDumperLoggerTest\testPlain(), DatabaseSQLTest\testPrematureClose1(), DatabaseSQLTest\testPrematureClose2(), MediaWiki\Tests\Maintenance\BaseDumpTest\testRevisionMissAtEnd(), MediaWiki\Tests\Maintenance\BaseDumpTest\testSequential(), MediaWiki\Tests\Maintenance\BaseDumpTest\testSynchronizePageMiss(), MediaWiki\Tests\Maintenance\BaseDumpTest\testSynchronizePageMissAtStart(), MediaWiki\Tests\Maintenance\BaseDumpTest\testSynchronizeRevisionMissAtStart(), MediaWiki\Tests\Maintenance\BaseDumpTest\testSynchronizeRevisionMissToPage(), MediaWiki\Tests\Maintenance\BaseDumpTest\testSynchronizeRevisionMissToRevision(), GlobalTest\testWfMkdirParents(), MediaWiki\Tests\Maintenance\BackupDumperLoggerTest\testXmlDumpsBackupUseCaseLogging(), Wikimedia\Rdbms\Database\update(), WatchedItemStore\updateNotificationTimestamp(), ChangeTags\updateTags(), Wikimedia\Rdbms\DatabaseMysqlBase\upsert(), and Wikimedia\Rdbms\Database\upsert().

◆ $messageMemc

$messageMemc = wfGetMessageCacheStorage()

Definition at line 787 of file Setup.php.

Referenced by RebuildMessages\execute(), and UploadFromUrlTestSuite\setUp().

◆ $ps_default

$ps_default = Profiler::instance()->scopedProfileIn( $fname . '-defaults' )

Definition at line 136 of file Setup.php.

◆ $ps_default2

foreach (['wgArticlePath', 'wgVariantArticlePath'] as $varName) $ps_default2 = Profiler::instance()->scopedProfileIn( $fname . '-defaults2' )

Definition at line 657 of file Setup.php.

◆ $ps_extensions

$ps_extensions = Profiler::instance()->scopedProfileIn( $fname . '-extensions' )

Definition at line 930 of file Setup.php.

◆ $ps_globals

$ps_globals = Profiler::instance()->scopedProfileIn( $fname . '-globals' )

Definition at line 802 of file Setup.php.

◆ $ps_misc

$ps_misc = Profiler::instance()->scopedProfileIn( $fname . '-misc' )

Definition at line 717 of file Setup.php.

◆ $ps_setup

$ps_setup = Profiler::instance()->scopedProfileIn( $fname )

Definition at line 122 of file Setup.php.

◆ $rcMaxAgeDays

$rcMaxAgeDays = $wgRCMaxAge / ( 3600 * 24 )

Definition at line 363 of file Setup.php.

◆ $serverParts

if ($wgCanonicalServer===false) $serverParts = wfParseUrl( $wgCanonicalServer )

Definition at line 664 of file Setup.php.

◆ $wgCanonicalNamespaceNames

$wgCanonicalNamespaceNames
Initial value:
= [
NS_MEDIA => 'Media'
const NS_MEDIA
Definition: Defines.php:52

Definitions of the NS_ constants are in Defines.php.

Access:
private

Definition at line 475 of file Setup.php.

Referenced by MWNamespace\getCanonicalNamespaces(), and wfInstallerMain().

◆ $wgCommandLineMode

global $wgCommandLineMode

Definition at line 616 of file Setup.php.

◆ $wgContLang

◆ $wgContLanguageCode

if (is_array($wgExtraNamespaces)) if (count($wgDummyLanguageCodes) !==0) foreach (LanguageCode::getNonstandardLanguageCodeMapping() as $code=> $bcp47) $wgContLanguageCode = $wgLanguageCode

Definition at line 521 of file Setup.php.

Referenced by MessageCacheTest\testNoDBAccess().

◆ $wgCookiePrefix

if ($wgLocalInterwiki) if ($wgSharedPrefix===false) if ($wgSharedSchema===false) if (! $wgCookiePrefix) $wgCookiePrefix = strtr( $wgCookiePrefix, '=,; +."\'\\[', '__________' )

Definition at line 420 of file Setup.php.

◆ $wgDefaultUserOptions [1/3]

if ($wgRCFilterByAge) $wgDefaultUserOptions[ 'rcdays']
Initial value:
= min(
ceil( $rcMaxAgeDays )
)
if( $wgRCFilterByAge) $wgDefaultUserOptions['rcdays']
Definition: Setup.php:378
$rcMaxAgeDays
Definition: Setup.php:363

Definition at line 378 of file Setup.php.

◆ $wgDefaultUserOptions [2/3]

$wgDefaultUserOptions[ 'watchlistdays']
Initial value:
= min(
$wgDefaultUserOptions['watchlistdays'],
ceil( $rcMaxAgeDays )
)
if( $wgRCFilterByAge) $wgDefaultUserOptions['rcdays']
Definition: Setup.php:378
$rcMaxAgeDays
Definition: Setup.php:363

Definition at line 382 of file Setup.php.

◆ $wgDefaultUserOptions [3/3]

if (is_null($wgLocalTZoffset)) $wgDefaultUserOptions[ 'timecorrection'] = "System|$wgLocalTZoffset"

Definition at line 739 of file Setup.php.

◆ $wgDummyLanguageCodes

if (is_array($wgExtraNamespaces)) if (count($wgDummyLanguageCodes) !==0) $wgDummyLanguageCodes
Initial value:
= [
'qqq' => 'qqq'
Todo:
UGLY UGLY

Definition at line 505 of file Setup.php.

◆ $wgEmailAuthentication

$wgEmailAuthentication = false

Definition at line 428 of file Setup.php.

◆ $wgEnableUserEmail

$wgEnableUserEmail = false

Definition at line 429 of file Setup.php.

◆ $wgEnotifFromEditor

$wgEnotifFromEditor = false

Definition at line 430 of file Setup.php.

◆ $wgEnotifImpersonal

$wgEnotifImpersonal = false

Definition at line 431 of file Setup.php.

◆ $wgEnotifMaxRecips

$wgEnotifMaxRecips = 0

Definition at line 432 of file Setup.php.

◆ $wgEnotifMinorEdits

$wgEnotifMinorEdits = false

Definition at line 433 of file Setup.php.

◆ $wgEnotifRevealEditorAddress

$wgEnotifRevealEditorAddress = false

Definition at line 434 of file Setup.php.

◆ $wgEnotifUseRealName

$wgEnotifUseRealName = false

Definition at line 435 of file Setup.php.

◆ $wgEnotifUserTalk

$wgEnotifUserTalk = false

Definition at line 436 of file Setup.php.

◆ $wgEnotifWatchlist

$wgEnotifWatchlist = false

Definition at line 437 of file Setup.php.

◆ $wgFileExtensions

$wgFileExtensions = array_values( array_diff( $wgFileExtensions, $wgFileBlacklist ) )

Definition at line 536 of file Setup.php.

◆ $wgFullyInitialised

foreach ($wgExtensionFunctions as $func) if (!defined('MW_NO_SESSION') &&! $wgCommandLineMode) if (! $wgCommandLineMode) $wgFullyInitialised = true

Definition at line 963 of file Setup.php.

Referenced by User\isSafeToLoad(), User\load(), and MWExceptionTest\testUseOutputPage().

◆ $wgGalleryOptions

$wgGalleryOptions
Initial value:
= [
'imagesPerRow' => 0

Default parameters for the "<gallery>" tag.

See also
DefaultSettings.php for description of the fields.

Definition at line 267 of file Setup.php.

◆ $wgHtml5

if ($wgUseFileCache||$wgUseSquid) $wgHtml5 = true

Definition at line 531 of file Setup.php.

◆ $wgInitialSessionId

$wgInitialSessionId = null

Definition at line 833 of file Setup.php.

Referenced by LoginSignupSpecialPage\hasSessionCookie().

◆ $wgJsMimeType

$wgJsMimeType = 'text/javascript'

Definition at line 533 of file Setup.php.

◆ $wgLang

Language $wgLang = new StubUserLang

Definition at line 909 of file Setup.php.

Referenced by PermissionsError\__construct(), CliInstaller\__construct(), ApiMain\__construct(), ParserOptions\__construct(), LogPage\actionText(), SpecialEditWatchlist\buildTools(), MediaWiki\Special\SpecialPageFactory\capturePath(), Title\checkActionPermissions(), UploadBase\checkUnwantedFileExtensions(), Installer\envCheckDB(), WebInstallerLanguage\execute(), WebInstallerOptions\execute(), ChangesFeed\execute(), UpdateMediaWiki\execute(), LocalFileRestoreBatch\execute(), StubUserLang\findVariantLink(), Linker\formatAutocomments(), FeedUtils\formatDiffRow(), Linker\formatSize(), SpecialVersion\getCopyrightAndAuthorList(), User\getDatePreference(), ForeignDBFile\getDescriptionText(), File\getDescriptionText(), MediaHandler\getGeneralShortDesc(), WebInstallerOutput\getLanguage(), PNGHandler\getLongDesc(), GIFHandler\getLongDesc(), ImageHandler\getLongDesc(), SvgHandler\getLongDesc(), ContentHandler\getPageLanguage(), Title\getPageLanguage(), Title\getPageViewLanguage(), EditPage\getPreviewLimitReport(), ImageHandler\getShortDesc(), SpecialVersion\getVersionLinkedGit(), Status\languageFromParam(), WebInstallerOptions\makeScreenshotsLink(), Xml\monthSelector(), Html\namespaceSelectorOptions(), User\newFatalPermissionDeniedStatus(), FileDeleteForm\prepareMessage(), XmlTest\provideMonthSelector(), User\sendConfirmationMail(), LoginSignupSpecialPage\setSessionUserForCurrentRequest(), UploadFromUrlTestSuite\setUp(), WebInstaller\setupLanguage(), LogFormatterTest\testLogParamsTypeNumber(), ParserOptionsTest\testNewCanonical(), ApiMainTest\testUselang(), TitlePermissionTest\testUserBlock(), Linker\tocList(), ForeignAPIFile\transform(), MWException\useMessageCache(), Linker\userToolLinks(), wfGetLangObj(), and wfInstallerMain().

◆ $wgLockManagers

$wgLockManagers[]
Initial value:
= [
'name' => 'fsLockManager'

Initialise $wgLockManagers to include basic FS version.

Definition at line 253 of file Setup.php.

◆ $wgMemc

Definition at line 786 of file Setup.php.

◆ $wgMinUploadChunkSize

if ($wgMetaNamespace===false) if ($wgResourceLoaderMaxQueryLength===false) $wgMinUploadChunkSize
Initial value:
= min(
ini_get( 'post_max_size' ) ?: ini_get( 'hhvm.server.max_post_size' ),
PHP_INT_MAX
) ?: PHP_INT_MAX ) - 1024
)
if( $wgMetaNamespace===false) if( $wgResourceLoaderMaxQueryLength===false) $wgMinUploadChunkSize
Definition: Setup.php:461
static getMaxUploadSize( $forType=null)
Get the MediaWiki maximum uploaded file size for given type of upload, based on $wgMaxUploadSize.
static getMaxPhpUploadSize()
Get the PHP maximum uploaded file size, based on ini settings.
wfShorthandToInteger( $string='', $default=-1)
Converts shorthand byte notation to integer form.

Definition at line 461 of file Setup.php.

◆ $wgNamespaceAliases [1/2]

$wgNamespaceAliases[ 'Image'] = NS_FILE

The canonical names of namespaces 6 and 7 are, as of v1.14, "File" and "File_talk".

The old names "Image" and "Image_talk" are retained as aliases for backwards compatibility.

Definition at line 247 of file Setup.php.

◆ $wgNamespaceAliases [2/2]

$wgNamespaceAliases[ 'Image_talk'] = NS_FILE_TALK

Definition at line 248 of file Setup.php.

◆ $wgNamespaceProtection

if ($wgScript===false) if ($wgLoadScript===false) if ($wgArticlePath===false) if (!empty($wgActionPaths) &&!isset($wgActionPaths[ 'view'])) if ($wgResourceBasePath===null) if ($wgStylePath===false) if ($wgLocalStylePath===false) if ($wgExtensionAssetsPath===false) if ($wgLogo===false) if ($wgUploadPath===false) if ($wgUploadDirectory===false) if ($wgReadOnlyFile===false) if ($wgFileCacheDirectory===false) if ($wgDeletedDirectory===false) if ($wgGitInfoCacheDirectory===false &&$wgCacheDirectory !==false) if ($wgEnableParserCache===false) if ($wgRightsIcon) if (isset($wgFooterIcons[ 'copyright'][ 'copyright']) &&$wgFooterIcons[ 'copyright'][ 'copyright']===[]) if (isset($wgFooterIcons[ 'poweredby']) &&isset($wgFooterIcons[ 'poweredby'][ 'mediawiki']) &&$wgFooterIcons[ 'poweredby'][ 'mediawiki'][ 'src']===null) $wgNamespaceProtection[NS_MEDIAWIKI] = 'editinterface'

Unconditional protection for NS_MEDIAWIKI since otherwise it's too easy for a sysadmin to set $wgNamespaceProtection incorrectly and leave the wiki insecure.

Note that this is the definition of editinterface and it can be granted to all users if desired.

Definition at line 240 of file Setup.php.

◆ $wgOut

◆ $wgParser

Parser $wgParser
Initial value:
= new StubObject( 'wgParser', function () {
return MediaWikiServices::getInstance()->getParser();
} )
Class to implement stub globals, which are globals that delay loading the their associated module cod...
Definition: StubObject.php:45
Deprecated:
since 1.32, use MediaWikiServices::getParser() instead

Definition at line 920 of file Setup.php.

Referenced by WebInstaller\__construct(), ApiQuerySiteinfo\appendExtensionTags(), ApiQuerySiteinfo\appendFunctionHooks(), PreprocessDump\checkOptions(), ApiFeedWatchlist\createFeedItem(), ApiExpandTemplates\execute(), FormatInstallDoc\execute(), ApiParse\execute(), SpecialExpandTemplates\execute(), PPFuzzTest\execute(), ApiQueryRevisionsBase\extractDeprecatedContent(), EditPage\extractSectionTitle(), TextContent\fillParserOutput(), WikitextContent\fillParserOutput(), ApiParse\formatSummary(), SpecialExpandTemplates\generateHtml(), MessageCache\getParser(), SpecialVersion\getParserFunctionHooks(), SpecialVersion\getParserTags(), RawAction\getRawText(), WikitextContent\getSection(), PreprocessDump\getStripList(), EditPage\getSummaryPreview(), EditPage\guessSectionName(), EditPage\newSectionSummary(), Installer\parse(), OutputPage\parseInternal(), WikitextContent\preloadTransform(), JavaScriptContent\preSaveTransform(), CssContent\preSaveTransform(), WikitextContent\preSaveTransform(), WikitextContent\replaceSection(), ParserTestRunner\requireFunctionHook(), ParserTestRunner\requireHook(), ParserTestRunner\requireTransparentHook(), UploadFromUrlTestSuite\setUp(), ParserMethodsTest\testCallParserFunction(), ApiQuerySiteinfoTest\testExtensionTags(), ApiQuerySiteinfoTest\testFunctionHooks(), ParserMethodsTest\testGetSections(), ParserMethodsTest\testGuessSectionNameFromWikiText(), ParserMethodsTest\testPreSaveTransform(), ParserMethodsTest\testRecursiveParse(), ParserMethodsTest\testRevisionAccess(), and ParserMethodsTest\testWrapOutput().

◆ $wgRequest

if (! $wgDBerrorLogTZ) $wgRequest = RequestContext::getMain()->getRequest()

◆ $wgScopeTest

if (!defined('MEDIAWIKI')) $wgScopeTest = 'MediaWiki Setup.php scope test'

This file is not a valid entry point, perform no further processing unless MEDIAWIKI is defined.

Definition at line 39 of file Setup.php.

◆ $wgServerName

if ($wgServerName !==false) $wgServerName = $serverParts['host']

Definition at line 669 of file Setup.php.

◆ $wgSessionsInObjectCache

if ($wgInvalidateCacheOnLocalSettingsChange) if ($wgNewUserLog) if ($wgPageCreationLog) if ($wgPageLanguageUseDB) if ($wgCookieSecure==='detect') if ($wgProfileOnly) if ($wgMinimalPasswordLength !==false) if ($wgMaximalPasswordLength !==false) if (! $wgSessionsInObjectCache) $wgSessionsInObjectCache = true

Definition at line 598 of file Setup.php.

◆ $wgSkipSkins

$wgSkipSkins[] = 'fallback'

Definition at line 392 of file Setup.php.

◆ $wgTitle

$wgTitle = null

Definition at line 927 of file Setup.php.

◆ $wgUseEnotif

$wgUseEnotif = false

◆ $wgUserEmailUseReplyTo

$wgUserEmailUseReplyTo = false

Definition at line 440 of file Setup.php.

◆ $wgUsersNotifiedOnAllChanges

$wgUsersNotifiedOnAllChanges = []

Definition at line 441 of file Setup.php.

◆ $wgVirtualRestConfig

if (! $wgEmergencyContact) if (! $wgPasswordSender) if (! $wgNoReplyAddress) if ($wgSecureLogin &&substr($wgServer, 0, 2) !=='//') $wgVirtualRestConfig[ 'global'][ 'domain'] = $wgCanonicalServer

Definition at line 691 of file Setup.php.

◆ $wgXhtmlDefaultNamespace

$wgXhtmlDefaultNamespace = 'http://www.w3.org/1999/xhtml'

Definition at line 532 of file Setup.php.

◆ else

if (!defined('MW_NO_SESSION') &&! $wgCommandLineMode) else
Initial value:
{
if ( !defined( 'MW_CONFIG_FILE' ) ) {
define( 'MW_CONFIG_FILE', "$IP/LocalSettings.php" );
}
require_once MW_CONFIG_FILE

Load LocalSettings.php.

Definition at line 99 of file Setup.php.

◆ if

if
Initial value:
{
$wgAllowHTMLEmail
For parts of the system that have been updated to provide HTML email content, send both text and HTML...

Pre-config setup: Before loading LocalSettings.php.

session ID (if any) loaded at startup

Definition at line 51 of file Setup.php.

Referenced by TitleValue\__toString(), UserCache\doQuery(), ApiQueryAllUsers\execute(), ApiQueryUserContribs\extractRowInfo(), User\loadFromRow(), JSMinPlus\parseTree(), and ApiQueryRecentChanges\run().

◆ MW_SERVICE_BOOTSTRAP_COMPLETE

const MW_SERVICE_BOOTSTRAP_COMPLETE($wgSharedDB &&$wgSharedTables) 1

Definition at line 641 of file Setup.php.

◆ NS_SPECIAL

NS_SPECIAL
Initial value:
=> 'Special',
NS_TALK => 'Talk',
NS_USER => 'User',
NS_USER_TALK => 'User_talk',
NS_PROJECT => 'Project',
NS_PROJECT_TALK => 'Project_talk',
NS_FILE => 'File',
NS_FILE_TALK => 'File_talk',
NS_MEDIAWIKI => 'MediaWiki',
NS_MEDIAWIKI_TALK => 'MediaWiki_talk',
NS_TEMPLATE => 'Template',
NS_TEMPLATE_TALK => 'Template_talk',
NS_HELP => 'Help',
NS_HELP_TALK => 'Help_talk',
NS_CATEGORY => 'Category',
NS_CATEGORY_TALK => 'Category_talk',
]
const NS_TEMPLATE
Definition: Defines.php:74
const NS_PROJECT
Definition: Defines.php:68
const NS_MEDIAWIKI_TALK
Definition: Defines.php:73
const NS_PROJECT_TALK
Definition: Defines.php:69
const NS_CATEGORY
Definition: Defines.php:78
const NS_FILE
Definition: Defines.php:70
const NS_FILE_TALK
Definition: Defines.php:71
const NS_MEDIAWIKI
Definition: Defines.php:72
const NS_CATEGORY_TALK
Definition: Defines.php:79
const NS_HELP
Definition: Defines.php:76
const NS_HELP_TALK
Definition: Defines.php:77
const NS_TALK
Definition: Defines.php:65
const NS_USER_TALK
Definition: Defines.php:67
const NS_TEMPLATE_TALK
Definition: Defines.php:75

Definition at line 477 of file Setup.php.