2 // @codingStandardsIgnoreFile
4 * Template used when there is no LocalSettings.php file.
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License along
17 * with this program; if not, write to the Free Software Foundation, Inc.,
18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
19 * http://www.gnu.org/copyleft/gpl.html
25 if ( !defined( 'MEDIAWIKI' ) ) {
26 die( "NoLocalSettings.php is not a valid MediaWiki entry point\n" );
29 if ( !isset( $wgVersion ) ) {
30 $wgVersion = 'VERSION';
33 # bug 30219 : can not use pathinfo() on URLs since slashes do not match
37 foreach ( array_filter( explode( '/', $_SERVER['PHP_SELF'] ) ) as $part ) {
38 if ( !preg_match( '/\.(php5?)$/', $part, $matches ) ) {
41 $ext = $matches[1] == 'php5' ?
'php5' : 'php';
46 # Check to see if the installer is running
47 if ( !function_exists( 'session_name' ) ) {
48 $installerStarted = false;
50 session_name( 'mw_installer_session' );
51 $oldReporting = error_reporting( E_ALL
& ~E_NOTICE
);
52 $success = session_start();
53 error_reporting( $oldReporting );
54 $installerStarted = ( $success && isset( $_SESSION['installData'] ) );
58 <html lang
="en" dir
="ltr">
60 <meta charset
="UTF-8" />
61 <title
>MediaWiki
<?php
echo htmlspecialchars( $wgVersion ) ?
></title
>
62 <style media
='screen'>
65 background
-color
: #fff;
66 font
-family
: sans
-serif
;
76 <img src
="<?php echo htmlspecialchars( $path ) ?>resources/assets/mediawiki.png" alt
='The MediaWiki logo' />
78 <h1
>MediaWiki
<?php
echo htmlspecialchars( $wgVersion ) ?
></h1
>
80 <?php
if ( !file_exists( MW_CONFIG_FILE
) ) { ?
>
81 <p
>LocalSettings
.php not found
.</p
>
84 if ( $installerStarted ) {
85 echo "Please <a href=\"" . htmlspecialchars( $path ) . "mw-config/index." . htmlspecialchars( $ext ) . "\">complete the installation</a> and download LocalSettings.php.";
87 echo "Please <a href=\"" . htmlspecialchars( $path ) . "mw-config/index." . htmlspecialchars( $ext ) . "\">set up the wiki</a> first.";
92 <p
>LocalSettings
.php not readable
.</p
>
93 <p
>Please correct file permissions
and try again
.</p
>