When that has been done, you can '''[$2 enter your wiki]'''.",
'config-download-localsettings' => 'Download LocalSettings.php',
'config-help' => 'help',
+ 'config-nofile' => 'File "$1" could not be found. Has it been deleted?',
'mainpagetext' => "'''MediaWiki has been successfully installed.'''",
'mainpagedocfooter' => "Consult the [//meta.wikimedia.org/wiki/Help:Contents User's Guide] for information on using the wiki software.
}
public function getFileContents() {
- return file_get_contents( dirname( __FILE__ ) . '/../../' . $this->getFileName() );
+ $file = dirname( __FILE__ ) . '/../../' . $this->getFileName();
+ if( ! file_exists( $file ) ) {
+ return wfMsgNoTrans( 'config-nofile', $file );
+ }
+ return file_get_contents( $file );
}
}
}
class WebInstaller_ReleaseNotes extends WebInstaller_Document {
- protected function getFileName() { return 'RELEASE-NOTES'; }
+ protected function getFileName() {
+ global $wgVersion;
+
+ if(! preg_match( '/^(\d+)\.(\d+).*/i', $wgVersion, $result ) ) {
+ throw new MWException('Variable $wgVersion has an invalid value.');
+ }
+
+ return 'RELEASE-NOTES-' . $result[1] . '.' . $result[2];
+ }
}
class WebInstaller_UpgradeDoc extends WebInstaller_Document {