MediaWiki REL1_31
Setup.php File Reference

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

Go to the source code of this file.

Variables

if(defined( 'MW_SETUP_CALLBACK')) $fname = 'Setup.php'
 Customization point after all loading (constants, functions, classes, DefaultSettings, LocalSettings).
 
 $messageMemc = wfGetMessageCacheStorage()
 
 $parserMemc
 
 $ps_default = Profiler::instance()->scopedProfileIn( $fname . '-defaults' )
 
 $ps_default2 = Profiler::instance()->scopedProfileIn( $fname . '-defaults2' )
 
 $ps_extensions = Profiler::instance()->scopedProfileIn( $fname . '-extensions' )
 
 $ps_globals = Profiler::instance()->scopedProfileIn( $fname . '-globals' )
 
 $ps_memcached = Profiler::instance()->scopedProfileIn( $fname . '-memcached' )
 
 $ps_misc = Profiler::instance()->scopedProfileIn( $fname . '-misc1' )
 
if(!is_object($wgAuth)) if( $wgAuth &&! $wgAuth instanceof MediaWiki\Auth\AuthManagerAuthPlugin $ps_session ) = Profiler::instance()->scopedProfileIn( $fname . '-session' )
 
 $ps_setup = Profiler::instance()->scopedProfileIn( $fname )
 
 $ps_validation = Profiler::instance()->scopedProfileIn( $fname . '-validation' )
 
if( $wgExperimentalHtmlIds) $rcMaxAgeDays = $wgRCMaxAge / ( 3600 * 24 )
 
if( $wgCanonicalServer===false) $serverParts = wfParseUrl( $wgCanonicalServer )
 
 $wgCanonicalNamespaceNames
 Definitions of the NS_ constants are in Defines.php.
 
global $wgCommandLineMode
 
 $wgContLang = Language::factory( $wgLanguageCode )
 
 $wgContLanguageCode = $wgLanguageCode
 
if($wgLocalInterwiki) if( $wgSharedPrefix===false) if($wgSharedSchema===false) if(! $wgCookiePrefix) $wgCookiePrefix = strtr( $wgCookiePrefix, '=,; +."\'\\[', '__________' )
 
if( $wgRCFilterByAge) $wgDefaultUserOptions ['rcdays']
 
if(is_null( $wgLocalTZoffset)) $wgDefaultUserOptions ['timecorrection'] = "System|$wgLocalTZoffset"
 
 $wgDefaultUserOptions ['watchlistdays']
 
if(is_array( $wgExtraNamespaces)) $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.
 
if( $wgUseFileCache|| $wgUseSquid) $wgHtml5 = true
 
 $wgInitialSessionId = null
 
 $wgJsMimeType = 'text/javascript'
 
 $wgLang = new StubUserLang
 
 $wgLockManagers []
 Initialise $wgLockManagers to include basic FS version.
 
 $wgMemc = wfGetMainCache()
 
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".
 
 $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 $wgNamespaceProtection [ 'copyright'][ 'copyright']) &&$wgFooterIcons[ 'copyright'][ 'copyright']===[]) if(isset( $wgFooterIcons['poweredby']) &&isset( $wgFooterIcons['poweredby']['mediawiki']) && $wgFooterIcons['poweredby']['mediawiki']['src']===null)[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.
 
 $wgOut = RequestContext::getMain()->getOutput()
 
 $wgParser
 
if(!defined( 'MEDIAWIKI')) $wgProfiler = []
 This file is not a valid entry point, perform no further processing unless MEDIAWIKI is defined.
 
if(! $wgDBerrorLogTZ) $wgRequest = RequestContext::getMain()->getRequest()
 
if( $wgServerName !==false) $wgServerName = $serverParts['host']
 
if($wgInvalidateCacheOnLocalSettingsChange) if( $wgNewUserLog) 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
 
 $wgUser = RequestContext::getMain()->getUser()
 
 $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.
 
 if (file_exists("$IP/StartProfiler.php"))
 
const MW_SERVICE_BOOTSTRAP_COMPLETE ( $wgSharedDB && $wgSharedTables) 1
 

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

◆ $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 112 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(), Maintenance\beginTransaction(), IndexPager\buildQueryInfo(), RangeChronologicalPager\buildQueryInfo(), Wikimedia\Rdbms\Database\buildSelectSubquery(), Hooks\callHook(), Wikimedia\Rdbms\Database\cancelAtomic(), DatabaseTestHelper\checkFunctionName(), AjaxResponse\checkLastModified(), MediaWiki\Tests\Maintenance\TextPassDumperDatabaseTest\checkpointHelper(), SectionProfiler\collateData(), Wikimedia\Rdbms\Database\commit(), Wikimedia\Rdbms\LoadBalancer\commitAll(), Wikimedia\Rdbms\LBFactory\commitAll(), Wikimedia\Rdbms\LBFactory\commitAndWaitForReplication(), Wikimedia\Rdbms\LoadBalancer\commitMasterChanges(), Wikimedia\Rdbms\LBFactory\commitMasterChanges(), Maintenance\commitTransaction(), User\createNew(), DatabaseOracle\delete(), Wikimedia\Rdbms\Database\delete(), Wikimedia\Rdbms\DatabaseMssql\delete(), Wikimedia\Rdbms\Database\deleteJoin(), Wikimedia\Rdbms\DatabaseMssql\deleteJoin(), Wikimedia\Rdbms\DatabaseMysqlBase\deleteJoin(), Wikimedia\Rdbms\Database\doAtomicSection(), JobQueueDB\doBatchPush(), Wikimedia\Rdbms\Database\doBegin(), Wikimedia\Rdbms\DatabaseSqlite\doBegin(), Wikimedia\Rdbms\Database\doCommit(), PopulateArchiveRevId\doDBUpdates(), IndexPager\doQuery(), Wikimedia\Rdbms\Database\doReleaseSavepoint(), Wikimedia\Rdbms\Database\doRollback(), Wikimedia\Rdbms\Database\doRollbackToSavepoint(), Wikimedia\Rdbms\DatabaseMssql\doRollbackToSavepoint(), Wikimedia\Rdbms\Database\doSavepoint(), Wikimedia\Rdbms\DatabaseMssql\doSavepoint(), Wikimedia\Rdbms\DatabaseMysqlBase\duplicateTableStructure(), Wikimedia\Rdbms\DatabasePostgres\duplicateTableStructure(), Wikimedia\Rdbms\DatabaseSqlite\duplicateTableStructure(), Wikimedia\Rdbms\Database\endAtomic(), Wikimedia\Rdbms\DatabaseMssql\estimateRowCount(), Wikimedia\Rdbms\DatabaseMysqlBase\estimateRowCount(), Wikimedia\Rdbms\DatabasePostgres\estimateRowCount(), ApiQueryContributions\execute(), ConvertExtensionToRegistration\execute(), ResourceLoaderWikiModule\fetchTitleInfo(), Wikimedia\Rdbms\LBFactory\flushReplicaSnapshots(), Wikimedia\Rdbms\Database\flushSnapshot(), QueryPage\getCachedTimestamp(), SectionProfiler\getCallTreeLine(), ProfilerXhprof\getFunctionStats(), SectionProfiler\getFunctionStats(), Wikimedia\Rdbms\Database\getScopedLockAndFlush(), Wikimedia\Rdbms\DatabaseMysqlBase\getServerGTIDs(), Wikimedia\Rdbms\DatabaseMysqlBase\getServerRoleStatus(), MediaWiki\Tests\Maintenance\DumpTestCase\gunzip(), Wikimedia\Rdbms\Database\indexExists(), Wikimedia\Rdbms\DatabaseMssql\indexInfo(), Wikimedia\Rdbms\DatabaseMysqlBase\indexInfo(), Wikimedia\Rdbms\DatabasePostgres\indexInfo(), Wikimedia\Rdbms\DatabaseSqlite\indexInfo(), Wikimedia\Rdbms\DatabasePostgres\indexUnique(), Wikimedia\Rdbms\DatabaseSqlite\indexUnique(), DatabaseOracle\insert(), Wikimedia\Rdbms\Database\insert(), Wikimedia\Rdbms\DatabasePostgres\insert(), Wikimedia\Rdbms\Database\insertSelect(), Title\invalidateCache(), ChangeTags\listExplicitlyDefinedTags(), Wikimedia\Rdbms\DatabaseMysqlBase\listTables(), Wikimedia\Rdbms\DatabasePostgres\listTables(), LocalFile\loadExtraFieldsWithTimestamp(), LocalFile\loadExtraFromDB(), LocalFile\loadFromDB(), ProfilerOutputDb\log(), moveToExternal(), Wikimedia\Rdbms\Database\nativeInsertSelect(), Wikimedia\Rdbms\DatabaseMssql\nativeInsertSelect(), Wikimedia\Rdbms\DatabasePostgres\nativeInsertSelect(), Wikimedia\Rdbms\Database\nativeReplace(), DatabaseTestHelper\nativeReplace(), RecentChange\newFromConds(), XmlTypeCheck\newFromFilename(), ImportStreamSource\newFromUpload(), LocalFile\nextHistoryLine(), Wikimedia\Rdbms\Database\nonNativeInsertSelect(), ComposerVendorHtaccessCreator\onEvent(), Wikimedia\Rdbms\Database\onTransactionIdle(), Wikimedia\Rdbms\Database\onTransactionPreCommitOrIdle(), Wikimedia\Rdbms\Database\onTransactionResolution(), InfoAction\pageCounts(), ResourceLoaderWikiModule\preloadTitleInfo(), Block\purgeExpired(), Title\purgeExpiredRestrictions(), DatabaseTestHelper\query(), Wikimedia\Rdbms\Database\query(), DatabaseOracle\queryIgnore(), Installer\readExtension(), QueryPage\reallyDoQuery(), ShortPagesPage\reallyDoQuery(), ImageListPager\reallyDoQuery(), IndexPager\reallyDoQuery(), ContribsPager\reallyDoQuery(), QueryPage\recache(), Wikimedia\Rdbms\Database\replace(), Wikimedia\Rdbms\DatabaseMysqlBase\replace(), Wikimedia\Rdbms\Database\replaceLostConnection(), Wikimedia\Rdbms\DatabasePostgres\resetSequenceForTable(), Wikimedia\Rdbms\DatabaseSqlite\resetSequenceForTable(), resolveStub(), resolveStubs(), Wikimedia\Rdbms\Database\rollback(), Wikimedia\Rdbms\LBFactory\rollbackMasterChanges(), Wikimedia\Rdbms\LoadBalancer\rollbackMasterChanges(), Maintenance\rollbackTransaction(), Hooks\runWithoutAbort(), User\saveSettings(), Wikimedia\Rdbms\DatabaseMssql\select(), SpecialRandomInCategory\selectRandomPageFromDB(), RandomPage\selectRandomPageFromDB(), DatabaseOracle\selectRow(), Wikimedia\Rdbms\DatabaseMssql\selectSQLText(), Wikimedia\Rdbms\DatabasePostgres\selectSQLText(), HTTPFileStreamer\send404Message(), StreamFile\send404Message(), Wikimedia\Rdbms\TransactionProfiler\setExpectation(), Wikimedia\Rdbms\TransactionProfiler\setExpectations(), MediaWiki\Tests\Maintenance\BaseDumpTest\setUpPrefetch(), MediaWiki\Tests\Maintenance\TextPassDumperDatabaseTest\setUpStub(), Wikimedia\Rdbms\Database\sourceFile(), Wikimedia\Rdbms\Database\sourceStream(), ImportImages\splitFilename(), Wikimedia\Rdbms\Database\startAtomic(), StreamFile\stream(), Wikimedia\Rdbms\Database\tableExists(), Wikimedia\Rdbms\DatabaseMysqlBase\tableExists(), DatabaseTestHelper\tableExists(), ChangeTags\tagUsageStatistics(), 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\unionConditionPermutations(), Wikimedia\Rdbms\Database\update(), WatchedItemStore\updateNotificationTimestamp(), Wikimedia\Rdbms\Database\upsert(), and Wikimedia\Rdbms\DatabaseMysqlBase\upsert().

◆ $messageMemc

$messageMemc = wfGetMessageCacheStorage()

Definition at line 775 of file Setup.php.

◆ $parserMemc

$parserMemc
Initial value:
= new DeprecatedGlobal( 'parserMemc', function () {
return MediaWikiServices::getInstance()->getParserCache()->getCacheStorage();
}, '1.30' )
Class to allow throwing wfDeprecated warnings when people use globals that we do not want them to.
Deprecated
since 1.30

Definition at line 780 of file Setup.php.

◆ $ps_default

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

Definition at line 133 of file Setup.php.

◆ $ps_default2

$ps_default2 = Profiler::instance()->scopedProfileIn( $fname . '-defaults2' )

Definition at line 648 of file Setup.php.

◆ $ps_extensions

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

Definition at line 927 of file Setup.php.

◆ $ps_globals

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

Definition at line 797 of file Setup.php.

◆ $ps_memcached

$ps_memcached = Profiler::instance()->scopedProfileIn( $fname . '-memcached' )

Definition at line 772 of file Setup.php.

◆ $ps_misc

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

Definition at line 708 of file Setup.php.

◆ $ps_session

if(!is_object( $wgAuth)) if ($wgAuth &&! $wgAuth instanceof MediaWiki\Auth\AuthManagerAuthPlugin $ps_session) = Profiler::instance()->scopedProfileIn( $fname . '-session' )

Definition at line 825 of file Setup.php.

◆ $ps_setup

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

Definition at line 113 of file Setup.php.

◆ $ps_validation

$ps_validation = Profiler::instance()->scopedProfileIn( $fname . '-validation' )

Definition at line 632 of file Setup.php.

◆ $rcMaxAgeDays

if ($wgExperimentalHtmlIds) $rcMaxAgeDays = $wgRCMaxAge / ( 3600 * 24 )

Definition at line 366 of file Setup.php.

◆ $serverParts

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

Definition at line 655 of file Setup.php.

◆ $wgCanonicalNamespaceNames

$wgCanonicalNamespaceNames
Initial value:
= [
NS_MEDIA => 'Media',
NS_SPECIAL => '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_HELP
Definition Defines.php:86
const NS_FILE
Definition Defines.php:80
const NS_MEDIAWIKI_TALK
Definition Defines.php:83
const NS_PROJECT_TALK
Definition Defines.php:79
const NS_TEMPLATE
Definition Defines.php:84
const NS_SPECIAL
Definition Defines.php:63
const NS_FILE_TALK
Definition Defines.php:81
const NS_HELP_TALK
Definition Defines.php:87
const NS_CATEGORY_TALK
Definition Defines.php:89
const NS_MEDIA
Definition Defines.php:62
const NS_TALK
Definition Defines.php:75
const NS_USER_TALK
Definition Defines.php:77
const NS_PROJECT
Definition Defines.php:78
const NS_CATEGORY
Definition Defines.php:88
const NS_TEMPLATE_TALK
Definition Defines.php:85

Definitions of the NS_ constants are in Defines.php.

Access:\n private

Definition at line 479 of file Setup.php.

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

◆ $wgCommandLineMode

global $wgCommandLineMode

Definition at line 601 of file Setup.php.

◆ $wgContLang

$wgContLang = Language::factory( $wgLanguageCode )

Definition at line 802 of file Setup.php.

◆ $wgContLanguageCode

$wgContLanguageCode = $wgLanguageCode

Definition at line 512 of file Setup.php.

Referenced by SpecialCiteThisPage\getContentText().

◆ $wgCookiePrefix

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

Definition at line 424 of file Setup.php.

◆ $wgDefaultUserOptions [1/3]

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

Definition at line 382 of file Setup.php.

◆ $wgDefaultUserOptions [2/3]

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

Definition at line 730 of file Setup.php.

◆ $wgDefaultUserOptions [3/3]

$wgDefaultUserOptions[ 'watchlistdays']
Initial value:
= min(
$wgDefaultUserOptions['watchlistdays'],
ceil( $rcMaxAgeDays )
)

Definition at line 386 of file Setup.php.

◆ $wgDummyLanguageCodes

if (is_array($wgExtraNamespaces)) $wgDummyLanguageCodes
Initial value:
= [
'qqq' => 'qqq',
'qqx' => 'qqx',
] + $wgExtraLanguageCodes + LanguageCode::getDeprecatedCodeMapping()
$wgExtraLanguageCodes
List of mappings from one language code to another.
Todo
UGLY UGLY

Definition at line 505 of file Setup.php.

◆ $wgEmailAuthentication

$wgEmailAuthentication = false

Definition at line 432 of file Setup.php.

◆ $wgEnableUserEmail

$wgEnableUserEmail = false

Definition at line 433 of file Setup.php.

◆ $wgEnotifFromEditor

$wgEnotifFromEditor = false

Definition at line 434 of file Setup.php.

◆ $wgEnotifImpersonal

$wgEnotifImpersonal = false

Definition at line 435 of file Setup.php.

◆ $wgEnotifMaxRecips

$wgEnotifMaxRecips = 0

Definition at line 436 of file Setup.php.

◆ $wgEnotifMinorEdits

$wgEnotifMinorEdits = false

Definition at line 437 of file Setup.php.

◆ $wgEnotifRevealEditorAddress

$wgEnotifRevealEditorAddress = false

Definition at line 438 of file Setup.php.

◆ $wgEnotifUseRealName

$wgEnotifUseRealName = false

Definition at line 439 of file Setup.php.

◆ $wgEnotifUserTalk

$wgEnotifUserTalk = false

Definition at line 440 of file Setup.php.

◆ $wgEnotifWatchlist

$wgEnotifWatchlist = false

Definition at line 441 of file Setup.php.

◆ $wgFileExtensions

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

Definition at line 527 of file Setup.php.

◆ $wgFullyInitialised

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

Definition at line 977 of file Setup.php.

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

◆ $wgGalleryOptions

$wgGalleryOptions
Initial value:
= [
'imagesPerRow' => 0,
'imageWidth' => 120,
'imageHeight' => 120,
'captionLength' => true,
'showBytes' => true,
'showDimensions' => true,
'mode' => 'traditional',
]

Default parameters for the "<gallery>" tag.

See also
DefaultSettings.php for description of the fields.

Definition at line 264 of file Setup.php.

◆ $wgHtml5

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

Definition at line 522 of file Setup.php.

◆ $wgInitialSessionId

$wgInitialSessionId = null

Definition at line 830 of file Setup.php.

Referenced by LoginSignupSpecialPage\hasSessionCookie().

◆ $wgJsMimeType

$wgJsMimeType = 'text/javascript'

Definition at line 524 of file Setup.php.

◆ $wgLang

$wgLang = new StubUserLang

Definition at line 907 of file Setup.php.

◆ $wgLockManagers

$wgLockManagers[]
Initial value:
= [
'name' => 'fsLockManager',
'class' => FSLockManager::class,
'lockDirectory' => "{$wgUploadDirectory}/lockdir",
]

Initialise $wgLockManagers to include basic FS version.

Definition at line 250 of file Setup.php.

◆ $wgMemc

$wgMemc = wfGetMainCache()

Definition at line 774 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
)
wfShorthandToInteger( $string='', $default=-1)
Converts shorthand byte notation to integer form.
if($wgMetaNamespace===false) if( $wgResourceLoaderMaxQueryLength===false) $wgMinUploadChunkSize
Definition Setup.php:465
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.

Definition at line 465 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 244 of file Setup.php.

◆ $wgNamespaceAliases [2/2]

$wgNamespaceAliases[ 'Image_talk'] = NS_FILE_TALK

Definition at line 245 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 $wgNamespaceProtection['copyright']['copyright']) && $wgFooterIcons['copyright']['copyright']===[]) if (isset($wgFooterIcons[ 'poweredby']) &&isset($wgFooterIcons[ 'poweredby'][ 'mediawiki']) &&$wgFooterIcons[ 'poweredby'][ 'mediawiki'][ 'src']===null)[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 237 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 at line 917 of file Setup.php.

Referenced by WebInstaller\__construct(), OutputPage\addWikiTextTitle(), ApiQuerySiteinfo\appendExtensionTags(), ApiQuerySiteinfo\appendFunctionHooks(), Cite\checkAnyCalls(), PreprocessDump\checkOptions(), ApiFeedWatchlist\createFeedItem(), SpecialExpandTemplates\execute(), ApiExpandTemplates\execute(), ApiParse\execute(), MaintenanceFormatInstallDoc\execute(), PPFuzzTest\execute(), ApiQueryRevisionsBase\extractRevisionInfo(), EditPage\extractSectionTitle(), TextContent\fillParserOutput(), WikitextContent\fillParserOutput(), SimpleCaptcha\findLinks(), ApiParse\formatSummary(), SpecialExpandTemplates\generateHtml(), MessageCache\getParser(), SpecialVersion\getParserFunctionHooks(), SpecialVersion\getParserTags(), RawAction\getRawText(), WikitextContent\getSection(), PreprocessDump\getStripList(), EditPage\getSummaryPreview(), EditPage\guessSectionName(), SimpleCaptcha\loadText(), TitleBlacklistEntry\newFromString(), EditPage\newSectionSummary(), onContentGetParserOutput(), Installer\parse(), OutputPage\parse(), WikitextContent\preloadTransform(), CssContent\preSaveTransform(), JavaScriptContent\preSaveTransform(), WikitextContent\preSaveTransform(), WikitextContent\replaceSection(), ParserTestRunner\requireFunctionHook(), ParserTestRunner\requireHook(), ParserTestRunner\requireTransparentHook(), UploadFromUrlTestSuite\setUp(), ParserMethodsTest\testCallParserFunction(), ParserMethodsTest\testGetSections(), ParserMethodsTest\testPreSaveTransform(), and ParserMethodsTest\testRecursiveParse().

◆ $wgProfiler

if (!defined('MEDIAWIKI')) $wgProfiler = []

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

Pre-config setup: Before loading LocalSettings.php

Definition at line 41 of file Setup.php.

Referenced by Maintenance\activateProfiler(), DatabaseUpdater\doEnableProfiling(), Profiler\instance(), and DatabaseSqliteTest\testUpgrades().

◆ $wgRequest

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

Definition at line 737 of file Setup.php.

Referenced by SimpleCaptcha\badLoginKey(), SpecialPageFactory\capturePath(), RecentChange\checkIPAddress(), FeedUtils\checkPurge(), LoginForm\clearCreateaccountToken(), LoginForm\clearLoginThrottle(), LoginForm\clearLoginToken(), SimpleCaptcha\confirmEmailUser(), ChannelFeed\contentType(), ApiTestCase\doApiRequest(), UploadFromUrlTest\doApiRequest(), SimpleCaptcha\doConfirmEdit(), MediaWikiTestCase\doLightweightServiceReset(), ApiEditPage\execute(), FileDeleteForm\execute(), SpamBlacklist\filter(), LanguageConverter\findVariantLink(), WebInstaller\getAcceptLanguage(), LoginForm\getCreateaccountToken(), LanguageConverter\getHeaderVariant(), Title\getLocalURL(), LoginForm\getLoginToken(), ParserCache\getParserOutputKey(), User\getRequest(), AtomFeed\getSelfUrl(), MWExceptionHandler\getURL(), LanguageConverter\getURLVariant(), RequestContext\importScopedSession(), LoginForm\incrementLoginThrottle(), CategoryTreeHooks\initialize(), SimpleCaptcha\isIPWhitelisted(), RecentChange\newLogEntry(), ReCaptchaNoCaptcha\passCaptcha(), ReCaptcha\passCaptcha(), ApiLogoutTest\setUp(), UploadFromUrlTestSuite\setUp(), FileDeleteForm\showForm(), FancyCaptcha\showImage(), MediaWikiTestCase\tearDown(), LanguageConverterTest\testGetPreferredVariantDefaultLanguageVsUrlVariant(), LanguageConverterTest\testGetPreferredVariantHeaderMulti(), LanguageConverterTest\testGetPreferredVariantHeaders(), LanguageConverterTest\testGetPreferredVariantHeaderUserVsUrl(), LanguageConverterTest\testGetPreferredVariantHeaderWeight(), LanguageConverterTest\testGetPreferredVariantHeaderWeight2(), ApiLogoutTest\testUserLogoutWithWebToken(), OutputPage\transformCssMedia(), wfExpandUrl(), and wfInstallerMain().

◆ $wgServerName

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

Definition at line 660 of file Setup.php.

◆ $wgSessionsInObjectCache

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

Definition at line 583 of file Setup.php.

◆ $wgSkipSkins

$wgSkipSkins[] = 'fallback'

Definition at line 396 of file Setup.php.

◆ $wgTitle

$wgTitle = null

Definition at line 924 of file Setup.php.

◆ $wgUseEnotif

$wgUseEnotif = false

◆ $wgUser

User $wgUser = RequestContext::getMain()->getUser()

Definition at line 902 of file Setup.php.

Referenced by ApiMain\__construct(), Revision\__construct(), ParserOptions\__construct(), Installer\__construct(), LocalFileDeleteBatch\__construct(), UploadStash\__construct(), LogPage\addEntry(), SpecialPageFactory\capturePath(), AjaxResponse\checkLastModified(), FeedUtils\checkPurge(), SimpleCaptcha\confirmEmailUser(), Language\dateFormat(), ApiTestCase\doApiRequest(), SimpleCaptcha\doConfirmEdit(), FileDeleteForm\doDelete(), WikiPage\doDeleteArticleReal(), WikiPage\doEditContent(), ApiTestCase\doLogin(), WikiEditorHooks\EditPageBeforeEditToolbar(), FileDeleteForm\execute(), CleanupSpam\execute(), TableCleanup\execute(), DeleteBatch\execute(), DeleteDefaultMessages\execute(), DeleteEqualMessages\execute(), EditCLI\execute(), ImportImages\execute(), ImportSiteScripts\execute(), MoveBatch\execute(), PPFuzzTest\execute(), Undelete\execute(), SimpleCaptcha\findLinks(), ApiQueryInfo\getBlockToken(), Revision\getComment(), Revision\getContent(), ApiQueryInfo\getDeleteToken(), ApiQueryInfo\getEditToken(), ApiQueryInfo\getEmailToken(), LogEventsList\getExcludeClause(), GenderCache\getGenderOf(), ApiQueryInfo\getImportToken(), WebRequest\getLimitOffset(), ApiQueryInfo\getMoveToken(), Title\getNotificationTimestamp(), ApiQueryInfo\getOptionsToken(), MessageCache\getParserOptions(), ApiQueryRecentChanges\getPatrolToken(), LanguageConverter\getPreferredVariant(), ApiQueryInfo\getProtectToken(), SpecialPageFactory\getRestrictedPages(), ApiQueryRevisions\getRollbackToken(), SpecialPageFactory\getUsablePages(), Revision\getUser(), ApiQueryUsers\getUserrightsToken(), Revision\getUserText(), LanguageConverter\getUserVariant(), ApiQueryInfo\getWatchToken(), RequestContext\importScopedSession(), Revision\insertOn(), Title\isValidMoveOperation(), UploadFromUrl\isValidRequest(), SpamBlacklist\logFilterHit(), RecentChange\markPatrolled(), Title\moveTo(), SimpleCaptcha\needCreateAccountCaptcha(), Revision\newNullRevision(), OATHAuthHooks\onTwoFactorIsEnabled(), WikiPage\prepareContentForEdit(), PatrolLog\record(), LocalFile\recordUpload(), LocalFile\recordUpload2(), ReplaceTextJob\run(), DoubleRedirectJob\run(), LoginSignupSpecialPage\setSessionUserForCurrentRequest(), ApiLogoutTest\setUp(), UploadFromUrlTestSuite\setUp(), FileDeleteForm\showForm(), ApiUserrightsTest\testBlockedWithUserrights(), LanguageConverterTest\testGetPreferredVariantHeaderUserVsUrl(), LanguageConverterTest\testGetPreferredVariantUserOption(), LanguageConverterTest\testGetPreferredVariantUserOptionForForeignLanguage(), UserTest\testSoftBlockRanges(), ApiMainTest\testSuppressedLogin(), ApiLogoutTest\testUserLogout(), ApiLogoutTest\testUserLogoutBadToken(), ApiLogoutTest\testUserLogoutWithWebToken(), LogEventsList\typeAction(), PageArchive\undelete(), Language\userAdjust(), Title\userCan(), LogEventsList\userCanBitfield(), Revision\userCanBitfield(), LogEventsList\userCanViewLogType(), Linker\userToolLinks(), and Title\validateFileMoveOperation().

◆ $wgUserEmailUseReplyTo

$wgUserEmailUseReplyTo = false

Definition at line 444 of file Setup.php.

◆ $wgUsersNotifiedOnAllChanges

$wgUsersNotifiedOnAllChanges = []

Definition at line 445 of file Setup.php.

◆ $wgVirtualRestConfig

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

Definition at line 682 of file Setup.php.

◆ $wgXhtmlDefaultNamespace

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

Definition at line 523 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 90 of file Setup.php.

◆ if

if(file_exists("$IP/StartProfiler.php")) ( file_exists("$IP/StartProfiler.php") )

Definition at line 42 of file Setup.php.

◆ MW_SERVICE_BOOTSTRAP_COMPLETE

const MW_SERVICE_BOOTSTRAP_COMPLETE($wgSharedDB &&$wgSharedTables) ( $wgSharedDB &&) 1

Definition at line 626 of file Setup.php.