Index: trunk/phase3/includes/installer/Installer.i18n.php |
— | — | @@ -550,6 +550,7 @@ |
551 | 551 | When that has been done, you can '''[$2 enter your wiki]'''.", |
552 | 552 | 'config-download-localsettings' => 'Download LocalSettings.php', |
553 | 553 | 'config-help' => 'help', |
| 554 | + 'config-nofile' => 'File "$1" could not be found. Has it been deleted?', |
554 | 555 | 'mainpagetext' => "'''MediaWiki has been successfully installed.'''", |
555 | 556 | 'mainpagedocfooter' => "Consult the [//meta.wikimedia.org/wiki/Help:Contents User's Guide] for information on using the wiki software. |
556 | 557 | |
Index: trunk/phase3/includes/installer/WebInstallerPage.php |
— | — | @@ -1251,7 +1251,11 @@ |
1252 | 1252 | } |
1253 | 1253 | |
1254 | 1254 | public function getFileContents() { |
1255 | | - return file_get_contents( dirname( __FILE__ ) . '/../../' . $this->getFileName() ); |
| 1255 | + $file = dirname( __FILE__ ) . '/../../' . $this->getFileName(); |
| 1256 | + if( ! file_exists( $file ) ) { |
| 1257 | + return wfMsgNoTrans( 'config-nofile', $file ); |
| 1258 | + } |
| 1259 | + return file_get_contents( $file ); |
1256 | 1260 | } |
1257 | 1261 | |
1258 | 1262 | } |
— | — | @@ -1261,7 +1265,15 @@ |
1262 | 1266 | } |
1263 | 1267 | |
1264 | 1268 | class WebInstaller_ReleaseNotes extends WebInstaller_Document { |
1265 | | - protected function getFileName() { return 'RELEASE-NOTES'; } |
| 1269 | + protected function getFileName() { |
| 1270 | + global $wgVersion; |
| 1271 | + |
| 1272 | + if(! preg_match( '/^(\d+)\.(\d+).*/i', $wgVersion, $result ) ) { |
| 1273 | + throw new MWException('Variable $wgVersion has an invalid value.'); |
| 1274 | + } |
| 1275 | + |
| 1276 | + return 'RELEASE-NOTES-' . $result[1] . '.' . $result[2]; |
| 1277 | + } |
1266 | 1278 | } |
1267 | 1279 | |
1268 | 1280 | class WebInstaller_UpgradeDoc extends WebInstaller_Document { |