MediaWiki
REL1_22
|
Include most things that's need to customize the site. 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($wgMetaNamespace===false) if($wgResourceLoaderMaxQueryLength===false) | $wgCanonicalNamespaceNames |
Definitions of the NS_ constants are in Defines.php. | |
if($wgArticleCountMethod===null) if($wgInvalidateCacheOnLocalSettingsChange) if($wgNewUserLog) if($wgCookieSecure=== 'detect') if($wgRC2UDPAddress) global | $wgCommandLineMode |
$wgContLang = Language::factory( $wgLanguageCode ) | |
if(is_array($wgExtraNamespaces)) | $wgContLanguageCode = $wgLanguageCode |
if(is_null($wgEnableAutoRotation)) if($wgRCFilterByAge) if($wgSkipSkin) 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) if(!$wgEnotifMinorEdits) foreach($wgDisabledActions as $action) | $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($wgLogo===false) if($wgUploadPath===false) if($wgUploadDirectory===false) if($wgReadOnlyFile===false) if($wgFileCacheDirectory===false) if($wgDeletedDirectory===false) if(isset($wgFileStore['deleted']['directory'])) 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(!is_object($wgAuth)) | $wgTitle = null |
$wgUseEnotif = $wgEnotifUserTalk || $wgEnotifWatchlist | |
$wgUser = RequestContext::getMain()->getUser() | |
$wgXhtmlDefaultNamespace = 'http://www.w3.org/1999/xhtml' |
Include most things that's need to customize the site.
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.
This file is not a valid entry point, perform no further processing unless MEDIAWIKI is defined.
Definition at line 37 of file Setup.php.
Referenced by Skin\__call(), DummyLinker\__call(), ImportStreamSource\__construct(), lessc\__construct(), StubObject\_unstub(), lessc\cachedCompile(), DatabaseTestHelper\checkFunctionName(), TextPassDumperTest\checkpointHelper(), Profiler\collateData(), lessc\compileFile(), DatabasePostgres\duplicateTableStructure(), DatabaseMssql\estimateRowCount(), DatabasePostgres\estimateRowCount(), lessc\evaluate(), lessc_parser\func(), lessc\funcToColor(), Profiler\getCallTreeLine(), Profiler\getFunctionReport(), DatabaseMssql\indexInfo(), DatabasePostgres\indexInfo(), DatabasePostgres\indexUnique(), DatabaseMssql\insert(), DatabaseOracle\insert(), DatabasePostgres\insert(), DatabaseMssql\insertSelect(), DatabasePostgres\insertSelect(), DatabasePostgres\listTables(), moveToExternal(), DatabaseTestHelper\nativeReplace(), XmlTypeCheck\newFromFilename(), DatabaseTestHelper\query(), DatabaseOracle\queryIgnore(), DatabasePostgres\queryIgnore(), ImageListPager\reallyDoQuery(), DatabasePostgres\reportQueryError(), DatabaseOracle\reportQueryError(), resolveStub(), resolveStubs(), RefreshLinksJob\runForTitleInternal(), DatabaseMssql\select(), RandomPage\selectRandomPageFromDB(), SpecialRandomInCategory\selectRandomPageFromDB(), DatabaseOracle\selectRow(), DatabaseMssql\selectSQLText(), DatabasePostgres\selectSQLText(), TextPassDumperTest\setUpStub(), splitFilename(), StreamFile\stream(), DatabaseTestHelper\tableExists(), BackupDumperPageTest\testCurrentStubGzip(), BackupDumperPageTest\testCurrentStubPlain(), 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(), XmlTypeCheck\validateFromFile(), ExportDemoTest\validateXmlFileAgainstXsd(), and wfStreamFile().
$messageMemc = wfGetMessageCacheStorage() |
$parserMemc = wfGetParserCacheStorage() |
if ($wgMetaNamespace===false) if ($wgResourceLoaderMaxQueryLength===false) $wgCanonicalNamespaceNames |
array( 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', )
Definitions of the NS_ constants are in Defines.php.
Definition at line 307 of file Setup.php.
Referenced by MWNamespace\getCanonicalNamespaces(), and wfInstallerMain().
if ($wgArticleCountMethod===null) if ($wgInvalidateCacheOnLocalSettingsChange) if ($wgNewUserLog) if ($wgCookieSecure=== 'detect') if ($wgRC2UDPAddress) global $wgCommandLineMode |
Definition at line 396 of file Setup.php.
Referenced by Http\isLocalURL(), DatabasePostgres\open(), DatabaseUpdater\output(), WikiImporter\processTitle(), wfBacktrace(), and wfOut().
$wgContLang = Language::factory( $wgLanguageCode ) |
if (is_array($wgExtraNamespaces)) $wgContLanguageCode = $wgLanguageCode |
if (is_null($wgEnableAutoRotation)) if ($wgRCFilterByAge) if ($wgSkipSkin) if ($wgSharedPrefix===false) if (!$wgCookiePrefix) $wgCookiePrefix = strtr( $wgCookiePrefix, '=,; +."\'\\[', '__________' ) |
Definition at line 288 of file Setup.php.
Referenced by ApiLogin\execute(), ResourceLoaderStartUpModule\getConfig(), and WebResponse\setcookie().
$wgDeferredUpdateList = array() |
Definition at line 568 of file Setup.php.
Referenced by DeferredUpdates\clearPendingUpdates(), and DeferredUpdates\doUpdates().
if (!$wgHtml5Version &&$wgAllowRdfaAttributes) $wgFileExtensions = array_values( array_diff ( $wgFileExtensions, $wgFileBlacklist ) ) |
Definition at line 370 of file Setup.php.
Referenced by ApiQuerySiteinfo\appendFileExtensions(), UploadBase\checkWarnings(), StreamFile\contentTypeFromPath(), ResourceLoaderStartUpModule\getConfig(), and UploadBase\getTitle().
$wgFullyInitialised = true |
Definition at line 597 of file Setup.php.
Referenced by MWExceptionHandler\handle().
$wgJsMimeType = 'text/javascript' |
Definition at line 358 of file Setup.php.
Referenced by SkinTemplate\outputPage().
$wgLang = new StubUserLang |
$wgLangConvMemc = wfGetLangConverterCacheStorage() |
$wgLockManagers[] |
$wgMemc = wfGetMainCache() |
$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 143 of file Setup.php.
Referenced by ApiQuerySiteinfo\appendNamespaceAliases(), UploadFromUrlTestSuite\setUp(), NewParserTest\setUp(), and NewParserTest\tearDown().
$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 ($wgLogo===false) if ($wgUploadPath===false) if ($wgUploadDirectory===false) if ($wgReadOnlyFile===false) if ($wgFileCacheDirectory===false) if ($wgDeletedDirectory===false) if (isset($wgFileStore['deleted']['directory'])) 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 136 of file Setup.php.
Referenced by Title\isNamespaceProtected(), and UploadFromUrlTestSuite\setUp().
$wgOut = RequestContext::getMain()->getOutput() |
Definition at line 553 of file Setup.php.
Referenced by ProtectionForm\buildCleanupScript(), ProtectionForm\buildForm(), SpecialPageFactory\capturePath(), FeedUtils\checkFeedOutput(), UploadBase\detectVirus(), RebuildFileCache\execute(), ProtectionForm\execute(), ChangesFeed\loadFromCache(), Skin\makeGlobalVariablesScript(), QuickTemplate\msgWiki(), EditPage\noSuchSectionPage(), ParserOutput\replaceEditSectionLinksCallback(), ErrorPageError\report(), BadTitleError\report(), PermissionsError\report(), ThrottledError\report(), MWException\reportHTML(), ProtectionForm\save(), UploadFromUrlTestSuite\setUp(), RdfMetaData\setup(), ProtectionForm\show(), EditPage\showConflict(), wfHttpError(), and wfVarDump().
$wgParser = new StubObject( 'wgParser', $wgParserConf['class'], array( $wgParserConf ) ) |
Definition at line 558 of file Setup.php.
Referenced by ApiQuerySiteinfo\appendExtensionTags(), ApiQuerySiteinfo\appendFunctionHooks(), PreprocessDump\checkOptions(), Preferences\cleanSignature(), ApiFeedWatchlist\createFeedItem(), RefreshLinks\doRefreshLinks(), ApiExpandTemplates\execute(), MaintenanceFormatInstallDoc\execute(), PPFuzzTest\execute(), ApiQueryRevisions\extractRowInfo(), SpecialVersion\getExtensionCredits(), TextContent\getParserOutput(), WikitextContent\getParserOutput(), RawAction\getRawText(), WikitextContent\getSection(), PreprocessDump\getStripList(), WikitextContent\preloadTransform(), JavaScriptContent\preSaveTransform(), CssContent\preSaveTransform(), WikitextContent\preSaveTransform(), Preferences\profilePreferences(), WikitextContent\replaceSection(), NewParserTest\requireFunctionHook(), NewParserTest\requireHook(), UploadFromUrlTestSuite\setUp(), ParserMethodsTest\testCallParserFunction(), ParserMethodsTest\testGetSections(), ParserMethodsTest\testPreSaveTransform(), and Preferences\validateSignature().
$wgUser = RequestContext::getMain()->getUser() |
Definition at line 543 of file Setup.php.
Referenced by ProtectionForm\__construct(), ProtectionForm\buildForm(), ProtectionForm\buildSelector(), SpecialPageFactory\capturePath(), FeedUtils\checkPurge(), ResourceLoaderUserTokensModule\contextUserTokens(), create_function(), Undelete\execute(), DeleteDefaultMessages\execute(), CleanupSpam\execute(), ImportSiteScripts\execute(), EditCLI\execute(), CapsCleanup\execute(), DeleteBatch\execute(), TableCleanup\execute(), MoveBatch\execute(), DeleteEqualMessages\execute(), PPFuzzTest\execute(), ApiQueryInfo\getBlockToken(), ApiQueryInfo\getDeleteToken(), ApiQueryInfo\getEditToken(), ApiQueryInfo\getEmailToken(), GenderCache\getGenderOf(), ApiQueryInfo\getImportToken(), ResourceLoaderUserCSSPrefsModule\getModifiedTime(), ResourceLoaderUserOptionsModule\getModifiedTime(), ApiQueryInfo\getMoveToken(), Title\getNotificationTimestamp(), ApiQueryInfo\getOptionsToken(), ResourceLoaderUserGroupsModule\getPages(), ApiQueryRecentChanges\getPatrolToken(), ApiQueryInfo\getProtectToken(), SpecialPageFactory\getRestrictedPages(), ApiQueryRevisions\getRollbackToken(), ResourceLoaderUserOptionsModule\getScript(), ResourceLoaderUserCSSPrefsModule\getStyles(), SpecialPageFactory\getUsablePages(), ApiQueryUsers\getUserrightsToken(), ApiQueryInfo\getWatchToken(), EditPage\importFormData(), Title\isValidMoveOperation(), UploadFromUrl\isValidRequest(), Linker\linkAttribs(), ProtectionForm\loadData(), Linker\makeSizeLinkObj(), Title\moveTo(), Title\moveToInternal(), PatrolLog\record(), DoubleRedirectJob\run(), ProtectionForm\save(), UploadFromUrlTestSuite\setUp(), ExtraParserTest\testBug8689(), WikiPageTest\testDoQuickEdit(), WikiPageTest\testDoQuickEditContent(), LanguageConverterTest\testGetPreferredVariantHeaderUserVsUrl(), LanguageConverterTest\testGetPreferredVariantUserOption(), LanguageConverterTest\testGetPreferredVariantUserOptionForForeignLanguage(), ExtraParserTest\testPreSaveTransform(), TitleTest\testWgWhitelistReadRegexp(), Title\updateTitleProtection(), Title\userCan(), Title\userIsWatching(), Linker\userToolLinks(), Title\validateFileMoveOperation(), and wfLogProfilingData().