Make a sidebar key with value false mean 'skip this header'.
authorPlatonides <platonides@users.mediawiki.org>
Wed, 29 Jun 2011 17:20:47 +0000 (17:20 +0000)
committerPlatonides <platonides@users.mediawiki.org>
Wed, 29 Jun 2011 17:20:47 +0000 (17:20 +0000)
Intended for the forced headers, such as SEARCH.
These entries would be added using SkinBuildSidebar hook.

skins/MonoBook.php
skins/Vector.php

index 61e086d..3e97af1 100644 (file)
@@ -180,6 +180,9 @@ echo $footerEnd;
                if ( !isset( $sidebar['LANGUAGES'] ) ) $sidebar['LANGUAGES'] = true;
 
                foreach ($sidebar as $boxName => $cont) {
+                       if ( $cont === false )
+                               continue;
+
                        if ( $boxName == 'SEARCH' ) {
                                $this->searchBox();
                        } elseif ( $boxName == 'TOOLBOX' ) {
index c90c49a..167a3ec 100644 (file)
@@ -274,6 +274,9 @@ class VectorTemplate extends BaseTemplate {
                }
                // Render portals
                foreach ( $portals as $name => $content ) {
+                       if ( $cont === false )
+                               continue;
+
                        echo "\n<!-- {$name} -->\n";
                        switch( $name ) {
                                case 'SEARCH':