ParamValidator: Flag as unstable for 1.34
[lhc/web/wiklou.git] / includes / NoLocalSettings.php
index b8bfd6a..f6f4cd3 100644 (file)
 
 # 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
                ]