[ Index ] |
PHP Cross Reference of MediaWiki-1.24.0 |
[Summary view] [Print] [Text view]
1 <?php 2 // @codingStandardsIgnoreFile 3 /** 4 * Template used when there is no LocalSettings.php file. 5 * 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. 10 * 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. 15 * 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 20 * 21 * @file 22 * @ingroup Templates 23 */ 24 25 if ( !defined( 'MEDIAWIKI' ) ) { 26 die( "NoLocalSettings.php is not a valid MediaWiki entry point\n" ); 27 } 28 29 if ( !isset( $wgVersion ) ) { 30 $wgVersion = 'VERSION'; 31 } 32 33 # bug 30219 : can not use pathinfo() on URLs since slashes do not match 34 $matches = array(); 35 $ext = 'php'; 36 $path = '/'; 37 foreach ( array_filter( explode( '/', $_SERVER['PHP_SELF'] ) ) as $part ) { 38 if ( !preg_match( '/\.(php5?)$/', $part, $matches ) ) { 39 $path .= "$part/"; 40 } else { 41 $ext = $matches[1] == 'php5' ? 'php5' : 'php'; 42 } 43 } 44 45 # Check to see if the installer is running 46 if ( !function_exists( 'session_name' ) ) { 47 $installerStarted = false; 48 } else { 49 session_name( 'mw_installer_session' ); 50 $oldReporting = error_reporting( E_ALL & ~E_NOTICE ); 51 $success = session_start(); 52 error_reporting( $oldReporting ); 53 $installerStarted = ( $success && isset( $_SESSION['installData'] ) ); 54 } 55 ?> 56 <!DOCTYPE html> 57 <html lang="en" dir="ltr"> 58 <head> 59 <meta charset="UTF-8" /> 60 <title>MediaWiki <?php echo htmlspecialchars( $wgVersion ) ?></title> 61 <style media='screen'> 62 html, body { 63 color: #000; 64 background-color: #fff; 65 font-family: sans-serif; 66 text-align: center; 67 } 68 69 h1 { 70 font-size: 150%; 71 } 72 </style> 73 </head> 74 <body> 75 <img src="<?php echo htmlspecialchars( $path ) ?>resources/assets/mediawiki.png" alt='The MediaWiki logo' /> 76 77 <h1>MediaWiki <?php echo htmlspecialchars( $wgVersion ) ?></h1> 78 <div class='error'> 79 <?php if ( !file_exists( MW_CONFIG_FILE ) ) { ?> 80 <p>LocalSettings.php not found.</p> 81 <p> 82 <?php 83 if ( $installerStarted ) { 84 echo "Please <a href=\"" . htmlspecialchars( $path ) . "mw-config/index." . htmlspecialchars( $ext ) . "\">complete the installation</a> and download LocalSettings.php."; 85 } else { 86 echo "Please <a href=\"" . htmlspecialchars( $path ) . "mw-config/index." . htmlspecialchars( $ext ) . "\">set up the wiki</a> first."; 87 } 88 ?> 89 </p> 90 <?php } else { ?> 91 <p>LocalSettings.php not readable.</p> 92 <p>Please correct file permissions and try again.</p> 93 <?php } ?> 94 95 </div> 96 </body> 97 </html>
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Fri Nov 28 14:03:12 2014 | Cross-referenced by PHPXref 0.7.1 |