dépôts
/
lhc
/
web
/
wiklou.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
15034d8
)
Turn getStatusErrorBox() into getStatusBox() so it can handle warnings too
author
Chad Horohoe
<demon@users.mediawiki.org>
Tue, 6 Jul 2010 14:41:15 +0000
(14:41 +0000)
committer
Chad Horohoe
<demon@users.mediawiki.org>
Tue, 6 Jul 2010 14:41:15 +0000
(14:41 +0000)
includes/installer/WebInstaller.php
patch
|
blob
|
history
diff --git
a/includes/installer/WebInstaller.php
b/includes/installer/WebInstaller.php
index
b5f22d5
..
bbdbb7f
100644
(file)
--- a/
includes/installer/WebInstaller.php
+++ b/
includes/installer/WebInstaller.php
@@
-731,11
+731,18
@@
class WebInstaller extends Installer {
}
/**
}
/**
- * Output an error box using a Status object
+ * Output an error
or warning
box using a Status object
*/
*/
- function showStatusErrorBox( $status ) {
- $text = $status->getWikiText();
- $this->output->addHTML( $this->getErrorBox( $text ) );
+ function showStatusBox( $status ) {
+ if( !$status->isGood() ) {
+ $text = $status->getWikiText();
+ if( $status->isOk() ) {
+ $box = $this->getWarningBox( $text );
+ } else {
+ $box = $this->getErrorBox( $text );
+ }
+ $this->output->addHTML( $box );
+ }
}
function showStatusMessage( $status ) {
}
function showStatusMessage( $status ) {
@@
-985,7
+992,7
@@
class WebInstaller_DBConnect extends WebInstallerPage {
$this->setVar( '_UpgradeDone', false );
return 'continue';
} else {
$this->setVar( '_UpgradeDone', false );
return 'continue';
} else {
- $this->parent->showStatus
Error
Box( $status );
+ $this->parent->showStatusBox( $status );
}
}
}
}
@@
-1112,7
+1119,7
@@
class WebInstaller_DBSettings extends WebInstallerPage {
} elseif ( $status->isGood() ) {
return 'continue';
} else {
} elseif ( $status->isGood() ) {
return 'continue';
} else {
- $this->parent->showStatus
Error
Box( $status );
+ $this->parent->showStatusBox( $status );
}
}
}
}
@@
-1588,7
+1595,7
@@
class WebInstaller_Install extends WebInstallerPage {
$ok = $status->isGood();
if ( !$ok ) {
$ok = $status->isGood();
if ( !$ok ) {
- $this->parent->showStatus
Error
Box( $status );
+ $this->parent->showStatusBox( $status );
}
$this->endStage( $ok );
}
}
$this->endStage( $ok );
}