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