X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=mw-config%2Findex.php;h=df3f6e550072f7a6b8f61967a4cee13ac1dd4783;hb=d0dde424397715fec187a3464d669c77a99716c6;hp=a47822bb815f9dcdb880cb55f5c37c61951ba739;hpb=9b670fb797813a8ed35750e2c83fe953a10f349e;p=lhc%2Fweb%2Fwiklou.git diff --git a/mw-config/index.php b/mw-config/index.php index a47822bb81..df3f6e5500 100644 --- a/mw-config/index.php +++ b/mw-config/index.php @@ -25,7 +25,7 @@ // dependencies. Using dirname( __FILE__ ) here because __DIR__ is PHP5.3+. // phpcs:ignore MediaWiki.Usage.DirUsage.FunctionFound require_once dirname( __FILE__ ) . '/../includes/PHPVersionCheck.php'; -wfEntryPointCheck( 'mw-config/index.php' ); +wfEntryPointCheck( 'html', dirname( dirname( $_SERVER['SCRIPT_NAME'] ) ) ); define( 'MW_CONFIG_CALLBACK', 'Installer::overrideConfig' ); define( 'MEDIAWIKI_INSTALL', true ); @@ -38,12 +38,13 @@ require dirname( __DIR__ ) . '/includes/WebStart.php'; wfInstallerMain(); function wfInstallerMain() { - global $wgRequest, $wgLang, $wgMetaNamespace, $wgCanonicalNamespaceNames; + global $wgLang, $wgMetaNamespace, $wgCanonicalNamespaceNames; + $request = RequestContext::getMain()->getRequest(); - $installer = InstallerOverrides::getWebInstaller( $wgRequest ); + $installer = InstallerOverrides::getWebInstaller( $request ); if ( !$installer->startSession() ) { - if ( $installer->request->getVal( "css" ) ) { + if ( $installer->request->getVal( 'css' ) ) { // Do not display errors on css pages $installer->outputCss(); exit; @@ -62,8 +63,8 @@ function wfInstallerMain() { $session = array(); } - if ( !is_null( $wgRequest->getVal( 'uselang' ) ) ) { - $langCode = $wgRequest->getVal( 'uselang' ); + if ( $request->getVal( 'uselang' ) !== null ) { + $langCode = $request->getVal( 'uselang' ); } elseif ( isset( $session['settings']['_UserLang'] ) ) { $langCode = $session['settings']['_UserLang']; } else {