MediaWiki REL1_34
|
Include most things that are needed to make MediaWiki work. More...
Go to the source code of this file.
Variables | |
$cpPosInfo | |
$debug = "HTTP HEADERS:\n" | |
$messageMemc = wfGetMessageCacheStorage() | |
$rcMaxAgeDays = $wgRCMaxAge / ( 3600 * 24 ) | |
if( $wgServer===false) foreach(['wgArticlePath', 'wgVariantArticlePath'] as $varName) if( $wgCanonicalServer===false) | $serverParts = wfParseUrl( $wgCanonicalServer ) |
$wgCanonicalNamespaceNames = NamespaceInfo::$canonicalNames | |
Definitions of the NS_ constants are in Defines.php. | |
$wgContLang = MediaWikiServices::getInstance()->getContentLanguage() | |
foreach(LanguageCode::getNonstandardLanguageCodeMapping() as $code=> $bcp47) | $wgContLanguageCode = $wgLanguageCode |
if($wgLocalInterwiki) if( $wgSharedPrefix===false) if($wgSharedSchema===false) if(! $wgCookiePrefix) | $wgCookiePrefix = strtr( $wgCookiePrefix, '=,; +."\'\\[', '__________' ) |
$wgDefaultUserOptions ['rcdays'] | |
if(is_null( $wgLocalTZoffset)) | $wgDefaultUserOptions ['timecorrection'] = "System|$wgLocalTZoffset" |
$wgDefaultUserOptions ['watchlistdays'] | |
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. | |
$wgInitialSessionId = null | |
$wgLang = new StubUserLang | |
$wgLockManagers [] | |
Initialise $wgLockManagers to include basic FS version. | |
$wgMemc = ObjectCache::getLocalClusterInstance() | |
if(isset($wgSysopEmailBans) &&$wgSysopEmailBans===false) if( $wgMetaNamespace===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($wgRestPath===false) if( $wgArticlePath===false) 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( $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(! $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. | |
if( $wgServerName !==false) | $wgServerName = $serverParts['host'] |
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 |
if(defined( 'MW_CONFIG_CALLBACK')) | else |
Load LocalSettings.php. | |
if(ini_get('mbstring.func_overload')) | if (!defined('MW_ENTRY_POINT')) |
Pre-config setup: Before loading LocalSettings.php. | |
const | MW_SERVICE_BOOTSTRAP_COMPLETE 1 |
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.
$cpPosInfo |
$debug = "HTTP HEADERS:\n" |
Definition at line 783 of file Setup.php.
Referenced by ResourceLoaderContext\getDebug(), MWDebug\getDebugInfo(), WikiImporter\setDebug(), Exif\validate(), and wfThumbError().
$messageMemc = wfGetMessageCacheStorage() |
Definition at line 791 of file Setup.php.
Referenced by TitleBlacklist\getHttp(), and BaseBlacklist\getHttpText().
if($wgServer===false) foreach([ 'wgArticlePath', 'wgVariantArticlePath'] as $varName) if ($wgCanonicalServer===false) $serverParts = wfParseUrl( $wgCanonicalServer ) |
$wgCanonicalNamespaceNames = NamespaceInfo::$canonicalNames |
Definitions of the NS_ constants are in Defines.php.
Definition at line 470 of file Setup.php.
Referenced by wfInstallerMain().
Language $wgContLang = MediaWikiServices::getInstance()->getContentLanguage() |
Definition at line 800 of file Setup.php.
Referenced by CliInstaller\__construct(), Scribunto_LuaTitleLibrary\checkNamespace(), GeneratePhpCharToUpperMappings\execute(), Scribunto_LuaLanguageLibrary\getContLangCode(), Scribunto_LuaSiteLibrary\getNsIndex(), SpecialReplaceText\namespaceTables(), Scribunto_LuaLanguageLibrary\register(), Scribunto_LuaMessageLibrary\register(), Scribunto_LuaSiteLibrary\register(), WebInstaller\setupLanguage(), and Scribunto_LuaLanguageLibraryTest\testFormatDateTTLs().
foreach (LanguageCode::getNonstandardLanguageCodeMapping() as $code=> $bcp47) $wgContLanguageCode = $wgLanguageCode |
Definition at line 498 of file Setup.php.
Referenced by SpecialCiteThisPage\getContentText().
$wgDefaultUserOptions[ 'rcdays'] |
if (is_null($wgLocalTZoffset)) $wgDefaultUserOptions[ 'timecorrection'] = "System|$wgLocalTZoffset" |
$wgDefaultUserOptions[ 'watchlistdays'] |
$wgFileExtensions = array_values( array_diff( $wgFileExtensions, $wgFileBlacklist ) ) |
foreach($wgExtensionFunctions as $func) if(!defined( 'MW_NO_SESSION') &&! $wgCommandLineMode) if (! $wgCommandLineMode) $wgFullyInitialised = true |
Definition at line 931 of file Setup.php.
Referenced by User\clearInstanceCache(), User\isSafeToLoad(), and User\load().
$wgGalleryOptions |
Default parameters for the "<gallery>" tag.
$wgInitialSessionId = null |
Definition at line 809 of file Setup.php.
Referenced by LoginSignupSpecialPage\hasSessionCookie().
Language $wgLang = new StubUserLang |
Definition at line 880 of file Setup.php.
Referenced by ApiMain\__construct(), PermissionsError\__construct(), CliInstaller\__construct(), ParserOptions\__construct(), LogPage\actionText(), SpecialEditWatchlist\buildTools(), MediaWiki\Special\SpecialPageFactory\capturePath(), MediaWiki\Permissions\PermissionManager\checkActionPermissions(), UploadBase\checkUnwantedFileExtensions(), Installer\envCheckDB(), LocalFileRestoreBatch\execute(), WebInstallerLanguage\execute(), WebInstallerOptions\execute(), UpdateMediaWiki\execute(), SpecialReplaceText\extractContext(), StubUserLang\findVariantLink(), Linker\formatAutocomments(), FeedUtils\formatDiffRow(), Scribunto_LuaSandboxEngine\formatLimitData(), Scribunto_LuaStandaloneEngine\formatLimitData(), SpecialVersion\getCopyrightAndAuthorList(), User\getDatePreference(), File\getDescriptionText(), ForeignDBFile\getDescriptionText(), ReCaptchaNoCaptcha\getFormInformation(), MediaHandler\getGeneralShortDesc(), WebInstallerOutput\getLanguage(), ImageHandler\getLongDesc(), SvgHandler\getLongDesc(), GIFHandler\getLongDesc(), PNGHandler\getLongDesc(), Title\getPageLanguage(), ContentHandler\getPageLanguage(), Title\getPageViewLanguage(), EditPage\getPreviewLimitReport(), ImageHandler\getShortDesc(), SpecialVersion\getVersionLinkedGit(), WebInstallerOptions\makeScreenshotsLink(), Xml\monthSelector(), Html\namespaceSelectorOptions(), User\newFatalPermissionDeniedStatus(), SpecialReplaceText\pageListForm(), FileDeleteForm\prepareMessage(), User\sendConfirmationMail(), LoginSignupSpecialPage\setSessionUserForCurrentRequest(), WebInstaller\setupLanguage(), ForeignAPIFile\transform(), MWException\useMessageCache(), Linker\userToolLinks(), wfGetLangObj(), and wfInstallerMain().
$wgLockManagers[] |
$wgMemc = ObjectCache::getLocalClusterInstance() |
Definition at line 790 of file Setup.php.
Referenced by Installer\__construct(), ClearInterwikiCache\execute(), PageImages\Hooks\LinksUpdateHookHandler\getBlacklist(), TextExtracts\ApiQueryExtracts\getFromCache(), ApiCategoryTree\getHTML(), ForkController\initChild(), FancyCaptcha\pickImageDir(), FancyCaptcha\pickImageFromDir(), FancyCaptcha\pickImageFromList(), ForkController\prepareEnvironment(), and TextExtracts\ApiQueryExtracts\setCache().
if(isset( $wgSysopEmailBans) && $wgSysopEmailBans===false) if ($wgMetaNamespace===false) $wgMinUploadChunkSize |
$wgNamespaceAliases[ 'Image'] = NS_FILE |
$wgNamespaceAliases[ 'Image_talk'] = NS_FILE_TALK |
if( $wgScript===false) if($wgLoadScript===false) if( $wgRestPath===false) if($wgArticlePath===false) 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($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' |
OutputPage $wgOut = RequestContext::getMain()->getOutput() |
Definition at line 885 of file Setup.php.
Referenced by MediaWiki\Special\SpecialPageFactory\capturePath(), FeedUtils\checkFeedOutput(), UploadBase\detectVirus(), FileDeleteForm\execute(), ChannelFeed\httpHeaders(), QuickTemplate\msgWiki(), GeSHi\parse_code(), ThrottledError\report(), BadRequestError\report(), ErrorPageError\report(), PermissionsError\report(), LocalFileLockError\report(), MWExceptionRenderer\reportHTML(), MWException\reportHTML(), FileDeleteForm\setHeaders(), FileDeleteForm\showForm(), QuestyCaptcha\showHelp(), SimpleCaptcha\showHelp(), FancyCaptcha\showImage(), FileDeleteForm\showLogEntries(), wfHttpError(), and wfVarDump().
Parser $wgParser |
Definition at line 891 of file Setup.php.
Referenced by ScribuntoContent\fillParserOutput(), SimpleCaptcha\findLinks(), SimpleCaptcha\loadText(), TitleBlacklistEntry\newFromString(), onContentGetParserOutput(), and ApiScribuntoConsole\runConsole().
if (! $wgDBerrorLogTZ) $wgRequest = RequestContext::getMain()->getRequest() |
Definition at line 751 of file Setup.php.
Referenced by SimpleCaptcha\badLoginKey(), MediaWiki\Special\SpecialPageFactory\capturePath(), RecentChange\checkIPAddress(), SimpleCaptcha\confirmEmailUser(), ChannelFeed\contentType(), SimpleCaptcha\doConfirmEdit(), ApiEditPage\execute(), FileDeleteForm\execute(), SpamBlacklist\filter(), LanguageConverter\findVariantLink(), WebInstaller\getAcceptLanguage(), LanguageConverter\getHeaderVariant(), Title\getLocalURL(), ParserCache\getParserOutputKey(), User\getRequest(), AtomFeed\getSelfUrl(), MWExceptionHandler\getURL(), LanguageConverter\getURLVariant(), RequestContext\importScopedSession(), CategoryTreeHooks\initialize(), SimpleCaptcha\isIPWhitelisted(), MediaWiki\Rest\EntryPoint\main(), RecentChange\newLogEntry(), MediaWiki\Extensions\ConfirmEdit\hCaptcha\HCaptcha\passCaptcha(), ReCaptchaNoCaptcha\passCaptcha(), FileDeleteForm\showForm(), FancyCaptcha\showImage(), OutputPage\transformCssMedia(), and wfExpandUrl().
if ($wgServerName !==false) $wgServerName = $serverParts['host'] |
$wgUseEnotif = false |
Definition at line 437 of file Setup.php.
Referenced by User\clearAllNotifications(), User\clearNotification(), and RecentChange\save().
if (!defined('MW_NO_SESSION') &&! $wgCommandLineMode) else |
if(ini_get( 'mbstring.func_overload')) if(!defined( 'MW_ENTRY_POINT')) | ( | ! | defined'MW_ENTRY_POINT' | ) |