X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2FNoLocalSettings.php;h=46e9630f3497dae06c5c42c0659ca0185ebe57f3;hb=899f475d0dad8ea0a24f706fc8ac07e3097d6191;hp=50950ef30031556e393fedff5f5f8a7fada46c0c;hpb=dae4c94d893057345f62a3d498fb85c0a54de5a6;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 ]