r70150 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r70149‎ | r70150 | r70151 >
Date:18:03, 29 July 2010
Author:jeroendedauw
Status:ok
Tags:
Comment:
Style and doc improvements
Modified paths:
  • /trunk/phase3/includes/installer/CliInstaller.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/installer/CliInstaller.php
@@ -6,6 +6,7 @@
77 * @since 1.17
88 */
99 class CliInstaller extends CoreInstaller {
 10+
1011 private $optionMap = array(
1112 'dbtype' => 'wgDBtype',
1213 'dbserver' => 'wgDBserver',
@@ -25,8 +26,14 @@
2627 'dbpath' => 'wgSQLiteDataDir',
2728 );
2829
29 - /** Constructor */
30 - function __construct( $siteName, $admin = null, $option = array() ) {
 30+ /**
 31+ * Constructor.
 32+ *
 33+ * @param $siteName
 34+ * @param $admin
 35+ * @param $option Array
 36+ */
 37+ function __construct( $siteName, $admin = null, array $option = array() ) {
3138 parent::__construct();
3239
3340 foreach ( $this->optionMap as $opt => $global ) {
@@ -45,6 +52,7 @@
4653 }
4754
4855 $this->setVar( 'wgSitename', $siteName );
 56+
4957 if ( $admin ) {
5058 $this->setVar( '_AdminName', $admin );
5159 }
@@ -66,28 +74,30 @@
6775 */
6876 public function execute() {
6977 $this->performInstallation(
70 - array( $this, 'startStage'),
 78+ array( $this, 'startStage' ),
7179 array( $this, 'endStage' )
7280 );
7381 }
7482
7583 public function startStage( $step ) {
76 - $this->showMessage( wfMsg( "config-install-$step") .
 84+ $this->showMessage( wfMsg( "config-install-$step" ) .
7785 wfMsg( 'ellipsis' ) . wfMsg( 'word-separator' ) );
7886 }
7987
8088 public function endStage( $step, $status ) {
8189 $warnings = $status->getWarningsArray();
 90+
8291 if ( !$status->isOk() ) {
8392 $this->showStatusMessage( $status );
8493 echo "\n";
8594 exit;
8695 } elseif ( count($warnings) !== 0 ) {
8796 foreach ( $status->getWikiTextArray( $warnings ) as $w ) {
88 - $this->showMessage( $w . wfMsg( 'ellipsis') .
 97+ $this->showMessage( $w . wfMsg( 'ellipsis' ) .
8998 wfMsg( 'word-separator' ) );
9099 }
91100 }
 101+
92102 $this->showMessage( wfMsg( 'config-install-step-done' ) ."\n");
93103 }
94104

Status & tagging log