MediaWiki REL1_37
|
The setup for all MediaWiki processes (both web-based and CLI). More...
Go to the source code of this file.
Variables | |
$rcMaxAgeDays = $wgRCMaxAge / ( 3600 * 24 ) | |
$serverParts = wfParseUrl( $wgCanonicalServer ) | |
if(! $wgDBerrorLogTZ) | $wgCanonicalNamespaceNames = NamespaceInfo::CANONICAL_NAMES |
Definitions of the NS_ constants are in Defines.php. | |
if(! $wgCookiePrefix) | $wgCookiePrefix = strtr( $wgCookiePrefix, '=,; +."\'\\[', '__________' ) |
$wgDefaultUserOptions ['rcdays'] | |
if( $wgLocalTZoffset===null) | $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, $wgProhibitedFileExtensions ) ) | |
if(!defined('MW_NO_SESSION') &&! $wgCommandLineMode) if(! $wgCommandLineMode) | $wgFullyInitialised = true |
$wgGalleryOptions | |
Default parameters for the "<gallery>" tag. | |
if(MW_ENTRY_POINT==='index') MediaWiki Session SessionId null | $wgInitialSessionId = null |
The persistent session ID (if any) loaded at startup. | |
$wgLang = new StubUserLang | |
$wgLockManagers [] | |
Initialise $wgLockManagers to include basic FS version. | |
if( $wgRightsIcon) if(isset($wgFooterIcons[ 'copyright'][ 'copyright']) &&$wgFooterIcons[ 'copyright'][ 'copyright']===[]) 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 | |
$wgRequest = RequestContext::getMain()->getRequest() | |
if(!defined( 'MEDIAWIKI')) | $wgScopeTest = 'MediaWiki Setup.php scope test' |
Environment checks. | |
if( $wgServerName !==false) | $wgServerName = $serverParts['host'] |
$wgTitle = null | |
$wgUseEnotif = false | |
$wgUserEmailUseReplyTo = false | |
$wgUsersNotifiedOnAllChanges = [] | |
if($wgServer===false) if( $wgCanonicalServer===false) | $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 |
The setup for all MediaWiki processes (both web-based and CLI).
This file must be included by all entry points (such as WebStart.php and doMaintenance.php).
It does:
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.
$serverParts = wfParseUrl( $wgCanonicalServer ) |
if (! $wgDBerrorLogTZ) $wgCanonicalNamespaceNames = NamespaceInfo::CANONICAL_NAMES |
Definitions of the NS_ constants are in Defines.php.
if (! $wgCookiePrefix) $wgCookiePrefix = strtr( $wgCookiePrefix, '=,; +."\'\\[', '__________' ) |
$wgDefaultUserOptions[ 'rcdays'] |
if ($wgLocalTZoffset===null) $wgDefaultUserOptions[ 'timecorrection'] = "System|$wgLocalTZoffset" |
$wgDefaultUserOptions[ 'watchlistdays'] |
$wgFileExtensions = array_values( array_diff( $wgFileExtensions, $wgProhibitedFileExtensions ) ) |
if(!defined( 'MW_NO_SESSION') &&! $wgCommandLineMode) if (! $wgCommandLineMode) $wgFullyInitialised = true |
Definition at line 885 of file Setup.php.
Referenced by User\clearInstanceCache(), User\isSafeToLoad(), User\load(), and User\loadFromCache().
$wgGalleryOptions |
Default parameters for the "<gallery>" tag.
if (MW_ENTRY_POINT==='index') MediaWiki Session SessionId null $wgInitialSessionId = null |
The persistent session ID (if any) loaded at startup.
Definition at line 750 of file Setup.php.
Referenced by LoginSignupSpecialPage\hasSessionCookie().
Language StubUserLang $wgLang = new StubUserLang |
Definition at line 831 of file Setup.php.
Referenced by ApiMain\__construct(), PermissionsError\__construct(), CliInstaller\__construct(), ParserOptions\__construct(), LogPage\actionText(), SpecialEditWatchlist\buildTools(), MediaWiki\SpecialPage\SpecialPageFactory\capturePath(), MediaWiki\Permissions\PermissionManager\checkActionPermissions(), UploadBase\checkUnwantedFileExtensions(), Installer\envCheckDB(), LocalFileRestoreBatch\execute(), WebInstallerLanguage\execute(), WebInstallerOptions\execute(), UpdateMediaWiki\execute(), Linker\formatAutocomments(), SpecialVersion\getCopyrightAndAuthorList(), User\getDatePreference(), File\getDescriptionText(), ForeignDBFile\getDescriptionText(), MediaHandler\getGeneralShortDesc(), WebInstallerOutput\getLanguage(), ImageHandler\getLongDesc(), SvgHandler\getLongDesc(), GIFHandler\getLongDesc(), PNGHandler\getLongDesc(), Title\getPageLanguage(), ContentHandler\getPageLanguage(), Title\getPageViewLanguage(), ImageHandler\getShortDesc(), SpecialVersion\getVersionLinkedGit(), WebInstallerOptions\makeScreenshotsLink(), Xml\monthSelector(), Html\namespaceSelectorOptions(), User\newFatalPermissionDeniedStatus(), Installer\resetMediaWikiServices(), User\sendConfirmationMail(), LoginSignupSpecialPage\setSessionUserForCurrentRequest(), WebInstaller\setupLanguage(), ForeignAPIFile\transform(), Linker\userToolLinks(), wfGetLangObj(), and wfInstallerMain().
$wgLockManagers[] |
if($wgRightsIcon) if(isset( $wgFooterIcons['copyright']['copyright']) && $wgFooterIcons['copyright']['copyright']===[]) if (isset($wgFooterIcons[ 'poweredby']) &&isset($wgFooterIcons[ 'poweredby'][ 'mediawiki']) &&$wgFooterIcons[ 'poweredby'][ 'mediawiki'][ 'src']===null) $wgNamespaceProtection[NS_MEDIAWIKI] = 'editinterface' |
OutputPage $wgOut = RequestContext::getMain()->getOutput() |
Definition at line 836 of file Setup.php.
Referenced by MediaWiki\SpecialPage\SpecialPageFactory\capturePath(), FeedUtils\checkFeedOutput(), UploadBase\detectVirus(), ChannelFeed\httpHeaders(), ThrottledError\report(), BadRequestError\report(), ErrorPageError\report(), PermissionsError\report(), LocalFileLockError\report(), MWException\reportHTML(), MWExceptionRenderer\reportHTML(), wfHttpError(), and wfVarDump().
Parser $wgParser |
$wgRequest = RequestContext::getMain()->getRequest() |
Definition at line 702 of file Setup.php.
Referenced by MediaWiki\SpecialPage\SpecialPageFactory\capturePath(), RecentChange\checkIPAddress(), ChannelFeed\contentType(), ApiEditPage\execute(), LanguageConverter\findVariantLink(), WebInstaller\getAcceptLanguage(), LanguageConverter\getHeaderVariant(), Title\getLocalURL(), AtomFeed\getSelfUrl(), MWExceptionHandler\getURL(), LanguageConverter\getURLVariant(), RequestContext\importScopedSession(), MediaWiki\Rest\EntryPoint\main(), RecentChange\newLogEntry(), OutputPage\transformCssMedia(), wfApiMain(), wfExpandUrl(), wfLoadMain(), wfOpenSearchDescMain(), and wfThumbMain().
if ($wgServerName !==false) $wgServerName = $serverParts['host'] |
Title null $wgTitle = null |
Definition at line 849 of file Setup.php.
Referenced by MediaWiki\SpecialPage\SpecialPageFactory\capturePath(), Parser\cleanSig(), ApiEditPage\execute(), ApiParse\execute(), Parser\extractSections(), RequestContext\getTitle(), MediaWiki\main(), MediaWiki\Rest\EntryPoint\main(), Linker\makeExternalLink(), MessageCache\parse(), MediaWiki\performRequest(), Parser\transformMsg(), and wfApiMain().
$wgUseEnotif = false |
Definition at line 481 of file Setup.php.
Referenced by RecentChange\save().
if (!defined('MW_NO_SESSION') &&! $wgCommandLineMode) else |
if | ( | ! | defined'MW_ENTRY_POINT' | ) |
Pre-config setup: Before loading LocalSettings.php.
Expand dynamic defaults and shortcuts.
These are changes and additions to runtime that don't vary on site configuration.
Definition at line 88 of file Setup.php.
Referenced by MediaWiki\Revision\RevisionStore\newRevisionsFromBatch(), and SpecialWhatLinksHere\showIndirectLinks().