X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=includes%2FNoLocalSettings.php;h=b8bfd6a4f0055fb1289bc7e3aa923b069b4c5b05;hp=d299ab6ff5dbe4b37631e77b3c25aff344150c5c;hb=f938f15bea1a27f098fc7a0f93673adba31d2efe;hpb=4618f70793d1178ca4c646ef397cf17b1cc70b44 diff --git a/includes/NoLocalSettings.php b/includes/NoLocalSettings.php index d299ab6ff5..b8bfd6a4f0 100644 --- a/includes/NoLocalSettings.php +++ b/includes/NoLocalSettings.php @@ -20,8 +20,8 @@ * @file */ -# bug 30219 : can not use pathinfo() on URLs since slashes do not match -$matches = array(); +# 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 ) { @@ -50,15 +50,16 @@ $templateParser = new TemplateParser(); # Render error page if no LocalSettings file can be found try { + global $wgVersion; echo $templateParser->processTemplate( 'NoLocalSettings', - array( + [ 'wgVersion' => ( isset( $wgVersion ) ? $wgVersion : 'VERSION' ), 'path' => $path, 'ext' => $ext, 'localSettingsExists' => file_exists( MW_CONFIG_FILE ), 'installerStarted' => $installerStarted - ) + ] ); } catch ( Exception $e ) { echo 'Error: ' . htmlspecialchars( $e->getMessage() );