Index: trunk/phase3/includes/WebStart.php |
— | — | @@ -111,26 +111,8 @@ |
112 | 112 | # the wiki installer needs to be launched or the generated file uploaded to |
113 | 113 | # the root wiki directory |
114 | 114 | if( !file_exists( MW_CONFIG_FILE ) ) { |
115 | | - $script = $_SERVER['SCRIPT_NAME']; |
116 | | - $path = htmlspecialchars( str_replace( '//', '/', pathinfo( $script, PATHINFO_DIRNAME ) ) ); |
117 | | - $ext = htmlspecialchars( pathinfo( $script, PATHINFO_EXTENSION ) ); |
118 | | - |
119 | | - # Check to see if the installer is running |
120 | | - if ( !function_exists( 'session_name' ) ) { |
121 | | - $installerStarted = false; |
122 | | - } else { |
123 | | - session_name( 'mw_installer_session' ); |
124 | | - $oldReporting = error_reporting( E_ALL & ~E_NOTICE ); |
125 | | - $success = session_start(); |
126 | | - error_reporting( $oldReporting ); |
127 | | - $installerStarted = ( $success && isset( $_SESSION['installData'] ) ); |
128 | | - } |
129 | | - |
130 | | - $please = $installerStarted |
131 | | - ? "Please <a href=\"$path/mw-config/index.$ext\"> complete the installation</a> and download LocalSettings.php." |
132 | | - : "Please <a href=\"$path/mw-config/index.$ext\"> set up the wiki</a> first."; |
133 | | - |
134 | | - wfDie( "<p>LocalSettings.php not found.</p><p>$please</p>" ); |
| 115 | + require_once( "$IP/includes/templates/NoLocalSettings.php" ); |
| 116 | + die(); |
135 | 117 | } |
136 | 118 | |
137 | 119 | # Include site settings. $IP may be changed (hopefully before the AutoLoader is invoked) |
Index: trunk/phase3/includes/templates/NoLocalSettings.php |
— | — | @@ -0,0 +1,64 @@ |
| 2 | +<?php |
| 3 | +/** |
| 4 | + * Template used when there is no LocalSettings.php file |
| 5 | + * |
| 6 | + * @file |
| 7 | + * @ingroup Templates |
| 8 | + */ |
| 9 | + |
| 10 | +if ( !isset( $wgVersion ) ) { |
| 11 | + $wgVersion = 'VERSION'; |
| 12 | +} |
| 13 | +$script = $_SERVER['SCRIPT_NAME']; |
| 14 | +$path = pathinfo( $script, PATHINFO_DIRNAME ) . '/'; |
| 15 | +$path = str_replace( '//', '/', $path ); |
| 16 | +$ext = pathinfo( $script, PATHINFO_EXTENSION ); |
| 17 | + |
| 18 | +# Check to see if the installer is running |
| 19 | +if ( !function_exists( 'session_name' ) ) { |
| 20 | + $installerStarted = false; |
| 21 | +} else { |
| 22 | + session_name( 'mw_installer_session' ); |
| 23 | + $oldReporting = error_reporting( E_ALL & ~E_NOTICE ); |
| 24 | + $success = session_start(); |
| 25 | + error_reporting( $oldReporting ); |
| 26 | + $installerStarted = ( $success && isset( $_SESSION['installData'] ) ); |
| 27 | +} |
| 28 | +?> |
| 29 | +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
| 30 | +<html xmlns='http://www.w3.org/1999/xhtml' lang='en'> |
| 31 | + <head> |
| 32 | + <title>MediaWiki <?php echo htmlspecialchars( $wgVersion ) ?></title> |
| 33 | + <meta http-equiv='Content-Type' content='text/html; charset=utf-8' /> |
| 34 | + <style type='text/css' media='screen'> |
| 35 | + html, body { |
| 36 | + color: #000; |
| 37 | + background-color: #fff; |
| 38 | + font-family: sans-serif; |
| 39 | + text-align: center; |
| 40 | + } |
| 41 | + |
| 42 | + h1 { |
| 43 | + font-size: 150%; |
| 44 | + } |
| 45 | + </style> |
| 46 | + </head> |
| 47 | + <body> |
| 48 | + <img src="<?php echo htmlspecialchars( $path ) ?>skins/common/images/mediawiki.png" alt='The MediaWiki logo' /> |
| 49 | + |
| 50 | + <h1>MediaWiki <?php echo htmlspecialchars( $wgVersion ) ?></h1> |
| 51 | + <div class='error'> |
| 52 | + <p>LocalSettings.php not found.</p> |
| 53 | + <p> |
| 54 | + <?php |
| 55 | + if ( $installerStarted ) { |
| 56 | + echo( "Please <a href=\"" . htmlspecialchars( $path ) . "mw-config/index." . htmlspecialchars( $ext ) . "\"> complete the installation</a> and download LocalSettings.php." ); |
| 57 | + } else { |
| 58 | + echo( "Please <a href=\"" . htmlspecialchars( $path ) . "mw-config/index." . htmlspecialchars( $ext ) . "\"> set up the wiki</a> first." ); |
| 59 | + } |
| 60 | + ?> |
| 61 | + </p> |
| 62 | + |
| 63 | + </div> |
| 64 | + </body> |
| 65 | +</html> |
Property changes on: trunk/phase3/includes/templates/NoLocalSettings.php |
___________________________________________________________________ |
Added: svn:mergeinfo |
1 | 66 | Merged /branches/REL1_15/phase3/includes/templates/NoLocalSettings.php:r51646 |
2 | 67 | Merged /branches/sqlite/includes/templates/NoLocalSettings.php:r58211-58321 |
3 | 68 | Merged /branches/new-installer/phase3/includes/templates/NoLocalSettings.php:r43664-66004 |
4 | 69 | Merged /branches/wmf-deployment/includes/templates/NoLocalSettings.php:r53381 |
Added: svn:eol-style |
5 | 70 | + native |
Index: trunk/phase3/index.php |
— | — | @@ -180,9 +180,15 @@ |
181 | 181 | $version = isset( $wgVersion ) && $wgVersion |
182 | 182 | ? htmlspecialchars( $wgVersion ) |
183 | 183 | : ''; |
| 184 | + |
| 185 | + $script = $_SERVER['SCRIPT_NAME']; |
| 186 | + $path = pathinfo( $script, PATHINFO_DIRNAME ) . '/'; |
| 187 | + $path = str_replace( '//', '/', $path ); |
| 188 | + |
184 | 189 | $logo = isset( $wgLogo ) && $wgLogo |
185 | 190 | ? $wgLogo |
186 | | - : 'http://upload.wikimedia.org/wikipedia/commons/1/1c/MediaWiki_logo.png'; |
| 191 | + : $path . 'skins/common/images/mediawiki.png'; |
| 192 | + $encLogo = htmlspecialchars( $logo ); |
187 | 193 | |
188 | 194 | header( $_SERVER['SERVER_PROTOCOL'] . ' 500 MediaWiki configuration Error', true, 500 ); |
189 | 195 | header( 'Content-type: text/html; charset=UTF-8' ); |