r63770 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r63769‎ | r63770 | r63771 >
Date:13:45, 15 March 2010
Author:demon
Status:ok
Tags:
Comment:
Add Upgrade info to docs, simplify linking callbacks
Modified paths:
  • /branches/new-installer/phase3/includes/installer/WebInstaller.php (modified) (history)
  • /branches/new-installer/phase3/languages/messages/MessagesEn.php (modified) (history)
  • /branches/new-installer/phase3/maintenance/language/messages.inc (modified) (history)

Diff [purge]

Index: branches/new-installer/phase3/maintenance/language/messages.inc
@@ -3164,6 +3164,7 @@
31653165 'config-page-readme',
31663166 'config-page-releasenotes',
31673167 'config-page-copying',
 3168+ 'config-page-upgradedoc',
31683169 'config-help-restart',
31693170 'config-restart',
31703171 'config-welcome',
Index: branches/new-installer/phase3/includes/installer/WebInstaller.php
@@ -38,6 +38,7 @@
3939 'Readme',
4040 'ReleaseNotes',
4141 'Copying',
 42+ 'UpgradeDoc', // Can't use Upgrade due to Upgrade step
4243 );
4344
4445 /**
@@ -1600,9 +1601,9 @@
16011602 $text = preg_replace( "/\n([\\*#])([^\r\n]*?)\r?\n([^\r\n#\\*:]+)/", "\n\\1\\2 \\3", $text );
16021603 } while ( $text != $prev );
16031604 // turn (bug nnnn) into links
1604 - $text = preg_replace_callback('/\(bug (\d+)\)/', array( 'WebInstaller_ReleaseNotes', 'replaceBugLinks' ), $text );
 1605+ $text = preg_replace_callback('/\(bug (\d+)\)/', array( $this, 'replaceBugLinks' ), $text );
16051606 // add links to manual to every global variable mentioned
1606 - $text = preg_replace_callback('/(\$wg[a-z0-9_]+)/i', array( 'WebInstaller_ReleaseNotes', 'replaceConfigLinks' ), $text );
 1607+ $text = preg_replace_callback('/(\$wg[a-z0-9_]+)/i', array( $this, 'replaceConfigLinks' ), $text );
16071608 // special case for <pre> - formatted links
16081609 do {
16091610 $prev = $text;
@@ -1611,12 +1612,12 @@
16121613 return $text;
16131614 }
16141615
1615 - private static function replaceBugLinks( $matches ) {
 1616+ private function replaceBugLinks( $matches ) {
16161617 return '(<span class="config-plainlink">[https://bugzilla.wikimedia.org/show_bug.cgi?id=' .
16171618 $matches[1] . ' bug ' . $matches[1] . ']</span>)';
16181619 }
16191620
1620 - private static function replaceConfigLinks( $matches ) {
 1621+ private function replaceConfigLinks( $matches ) {
16211622 return '<span class="config-plainlink">[http://www.mediawiki.org/wiki/Manual:' .
16221623 $matches[1] . ' ' . $matches[1] . ']</span>';
16231624 }
@@ -1637,7 +1638,14 @@
16381639 return $this->formatTextFile( parent::getFileContents() );
16391640 }
16401641 }
 1642+class WebInstaller_UpgradeDoc extends WebInstaller_Document {
 1643+ function getFileName() { return 'UPGRADE'; }
16411644
 1645+ function getFileContents() {
 1646+ return $this->formatTextFile( parent::getFileContents() );
 1647+ }
 1648+}
 1649+
16421650 class WebInstaller_Copying extends WebInstaller_Document {
16431651 function getFileName() { return 'COPYING'; }
16441652
Index: branches/new-installer/phase3/languages/messages/MessagesEn.php
@@ -4148,6 +4148,7 @@
41494149 'config-page-readme' => 'Read me',
41504150 'config-page-releasenotes' => 'Release notes',
41514151 'config-page-copying' => 'Copying',
 4152+'config-page-upgradedoc' => 'Upgrading',
41524153 'config-help-restart' => 'Do you want to clear all saved data that you have entered, and restart the installation process?',
41534154 'config-restart' => 'Yes, restart it',
41544155 'config-welcome' => 'Welcome to MediaWiki!

Status & tagging log