Require at least PHP 5.2.3. There's not much point increasing the minimum to 5.2...
[lhc/web/wiklou.git] / includes / templates / NoLocalSettings.php
1 <?php
2 /**
3 * Template used when there is no LocalSettings.php file
4 *
5 * @file
6 * @ingroup Templates
7 */
8
9 if ( !isset( $wgVersion ) ) {
10 $wgVersion = 'VERSION';
11 }
12 $script = $_SERVER['SCRIPT_NAME'];
13 $path = pathinfo( $script, PATHINFO_DIRNAME ) . '/';
14 $path = str_replace( '//', '/', $path );
15 $ext = pathinfo( $script, PATHINFO_EXTENSION );
16
17 # Check to see if the installer is running
18 if ( !function_exists( 'session_name' ) ) {
19 $installerStarted = false;
20 } else {
21 session_name( 'mw_installer_session' );
22 $oldReporting = error_reporting( E_ALL & ~E_NOTICE );
23 $success = session_start();
24 error_reporting( $oldReporting );
25 $installerStarted = ( $success && isset( $_SESSION['installData'] ) );
26 }
27 ?>
28 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
29 <html xmlns='http://www.w3.org/1999/xhtml' lang='en'>
30 <head>
31 <title>MediaWiki <?php echo htmlspecialchars( $wgVersion ) ?></title>
32 <meta http-equiv='Content-Type' content='text/html; charset=utf-8' />
33 <style type='text/css' media='screen'>
34 html, body {
35 color: #000;
36 background-color: #fff;
37 font-family: sans-serif;
38 text-align: center;
39 }
40
41 h1 {
42 font-size: 150%;
43 }
44 </style>
45 </head>
46 <body>
47 <img src="<?php echo htmlspecialchars( $path ) ?>skins/common/images/mediawiki.png" alt='The MediaWiki logo' />
48
49 <h1>MediaWiki <?php echo htmlspecialchars( $wgVersion ) ?></h1>
50 <div class='error'>
51 <p>LocalSettings.php not found.</p>
52 <p>
53 <?php
54 if ( $installerStarted ) {
55 echo( "Please <a href=\"" . htmlspecialchars( $path ) . "mw-config/index." . htmlspecialchars( $ext ) . "\"> complete the installation</a> and download LocalSettings.php." );
56 } else {
57 echo( "Please <a href=\"" . htmlspecialchars( $path ) . "mw-config/index." . htmlspecialchars( $ext ) . "\"> set up the wiki</a> first." );
58 }
59 ?>
60 </p>
61
62 </div>
63 </body>
64 </html>