29require_once dirname( __FILE__ ) .
'/../includes/PHPVersionCheck.php';
32define(
'MW_CONFIG_CALLBACK',
'Installer::overrideConfig' );
33define(
'MEDIAWIKI_INSTALL',
true );
37chdir( dirname( __DIR__ ) );
38require dirname( __DIR__ ) .
'/includes/WebStart.php';
44 $request = RequestContext::getMain()->getRequest();
48 if ( !$installer->startSession() ) {
49 if ( $installer->request->getVal(
'css' ) ) {
51 $installer->outputCss();
55 $errors = $installer->getPhpErrors();
56 $installer->showError(
'config-session-error', $errors[0] );
61 $fingerprint = $installer->getFingerprint();
62 if ( isset( $_SESSION[
'installData'][$fingerprint] ) ) {
63 $session = $_SESSION[
'installData'][$fingerprint];
68 if ( $request->getCheck(
'uselang' ) ) {
69 $langCode = $request->getVal(
'uselang' );
70 } elseif ( isset( $session[
'settings'][
'_UserLang'] ) ) {
71 $langCode = $session[
'settings'][
'_UserLang'];
75 $wgLang = MediaWikiServices::getInstance()->getLanguageFactory()->getLanguage( $langCode );
76 RequestContext::getMain()->setLanguage(
$wgLang );
78 $installer->setParserLanguage(
$wgLang );
82 $session = $installer->execute( $session );
84 $_SESSION[
'installData'][$fingerprint] = $session;
$wgCanonicalNamespaceNames
Canonical namespace names.
$wgMetaNamespace
Name of the project namespace.
wfEntryPointCheck( $format='text', $scriptPath='/')
Check PHP version and that external dependencies are installed, and display an informative error if e...
static getWebInstaller(WebRequest $request)
Instantiates and returns an instance of WebInstaller or its descendant classes.