Index: branches/REL1_18/phase3/includes/WebStart.php |
— | — | @@ -120,26 +120,8 @@ |
121 | 121 | # the wiki installer needs to be launched or the generated file uploaded to |
122 | 122 | # the root wiki directory |
123 | 123 | if( !file_exists( MW_CONFIG_FILE ) ) { |
124 | | - $script = $_SERVER['SCRIPT_NAME']; |
125 | | - $path = htmlspecialchars( str_replace( '//', '/', pathinfo( $script, PATHINFO_DIRNAME ) ) ); |
126 | | - $ext = htmlspecialchars( pathinfo( $script, PATHINFO_EXTENSION ) ); |
127 | | - |
128 | | - # Check to see if the installer is running |
129 | | - if ( !function_exists( 'session_name' ) ) { |
130 | | - $installerStarted = false; |
131 | | - } else { |
132 | | - session_name( 'mw_installer_session' ); |
133 | | - $oldReporting = error_reporting( E_ALL & ~E_NOTICE ); |
134 | | - $success = session_start(); |
135 | | - error_reporting( $oldReporting ); |
136 | | - $installerStarted = ( $success && isset( $_SESSION['installData'] ) ); |
137 | | - } |
138 | | - |
139 | | - $please = $installerStarted |
140 | | - ? "Please <a href=\"$path/mw-config/index.$ext\"> complete the installation</a> and download LocalSettings.php." |
141 | | - : "Please <a href=\"$path/mw-config/index.$ext\"> set up the wiki</a> first."; |
142 | | - |
143 | | - wfDie( "<p>LocalSettings.php not found.</p><p>$please</p>" ); |
| 124 | + require_once( "$IP/includes/templates/NoLocalSettings.php" ); |
| 125 | + die(); |
144 | 126 | } |
145 | 127 | |
146 | 128 | # Include site settings. $IP may be changed (hopefully before the AutoLoader is invoked) |
Property changes on: branches/REL1_18/phase3/includes/WebStart.php |
___________________________________________________________________ |
Added: svn:mergeinfo |
147 | 129 | Merged /branches/new-installer/phase3/includes/WebStart.php:r43664-66004 |
148 | 130 | Merged /branches/wmf-deployment/includes/WebStart.php:r53381 |
149 | 131 | Merged /branches/REL1_15/phase3/includes/WebStart.php:r51646 |
150 | 132 | Merged /branches/sqlite/includes/WebStart.php:r58211-58321 |
151 | 133 | Merged /trunk/phase3/includes/WebStart.php:r89624 |
Index: branches/REL1_18/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: branches/REL1_18/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: branches/REL1_18/phase3/index.php |
— | — | @@ -165,9 +165,15 @@ |
166 | 166 | $version = isset( $wgVersion ) && $wgVersion |
167 | 167 | ? htmlspecialchars( $wgVersion ) |
168 | 168 | : ''; |
| 169 | + |
| 170 | + $script = $_SERVER['SCRIPT_NAME']; |
| 171 | + $path = pathinfo( $script, PATHINFO_DIRNAME ) . '/'; |
| 172 | + $path = str_replace( '//', '/', $path ); |
| 173 | + |
169 | 174 | $logo = isset( $wgLogo ) && $wgLogo |
170 | 175 | ? $wgLogo |
171 | | - : 'http://upload.wikimedia.org/wikipedia/commons/1/1c/MediaWiki_logo.png'; |
| 176 | + : $path . 'skins/common/images/mediawiki.png'; |
| 177 | + $encLogo = htmlspecialchars( $logo ); |
172 | 178 | |
173 | 179 | header( $_SERVER['SERVER_PROTOCOL'] . ' 500 MediaWiki configuration Error', true, 500 ); |
174 | 180 | |
— | — | @@ -195,7 +201,7 @@ |
196 | 202 | </style> |
197 | 203 | </head> |
198 | 204 | <body> |
199 | | - <img src="<?php echo $logo; ?>" alt='The MediaWiki logo' /> |
| 205 | + <img src="<?php echo $encLogo; ?>" alt='The MediaWiki logo' /> |
200 | 206 | <h1>MediaWiki <?php echo $version; ?> internal error</h1> |
201 | 207 | <div class='error'> <?php echo $errorMsg; ?> </div> |
202 | 208 | </body> |
Property changes on: branches/REL1_18/phase3/index.php |
___________________________________________________________________ |
Added: svn:mergeinfo |
203 | 209 | Merged /branches/REL1_18/phase3/index.php:r89624 |
204 | 210 | Merged /branches/sqlite/index.php:r58211-58321 |
205 | 211 | Merged /trunk/phase3/index.php:r87632,87636,87640,87644,89624-89625 |
206 | 212 | Merged /branches/new-installer/phase3/index.php:r43664-66004 |
207 | 213 | Merged /branches/REL1_15/phase3/index.php:r51646 |
208 | 214 | Merged /branches/REL1_17/phase3/index.php:r81445,81448 |