Non-word characters don't terminate tag names.
[mediawiki.git] / mw-config / index.php
blob570b426edcd0cd99efba2531fb3517d43635f8a7
1 <?php
2 /**
3 * New version of MediaWiki web-based config/installation
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License along
16 * with this program; if not, write to the Free Software Foundation, Inc.,
17 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18 * http://www.gnu.org/copyleft/gpl.html
20 * @file
23 define( 'MW_CONFIG_CALLBACK', 'Installer::overrideConfig' );
24 define( 'MEDIAWIKI_INSTALL', true );
26 chdir( dirname( __DIR__ ) );
27 require dirname( __DIR__ ) . '/includes/WebStart.php';
29 wfInstallerMain();
31 function wfInstallerMain() {
32 global $wgRequest, $wgLang, $wgMetaNamespace, $wgCanonicalNamespaceNames;
34 $installer = InstallerOverrides::getWebInstaller( $wgRequest );
36 if ( !$installer->startSession() ) {
37 $installer->finish();
38 exit;
41 $fingerprint = $installer->getFingerprint();
42 if ( isset( $_SESSION['installData'][$fingerprint] ) ) {
43 $session = $_SESSION['installData'][$fingerprint];
44 } else {
45 $session = array();
48 if ( !is_null( $wgRequest->getVal( 'uselang' ) ) ) {
49 $langCode = $wgRequest->getVal( 'uselang' );
50 } elseif ( isset( $session['settings']['_UserLang'] ) ) {
51 $langCode = $session['settings']['_UserLang'];
52 } else {
53 $langCode = 'en';
55 $wgLang = Language::factory( $langCode );
57 $installer->setParserLanguage( $wgLang );
59 $wgMetaNamespace = $wgCanonicalNamespaceNames[NS_PROJECT];
61 $session = $installer->execute( $session );
63 $_SESSION['installData'][$fingerprint] = $session;