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