X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2FNoLocalSettings.php;h=46e9630f3497dae06c5c42c0659ca0185ebe57f3;hb=0d57b370dfe726af5f3ecf210f9f352ad9e26f0f;hp=b0a6b7bd0499956298485849825259a03bc99290;hpb=8eac2feedb7ee093d2c48504e1eb2b8a9dbc8452;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/NoLocalSettings.php b/includes/NoLocalSettings.php index b0a6b7bd04..46e9630f34 100644 --- a/includes/NoLocalSettings.php +++ b/includes/NoLocalSettings.php @@ -20,15 +20,13 @@ * @file */ -# bug 30219 : can not use pathinfo() on URLs since slashes do not match +# 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 ]