X-Git-Url: https://git.cyclocoop.org/%20%27.%28%24debut%20%20%20%24par_page%29.%27?a=blobdiff_plain;f=mw-config%2Findex.php;h=b625c96002c92ce47430890b0d2c045841b1413a;hb=ce5b591b70e149d0e306bc17eea8cdd2a2301b39;hp=a47822bb815f9dcdb880cb55f5c37c61951ba739;hpb=e8250af240815c7ff44787c9f82fe393d0dde211;p=lhc%2Fweb%2Fwiklou.git diff --git a/mw-config/index.php b/mw-config/index.php index a47822bb81..b625c96002 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->getCheck( 'uselang' ) ) { + $langCode = $request->getVal( 'uselang' ); } elseif ( isset( $session['settings']['_UserLang'] ) ) { $langCode = $session['settings']['_UserLang']; } else {