http://www.mediawiki.org/wiki/Special:Code/MediaWiki/69097

Revision: 69097
Author:   demon
Date:     2010-07-06 14:41:15 +0000 (Tue, 06 Jul 2010)

Log Message:
-----------
Turn getStatusErrorBox() into getStatusBox() so it can handle warnings too

Modified Paths:
--------------
    trunk/phase3/includes/installer/WebInstaller.php

Modified: trunk/phase3/includes/installer/WebInstaller.php
===================================================================
--- trunk/phase3/includes/installer/WebInstaller.php    2010-07-06 14:31:43 UTC 
(rev 69096)
+++ trunk/phase3/includes/installer/WebInstaller.php    2010-07-06 14:41:15 UTC 
(rev 69097)
@@ -731,11 +731,18 @@
        }
 
        /**
-        * 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 ) {
@@ -985,7 +992,7 @@
                                $this->setVar( '_UpgradeDone', false );
                                return 'continue';
                        } else {
-                               $this->parent->showStatusErrorBox( $status );
+                               $this->parent->showStatusBox( $status );
                        }
                }
 
@@ -1112,7 +1119,7 @@
                        } elseif ( $status->isGood() ) {
                                return 'continue';
                        } else {
-                               $this->parent->showStatusErrorBox( $status );
+                               $this->parent->showStatusBox( $status );
                        }
                }
 
@@ -1588,7 +1595,7 @@
 
                        $ok = $status->isGood();
                        if ( !$ok ) {
-                               $this->parent->showStatusErrorBox( $status );
+                               $this->parent->showStatusBox( $status );
                        }
                        $this->endStage( $ok );
                }



_______________________________________________
MediaWiki-CVS mailing list
MediaWiki-CVS@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to