X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2FNoLocalSettings.php;h=46e9630f3497dae06c5c42c0659ca0185ebe57f3;hb=0d57b370dfe726af5f3ecf210f9f352ad9e26f0f;hp=50950ef30031556e393fedff5f5f8a7fada46c0c;hpb=237d3271fd313ebe09858a5c442a91216a7b61cf;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/NoLocalSettings.php b/includes/NoLocalSettings.php index 50950ef300..46e9630f34 100644 --- a/includes/NoLocalSettings.php +++ b/includes/NoLocalSettings.php @@ -22,13 +22,11 @@ # T32219 : can not use pathinfo() on URLs since slashes do not match $matches = []; -$ext = 'php'; $path = '/'; foreach ( array_filter( explode( '/', $_SERVER['PHP_SELF'] ) ) as $part ) { - if ( !preg_match( '/\.(php5?)$/', $part, $matches ) ) { + if ( !preg_match( '/\.(php)$/', $part, $matches ) ) { $path .= "$part/"; } else { - $ext = $matches[1] == 'php5' ? 'php5' : 'php'; break; } } @@ -50,12 +48,12 @@ $templateParser = new TemplateParser(); # Render error page if no LocalSettings file can be found try { + global $wgVersion; echo $templateParser->processTemplate( 'NoLocalSettings', [ 'wgVersion' => ( isset( $wgVersion ) ? $wgVersion : 'VERSION' ), 'path' => $path, - 'ext' => $ext, 'localSettingsExists' => file_exists( MW_CONFIG_FILE ), 'installerStarted' => $installerStarted ]