X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2FNoLocalSettings.php;h=f6f4cd3a3ef752e70154ac559975190958e5ae88;hb=78e0fc3a70f5d917bc526f1c6ede4d455f46cb47;hp=b8bfd6a4f0055fb1289bc7e3aa923b069b4c5b05;hpb=2b7fbceb23a4737de36cfc48d542a21dd6f53a7a;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/NoLocalSettings.php b/includes/NoLocalSettings.php index b8bfd6a4f0..f6f4cd3a3e 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; } } @@ -54,9 +52,8 @@ try { echo $templateParser->processTemplate( 'NoLocalSettings', [ - 'wgVersion' => ( isset( $wgVersion ) ? $wgVersion : 'VERSION' ), + 'wgVersion' => ( $wgVersion ?? 'VERSION' ), 'path' => $path, - 'ext' => $ext, 'localSettingsExists' => file_exists( MW_CONFIG_FILE ), 'installerStarted' => $installerStarted ]