MediaWiki
1.23.2
|
Include most things that are needed to make MediaWiki work. More...
Go to the source code of this file.
Variables | |
$debug = "\n\nStart request {$wgRequest->getMethod()} {$wgRequest->getRequestURL()}\n" | |
if(!defined( 'MEDIAWIKI')) | $fname = 'Setup.php' |
This file is not a valid entry point, perform no further processing unless MEDIAWIKI is defined. More... | |
$messageMemc = wfGetMessageCacheStorage() | |
$parserMemc = wfGetParserCacheStorage() | |
if( $wgMetaNamespace===false) if( $wgResourceLoaderMaxQueryLength===false) | $wgCanonicalNamespaceNames |
Definitions of the NS_ constants are in Defines.php. More... | |
global | $wgCommandLineMode |
$wgContLang = Language::factory( $wgLanguageCode ) | |
if(is_array( $wgExtraNamespaces)) | $wgContLanguageCode = $wgLanguageCode |
if( $wgRCFilterByAge) if( $wgSkipSkin) 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) if(! $wgEnotifMinorEdits) | $wgHtml5 = true |
$wgJsMimeType = 'text/javascript' | |
$wgLang = new StubUserLang | |
$wgLangConvMemc = wfGetLangConverterCacheStorage() | |
$wgLockManagers [] | |
Initialise $wgLockManagers to include basic FS version. More... | |
$wgMemc = wfGetMainCache() | |
$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(!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. More... | |
$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' | |
if(is_null( $wgLocalTZoffset)) if( $wgCommandLineMode) | else |
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.
Definition at line 498 of file Setup.php.
Referenced by DatabaseBase\debug(), MWDebug\debugMsg(), MWDebug\getDebugHTML(), MWDebug\getDebugInfo(), MWDebug\getHTMLDebugLog(), ResourceLoader\makeLoaderQuery(), ResourceLoader\makeLoaderURL(), MemcachedPhpBagOStuff\setDebug(), MultiWriteBagOStuff\setDebug(), WikiImporter\setDebug(), Exif\validate(), and wfThumbError().
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(), Article\__call(), DummyLinker\__call(), lessc\__construct(), Article\__get(), Article\__set(), StubObject\_unstub(), DumpTestCase\assertDumpStart(), DatabaseSqlite\attachDatabase(), DatabaseBase\begin(), IndexPager\buildQueryInfo(), lessc\cachedCompile(), DatabaseTestHelper\checkFunctionName(), AjaxResponse\checkLastModified(), TextPassDumperTest\checkpointHelper(), Profiler\collateData(), lessc\compileFile(), DatabaseBase\deadlockLoop(), DatabaseMssql\delete(), DatabaseOracle\delete(), DatabaseBase\delete(), DatabaseMssql\deleteJoin(), DatabaseMysqlBase\deleteJoin(), DatabaseBase\deleteJoin(), IndexPager\doQuery(), DatabaseSqlite\duplicateTableStructure(), DatabaseMysqlBase\duplicateTableStructure(), DatabaseBase\endAtomic(), DatabaseMysqlBase\estimateRowCount(), DatabaseMssql\estimateRowCount(), DatabaseBase\estimateRowCount(), lessc\evaluate(), DatabasePostgres\freeResult(), lessc_parser\func(), lessc\funcToColor(), QueryPage\getCachedTimestamp(), Profiler\getCallTreeLine(), Profiler\getFunctionReport(), Profiler\getRawData(), DumpTestCase\gunzip(), SearchHighlighter\highlightSimple(), SearchHighlighter\highlightText(), DatabaseBase\indexExists(), DatabaseSqlite\indexInfo(), DatabaseMysqlBase\indexInfo(), DatabaseMssql\indexInfo(), DatabaseSqlite\indexUnique(), DatabaseOracle\insert(), DatabaseBase\insert(), DatabaseMssql\insertSelect(), DatabaseBase\insertSelect(), DatabaseMysqlBase\listTables(), LocalFile\loadExtraFromDB(), LocalFile\loadFromDB(), moveToExternal(), DatabaseTestHelper\nativeReplace(), DatabaseBase\nativeReplace(), RecentChange\newFromConds(), XmlTypeCheck\newFromFilename(), ImportStreamSource\newFromUpload(), LocalFile\nextHistoryLine(), EmailNotification\notifyOnPageChange(), DatabaseTestHelper\query(), DatabaseBase\query(), DatabaseOracle\queryIgnore(), ImageListPager\reallyDoQuery(), IndexPager\reallyDoQuery(), QueryPage\reallyDoQuery(), QueryPage\recache(), SearchHighlighter\removeWiki(), DatabaseMysqlBase\replace(), DatabaseBase\replace(), DatabaseOracle\reportQueryError(), DatabaseBase\reportQueryError(), resolveStub(), resolveStubs(), DatabaseMssql\select(), DatabaseBase\select(), DatabaseBase\selectField(), RandomPage\selectRandomPageFromDB(), SpecialRandomInCategory\selectRandomPageFromDB(), DatabaseOracle\selectRow(), DatabaseBase\selectRow(), DatabaseMssql\selectSQLText(), BaseDumpTest\setUpPrefetch(), TextPassDumperTest\setUpStub(), DatabaseBase\sourceFile(), DatabaseBase\sourceStream(), splitFilename(), DatabaseBase\startAtomic(), StreamFile\stream(), DatabaseTestHelper\tableExists(), DatabaseBase\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(), DatabaseBase\update(), DatabaseMysqlBase\upsert(), DatabaseBase\upsert(), and XmlTypeCheck\validateFromFile().
$messageMemc = wfGetMessageCacheStorage() |
$parserMemc = wfGetParserCacheStorage() |
if ($wgMetaNamespace===false) if ($wgResourceLoaderMaxQueryLength===false) $wgCanonicalNamespaceNames |
Definitions of the NS_ constants are in Defines.php.
Definition at line 304 of file Setup.php.
Referenced by MWNamespace\getCanonicalNamespaces(), and wfInstallerMain().
global $wgCommandLineMode |
Definition at line 401 of file Setup.php.
Referenced by DatabaseBase\__construct(), Maintenance\finalSetup(), Http\isLocalURL(), Maintenance\loadSettings(), DatabaseUpdater\output(), WikiImporter\processTitle(), Maintenance\setup(), and MWExceptionTest\testisCommandLine().
$wgContLang = Language::factory( $wgLanguageCode ) |
if (is_array($wgExtraNamespaces)) $wgContLanguageCode = $wgLanguageCode |
if ($wgRCFilterByAge) if ($wgSkipSkin) if ($wgLocalInterwiki) if ($wgSharedPrefix===false) if (! $wgCookiePrefix) $wgCookiePrefix = strtr( $wgCookiePrefix, '=,; +."\'\\[', '__________' ) |
Definition at line 286 of file Setup.php.
Referenced by ApiLogin\execute(), OutputPage\getCacheVaryCookies(), ResourceLoaderStartUpModule\getConfig(), WebRequest\getCookie(), and WebResponse\setcookie().
$wgDeferredUpdateList = array() |
Definition at line 577 of file Setup.php.
Referenced by DeferredUpdates\clearPendingUpdates(), and DeferredUpdates\doUpdates().
if (! $wgHtml5Version &&$wgAllowRdfaAttributes) $wgFileExtensions = array_values( array_diff ( $wgFileExtensions, $wgFileBlacklist ) ) |
Definition at line 362 of file Setup.php.
Referenced by ApiUpload\checkVerification(), UploadBase\checkWarnings(), StreamFile\contentTypeFromPath(), ResourceLoaderStartUpModule\getConfig(), UploadForm\getExtensionsMessage(), UploadBase\getTitle(), SpecialUpload\processVerificationError(), and UploadBaseTest\testMaxUploadSize().
$wgFullyInitialised = true |
Definition at line 606 of file Setup.php.
Referenced by MWExceptionHandler\handle(), and MWExceptionTest\testUseOutputPage().
$wgJsMimeType = 'text/javascript' |
Definition at line 350 of file Setup.php.
Referenced by SkinTemplate\prepareQuickTemplate().
$wgLang = new StubUserLang |
$wgLangConvMemc = wfGetLangConverterCacheStorage() |
$wgLockManagers[] |
Initialise $wgLockManagers to include basic FS version.
Definition at line 148 of file Setup.php.
Referenced by LockManagerGroup\initFromGlobals().
$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 142 of file Setup.php.
Referenced by NamespaceConflictChecker\checkAll(), Language\getNamespaceIds(), and UploadFromUrlTestSuite\setUp().
$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 135 of file Setup.php.
Referenced by MWNamespace\getRestrictionLevels(), Title\isNamespaceProtected(), SpecialListGroupRights\outputNamespaceProtectionInfo(), UploadFromUrlTestSuite\setUp(), and TitlePermissionTest\testSpecialsAndNSPermissions().
$wgOut = RequestContext::getMain()->getOutput() |
Definition at line 562 of file Setup.php.
Referenced by ProtectionForm\buildCleanupScript(), ProtectionForm\buildForm(), SpecialPageFactory\capturePath(), FeedUtils\checkFeedOutput(), UploadBase\detectVirus(), RebuildFileCache\execute(), FileDeleteForm\execute(), ProtectionForm\execute(), ChangesFeed\loadFromCache(), Skin\makeGlobalVariablesScript(), QuickTemplate\msgWiki(), ParserOutput\replaceEditSectionLinksCallback(), ThrottledError\report(), BadTitleError\report(), PermissionsError\report(), ErrorPageError\report(), MWException\reportHTML(), ProtectionForm\save(), FileDeleteForm\setHeaders(), UploadFromUrlTestSuite\setUp(), ProtectionForm\show(), FileDeleteForm\showForm(), FileDeleteForm\showLogEntries(), and MWExceptionTest\testUseOutputPage().
$wgParser = new StubObject( 'wgParser', $wgParserConf['class'], array( $wgParserConf ) ) |
Definition at line 567 of file Setup.php.
Referenced by WebInstaller\__construct(), OutputPage\addWikiTextTitle(), PreprocessDump\checkOptions(), Preferences\cleanSignature(), ApiFeedWatchlist\createFeedItem(), RefreshLinks\doRefreshLinks(), ApiParse\execute(), ApiExpandTemplates\execute(), MaintenanceFormatInstallDoc\execute(), SpecialExpandTemplates\execute(), PPFuzzTest\execute(), ApiQueryRevisions\extractRowInfo(), SpecialExpandTemplates\generateHtml(), MessageCache\getParser(), SpecialVersion\getParserFunctionHooks(), TextContent\getParserOutput(), WikitextContent\getParserOutput(), SpecialVersion\getParserTags(), RawAction\getRawText(), WikitextContent\getSection(), PreprocessDump\getStripList(), SpecialListGroupRights\outputNamespaceProtectionInfo(), Installer\parse(), OutputPage\parse(), WikitextContent\preloadTransform(), JavaScriptContent\preSaveTransform(), CssContent\preSaveTransform(), WikitextContent\preSaveTransform(), WikiPage\preSaveTransform(), Preferences\profilePreferences(), WikitextContent\replaceSection(), UploadFromUrlTestSuite\setUp(), ParserMethodsTest\testCallParserFunction(), ParserMethodsTest\testGetSections(), ParserMethodsTest\testPreSaveTransform(), and Preferences\validateSignature().
$wgUseEnotif = $wgEnotifUserTalk || $wgEnotifWatchlist |
Definition at line 288 of file Setup.php.
Referenced by User\clearAllNotifications(), User\clearNotification(), and RecentChange\save().
$wgUser = RequestContext::getMain()->getUser() |
Definition at line 552 of file Setup.php.
Referenced by ProtectionForm\__construct(), UploadStash\__construct(), ApiMain\__construct(), Installer\__construct(), ParserOptions\__construct(), Revision\__construct(), LogPage\addEntry(), LoginForm\addNewAccount(), User\addNewUserLogEntry(), LoginForm\authenticateUserData(), ProtectionForm\buildForm(), ProtectionForm\buildSelector(), SpecialPageFactory\capturePath(), AjaxResponse\checkLastModified(), FeedUtils\checkPurge(), ResourceLoaderUserTokensModule\contextUserTokens(), Language\dateFormat(), ApiTestCase\doApiRequest(), LocalFileDeleteBatch\doDBInserts(), FileDeleteForm\doDelete(), WikiPage\doDeleteArticleReal(), WikiPage\doEditContent(), Undelete\execute(), DeleteDefaultMessages\execute(), CleanupSpam\execute(), ImportSiteScripts\execute(), CapsCleanup\execute(), EditCLI\execute(), DeleteBatch\execute(), TableCleanup\execute(), MoveBatch\execute(), FileDeleteForm\execute(), DeleteEqualMessages\execute(), PPFuzzTest\execute(), User\getBlockedStatus(), ApiQueryInfo\getBlockToken(), ApiQueryInfo\getDeleteToken(), ApiQueryInfo\getEditToken(), ApiQueryInfo\getEmailToken(), LogEventsList\getExcludeClause(), GenderCache\getGenderOf(), ApiQueryInfo\getImportToken(), WebRequest\getLimitOffset(), 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(), RequestContext\importScopedSession(), Title\isValidMoveOperation(), UploadFromUrl\isValidRequest(), Linker\linkAttribs(), ProtectionForm\loadData(), RecentChange\markPatrolled(), Title\moveTo(), Title\moveToInternal(), AjaxDispatcher\performAction(), WikiPage\prepareContentForEdit(), WikiPage\preSaveTransform(), DatabaseBase\query(), PatrolLog\record(), LocalFile\recordUpload(), LocalFile\recordUpload2(), DoubleRedirectJob\run(), ProtectionForm\save(), UploadFromUrlTestSuite\setUp(), FileDeleteForm\showForm(), WikiPageTest\testDoQuickEdit(), WikiPageTest\testDoQuickEditContent(), LanguageConverterTest\testGetPreferredVariantHeaderUserVsUrl(), LanguageConverterTest\testGetPreferredVariantUserOption(), LanguageConverterTest\testGetPreferredVariantUserOptionForForeignLanguage(), TitleTest\testWgWhitelistReadRegexp(), LogEventsList\typeAction(), PageArchive\undelete(), WikiPage\updateRestrictions(), Title\updateTitleProtection(), ChangesList\usePatrol(), Language\userAdjust(), Title\userCan(), LogEventsList\userCanBitfield(), Revision\userCanBitfield(), Title\userIsWatching(), Linker\userToolLinks(), and Title\validateFileMoveOperation().