Provide message/warning/error box abstraction
[lhc/web/wiklou.git] / includes / skins / SkinFallbackTemplate.php
index 312769f..1ad1ab0 100644 (file)
@@ -46,8 +46,8 @@ class SkinFallbackTemplate extends BaseTemplate {
                $enabledSkins = array_change_key_case( $enabledSkins, CASE_LOWER );
 
                if ( $installedSkins ) {
-                       $skinsInstalledText = array();
-                       $skinsInstalledSnippet = array();
+                       $skinsInstalledText = [];
+                       $skinsInstalledSnippet = [];
 
                        foreach ( $installedSkins as $skin ) {
                                $normalizedKey = strtolower( $skin );
@@ -87,7 +87,7 @@ class SkinFallbackTemplate extends BaseTemplate {
                if ( file_exists( "$IP/skins/$skin/skin.json" ) ) {
                        return "wfLoadSkin( '$skin' );";
                } else {
-                       return  "require_once \"\$IP/skins/$skin/$skin.php\";";
+                       return "require_once \"\$IP/skins/$skin/$skin.php\";";
                }
        }
 
@@ -96,16 +96,13 @@ class SkinFallbackTemplate extends BaseTemplate {
         * warning message and page content.
         */
        public function execute() {
-               $this->html( 'headelement' ) ?>
-
-               <div class="warningbox">
-                       <?php echo $this->buildHelpfulInformationMessage() ?>
-               </div>
-
+               $this->html( 'headelement' );
+               echo Html::warningBox( $this->buildHelpfulInformationMessage() );
+       ?>
                <form action="<?php $this->text( 'wgScript' ) ?>">
                        <input type="hidden" name="title" value="<?php $this->text( 'searchtitle' ) ?>" />
                        <h3><label for="searchInput"><?php $this->msg( 'search' ) ?></label></h3>
-                       <?php echo $this->makeSearchInput( array( "id" => "searchInput" ) ) ?>
+                       <?php echo $this->makeSearchInput( [ "id" => "searchInput" ] ) ?>
                        <?php echo $this->makeSearchButton( 'go' ) ?>
                </form>