MediaWiki  1.23.2
index.php
Go to the documentation of this file.
1 <?php
23 define( 'MW_CONFIG_CALLBACK', 'Installer::overrideConfig' );
24 define( 'MEDIAWIKI_INSTALL', true );
25 
26 // Resolve relative to regular MediaWiki root
27 // instead of mw-config subdirectory.
28 chdir( dirname( __DIR__ ) );
29 require dirname( __DIR__ ) . '/includes/WebStart.php';
30 
32 
33 function wfInstallerMain() {
34  global $wgRequest, $wgLang, $wgMetaNamespace, $wgCanonicalNamespaceNames;
35 
36  $installer = InstallerOverrides::getWebInstaller( $wgRequest );
37 
38  if ( !$installer->startSession() ) {
39  $installer->finish();
40  exit;
41  }
42 
43  $fingerprint = $installer->getFingerprint();
44  if ( isset( $_SESSION['installData'][$fingerprint] ) ) {
45  $session = $_SESSION['installData'][$fingerprint];
46  } else {
47  $session = array();
48  }
49 
50  if ( !is_null( $wgRequest->getVal( 'uselang' ) ) ) {
51  $langCode = $wgRequest->getVal( 'uselang' );
52  } elseif ( isset( $session['settings']['_UserLang'] ) ) {
53  $langCode = $session['settings']['_UserLang'];
54  } else {
55  $langCode = 'en';
56  }
57  $wgLang = Language::factory( $langCode );
58 
59  $installer->setParserLanguage( $wgLang );
60 
61  $wgMetaNamespace = $wgCanonicalNamespaceNames[NS_PROJECT];
62 
63  $session = $installer->execute( $session );
64 
65  $_SESSION['installData'][$fingerprint] = $session;
66 
67 }
php
skin txt MediaWiki includes four core it has been set as the default in MediaWiki since the replacing Monobook it had been been the default skin since before being replaced by Vector largely rewritten in while keeping its appearance Several legacy skins were removed in the as the burden of supporting them became too heavy to bear Those in etc for skin dependent CSS etc for skin dependent JavaScript These can also be customised on a per user by etc This feature has led to a wide variety of user styles becoming that gallery is a good place to ending in php
Definition: skin.txt:62
wfInstallerMain
wfInstallerMain()
Definition: index.php:33
$wgCanonicalNamespaceNames
if( $wgMetaNamespace===false) if( $wgResourceLoaderMaxQueryLength===false) $wgCanonicalNamespaceNames
Definitions of the NS_ constants are in Defines.php.
Definition: Setup.php:304
NS_PROJECT
const NS_PROJECT
Definition: Defines.php:83
array
the array() calling protocol came about after MediaWiki 1.4rc1.
List of Api Query prop modules.
global
when a variable name is used in a it is silently declared as a new masking the global
Definition: design.txt:93
InstallerOverrides\getWebInstaller
static getWebInstaller(WebRequest $request)
Instantiates and returns an instance of WebInstaller or its descendant classes.
Definition: overrides.php:66
$wgLang
this class mediates it Skin Encapsulates a look and feel for the wiki All of the functions that render HTML and make choices about how to render it are here and are called from various other places when and is meant to be subclassed with other skins that may override some of its functions The User object contains a reference to a and so rather than having a global skin object we just rely on the global User and get the skin with $wgUser and also has some character encoding functions and other locale stuff The current user interface language is instantiated as $wgLang
Definition: design.txt:56
Language\factory
static factory( $code)
Get a cached or new language object for a given language code.
Definition: Language.php:184