MediaWiki  REL1_20
NoLocalSettings.php
Go to the documentation of this file.
00001 <?php
00024 if ( !isset( $wgVersion ) ) {
00025         $wgVersion = 'VERSION';
00026 }
00027 
00028 # bug 30219 : can not use pathinfo() on URLs since slashes do not match
00029 $matches = array();
00030 $ext = 'php';
00031 $path = '/';
00032 foreach( array_filter( explode( '/', $_SERVER['PHP_SELF'] ) ) as $part ) {
00033         if( !preg_match( '/\.(php5?)$/', $part, $matches ) ) {
00034                 $path .= "$part/";
00035         } else {
00036                 $ext = $matches[1] == 'php5' ? 'php5' : 'php';
00037         }
00038 }
00039 
00040 # Check to see if the installer is running
00041 if ( !function_exists( 'session_name' ) ) {
00042         $installerStarted = false;
00043 } else {
00044         session_name( 'mw_installer_session' );
00045         $oldReporting = error_reporting( E_ALL & ~E_NOTICE );
00046         $success = session_start();
00047         error_reporting( $oldReporting );
00048         $installerStarted = ( $success && isset( $_SESSION['installData'] ) );
00049 }
00050 ?>
00051 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
00052 <html xmlns='http://www.w3.org/1999/xhtml' lang='en'>
00053         <head>
00054                 <title>MediaWiki <?php echo htmlspecialchars( $wgVersion ) ?></title>
00055                 <meta http-equiv='Content-Type' content='text/html; charset=utf-8' />
00056                 <style type='text/css' media='screen'>
00057                         html, body {
00058                                 color: #000;
00059                                 background-color: #fff;
00060                                 font-family: sans-serif;
00061                                 text-align: center;
00062                         }
00063 
00064                         h1 {
00065                                 font-size: 150%;
00066                         }
00067                 </style>
00068         </head>
00069         <body>
00070                 <img src="<?php echo htmlspecialchars( $path ) ?>skins/common/images/mediawiki.png" alt='The MediaWiki logo' />
00071 
00072                 <h1>MediaWiki <?php echo htmlspecialchars( $wgVersion ) ?></h1>
00073                 <div class='error'>
00074                 <p>LocalSettings.php not found.</p>
00075                 <p>
00076                 <?php
00077                 if ( $installerStarted ) {
00078                         echo( "Please <a href=\"" . htmlspecialchars( $path ) . "mw-config/index." . htmlspecialchars( $ext ) . "\"> complete the installation</a> and download LocalSettings.php." );
00079                 } else {
00080                         echo( "Please <a href=\"" . htmlspecialchars( $path ) . "mw-config/index." . htmlspecialchars( $ext ) . "\"> set up the wiki</a> first." );
00081                 }
00082                 ?>
00083                 </p>
00084 
00085                 </div>
00086         </body>
00087 </html>