MediaWiki  REL1_24
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( 'MEDIAWIKI')) $fname = 'Setup.php'
 This file is not a valid entry point, perform no further processing unless MEDIAWIKI is defined.
 $messageMemc = wfGetMessageCacheStorage()
 $parserMemc = wfGetParserCacheStorage()
if($wgCanonicalServer===false$serverParts = wfParseUrl( $wgCanonicalServer )
global $wgCommandLineMode
 $wgContLang = Language::factory( $wgLanguageCode )
if(is_array($wgExtraNamespaces)) $wgContLanguageCode = $wgLanguageCode
if($wgLocalInterwiki) if($wgSharedPrefix===false)
if(!$wgCookiePrefix) 
$wgCookiePrefix = strtr( $wgCookiePrefix, '=,; +."\'\\[', '__________' )
 $wgDeferredUpdateList = array()
if(!$wgHtml5Version
&&$wgAllowRdfaAttributes) 
$wgFileExtensions = array_values( array_diff ( $wgFileExtensions, $wgFileBlacklist ) )
 $wgFullyInitialised = true
if($wgUseFileCache||$wgUseSquid) $wgHtml5 = true
 $wgJsMimeType = 'text/javascript'
 $wgLang = new StubUserLang
 $wgLangConvMemc = wfGetLangConverterCacheStorage()
 $wgLockManagers []
 Initialise $wgLockManagers to include basic FS version.
 $wgMemc = wfGetMainCache()
 $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(!isset($wgVersion)) if($wgScript===false)
if($wgLoadScript===false) if($wgArticlePath===false)
if(!empty($wgActionPaths)&&!isset($wgActionPaths['view']))
if($wgStylePath===false) if($wgLocalStylePath===false)
if($wgStyleDirectory===false)
if($wgExtensionAssetsPath===false)
if($wgResourceBasePath===null)
if($wgLogo===false) if($wgUploadPath===false)
if($wgUploadDirectory===false)
if($wgReadOnlyFile===false) if($wgFileCacheDirectory===false)
if($wgDeletedDirectory===false)
if($wgGitInfoCacheDirectory===false
&&$wgCacheDirectory!==false)
if($wgRightsIcon) if(isset($wgFooterIcons['copyright'])&&isset($wgFooterIcons['copyright']['copyright'])&&$wgFooterIcons['copyright']['copyright']===array())
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.
 $wgOut = RequestContext::getMain()->getOutput()
 $wgParser = new StubObject( 'wgParser', $wgParserConf['class'], array( $wgParserConf ) )
if($wgServerName!==false$wgServerName = $serverParts['host']
 $wgSkipSkins [] = 'fallback'
 $wgTitle = null
 $wgUser = RequestContext::getMain()->getUser()
 $wgXhtmlDefaultNamespace = 'http://www.w3.org/1999/xhtml'

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

if (!defined( 'MEDIAWIKI')) $fname = 'Setup.php'

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

Definition at line 35 of file Setup.php.

Referenced by Skin\__call(), DummyLinker\__call(), lessc\__construct(), lessc\cachedCompile(), DatabaseTestHelper\checkFunctionName(), TextPassDumperTest\checkpointHelper(), lessc\compileFile(), DatabaseMssql\delete(), DatabaseMssql\deleteJoin(), DatabaseBase\endAtomic(), DatabaseMssql\estimateRowCount(), lessc\evaluate(), lessc_parser\func(), lessc\funcToColor(), SearchHighlighter\highlightSimple(), SearchHighlighter\highlightText(), DatabaseMssql\indexInfo(), DatabasePostgres\indexInfo(), DatabaseMssql\insertSelect(), LocalFile\loadFieldsWithTimestamp(), moveToExternal(), DatabaseTestHelper\nativeReplace(), XmlTypeCheck\newFromFilename(), DatabaseTestHelper\query(), ImageListPager\reallyDoQuery(), SearchHighlighter\removeWiki(), DatabaseBase\reportQueryError(), resolveStub(), resolveStubs(), DatabaseMssql\select(), RandomPage\selectRandomPageFromDB(), SpecialRandomInCategory\selectRandomPageFromDB(), DatabaseMssql\selectSQLText(), TextPassDumperTest\setUpStub(), splitFilename(), StreamFile\stream(), DatabaseTestHelper\tableExists(), BackupDumperPageTest\testCurrentStubGzip(), BackupDumperPageTest\testCurrentStubPlain(), ExportDemoTest\testExportDemo(), BackupDumperPageTest\testFullStubPlain(), BackupDumperPageTest\testFullTextPlain(), BaseDumpTest\testPageMissAtEnd(), BackupDumperLoggerTest\testPlain(), BaseDumpTest\testRevisionMissAtEnd(), BaseDumpTest\testSequential(), BaseDumpTest\testSynchronizePageMiss(), BaseDumpTest\testSynchronizePageMissAtStart(), BaseDumpTest\testSynchronizeRevisionMissAtStart(), BaseDumpTest\testSynchronizeRevisionMissToPage(), BaseDumpTest\testSynchronizeRevisionMissToRevision(), GlobalTest\testWfMkdirParents(), BackupDumperLoggerTest\testXmlDumpsBackupUseCaseLogging(), and XmlTypeCheck\validateFromFile().

$messageMemc = wfGetMessageCacheStorage()

Definition at line 562 of file Setup.php.

$parserMemc = wfGetParserCacheStorage()

Definition at line 563 of file Setup.php.

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

Definition at line 483 of file Setup.php.

$wgContLang = Language::factory( $wgLanguageCode )

Definition at line 594 of file Setup.php.

if (is_array($wgExtraNamespaces)) $wgContLanguageCode = $wgLanguageCode
Todo:
UGLY UGLY

Definition at line 386 of file Setup.php.

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

Definition at line 315 of file Setup.php.

Referenced by WebResponse\setcookie().

$wgDeferredUpdateList = array()

Definition at line 635 of file Setup.php.

Referenced by DeferredUpdates\clearPendingUpdates(), and DeferredUpdates\doUpdates().

if (!$wgHtml5Version &&$wgAllowRdfaAttributes) $wgFileExtensions = array_values( array_diff ( $wgFileExtensions, $wgFileBlacklist ) )
$wgFullyInitialised = true

Definition at line 664 of file Setup.php.

Referenced by MWExceptionHandler\handle(), and MWExceptionTest\testUseOutputPage().

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

Definition at line 398 of file Setup.php.

$wgJsMimeType = 'text/javascript'

Definition at line 400 of file Setup.php.

$wgLang = new StubUserLang

Definition at line 609 of file Setup.php.

$wgLangConvMemc = wfGetLangConverterCacheStorage()

Definition at line 564 of file Setup.php.

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

Initialise $wgLockManagers to include basic FS version.

Definition at line 162 of file Setup.php.

$wgMemc = wfGetMainCache()

Definition at line 561 of file Setup.php.

$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 156 of file Setup.php.

Referenced by UploadFromUrlTestSuite\setUp(), and NewParserTest\tearDown().

$wgNamespaceAliases['Image_talk'] = NS_FILE_TALK

Definition at line 157 of file Setup.php.

if (!isset($wgVersion)) if ($wgScript===false) if ($wgLoadScript===false) if ($wgArticlePath===false) if (!empty($wgActionPaths)&&!isset($wgActionPaths['view'])) if ($wgStylePath===false) if ($wgLocalStylePath===false) if ($wgStyleDirectory===false) if ($wgExtensionAssetsPath===false) if ($wgResourceBasePath===null) if ($wgLogo===false) if ($wgUploadPath===false) if ($wgUploadDirectory===false) if ($wgReadOnlyFile===false) if ($wgFileCacheDirectory===false) if ($wgDeletedDirectory===false) if ($wgGitInfoCacheDirectory===false &&$wgCacheDirectory!==false) if ($wgRightsIcon) if (isset($wgFooterIcons['copyright'])&&isset($wgFooterIcons['copyright']['copyright'])&&$wgFooterIcons['copyright']['copyright']===array()) 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 149 of file Setup.php.

Referenced by MWNamespace\getRestrictionLevels(), and UploadFromUrlTestSuite\setUp().

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

Definition at line 488 of file Setup.php.

Referenced by MachineReadableRCFeedFormatter\getLine().

$wgSkipSkins[] = 'fallback'

Definition at line 293 of file Setup.php.

Referenced by Skin\getAllowedSkins().

$wgTitle = null

Definition at line 629 of file Setup.php.

User $wgUser = RequestContext::getMain()->getUser()
$wgXhtmlDefaultNamespace = 'http://www.w3.org/1999/xhtml'

Definition at line 399 of file Setup.php.