From 9786e139a2e046b72f5ab753914ed6fcb343139a Mon Sep 17 00:00:00 2001 From: Chad Horohoe Date: Fri, 5 Nov 2010 12:48:13 +0000 Subject: [PATCH] Rm unused warning system from WebInstallerOutput (mostly handled by Status objects elsewhere), document a few things too --- includes/installer/WebInstallerOutput.php | 50 +++++++++++------------ includes/installer/WebInstallerPage.php | 1 - 2 files changed, 24 insertions(+), 27 deletions(-) diff --git a/includes/installer/WebInstallerOutput.php b/includes/installer/WebInstallerOutput.php index 58bbac9d5b..fb887e0012 100644 --- a/includes/installer/WebInstallerOutput.php +++ b/includes/installer/WebInstallerOutput.php @@ -18,20 +18,32 @@ * @since 1.17 */ class WebInstallerOutput { - /** * The WebInstaller object this WebInstallerOutput is used by. * * @var WebInstaller */ public $parent; - - public $contents = ''; - public $warnings = ''; - public $headerDone = false; + + /** + * Buffered contents that haven't been output yet + * @var String + */ + private $contents = ''; + + /** + * Has the header (or short header) been output? + * @var bool + */ + private $headerDone = false; + public $redirectTarget; - public $debug = true; - public $useShortHeader = false; + + /** + * Whether to use the limited header (used during CC license callbacks) + * @var bool + */ + private $useShortHeader = false; /** * Constructor. @@ -55,16 +67,6 @@ class WebInstallerOutput { $this->contents .= $html; } - public function addWarning( $msg ) { - $this->warnings .= "

$msg

\n"; - } - - public function addWarningMsg( $msg /*, ... */ ) { - $params = func_get_args(); - array_shift( $params ); - $this->addWarning( wfMsg( $msg, $params ) ); - } - public function redirect( $url ) { if ( $this->headerDone ) { throw new MWException( __METHOD__ . ' called after sending headers' ); @@ -115,6 +117,10 @@ class WebInstallerOutput { ); } + /** + * Get whether the header has been output + * @return bool + */ public function headerDone() { return $this->headerDone; } @@ -166,8 +172,6 @@ class WebInstallerOutput { } public function outputFooter() { - $this->outputWarnings(); - if ( $this->useShortHeader ) { ?> @@ -229,10 +233,4 @@ class WebInstallerOutput { public function getJQueryTipsy() { return Html::linkedScript( "../resources/jquery/jquery.tipsy.js" ); } - - public function outputWarnings() { - $this->addHTML( $this->warnings ); - $this->warnings = ''; - } - -} \ No newline at end of file +} diff --git a/includes/installer/WebInstallerPage.php b/includes/installer/WebInstallerPage.php index f091186825..7a90171f2f 100644 --- a/includes/installer/WebInstallerPage.php +++ b/includes/installer/WebInstallerPage.php @@ -50,7 +50,6 @@ abstract class WebInstallerPage { } public function endForm( $continue = 'continue' ) { - $this->parent->output->outputWarnings(); $s = "
\n"; $id = $this->getId(); -- 2.20.1