r91081 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r91080‎ | r91081 | r91082 >
Date:17:20, 29 June 2011
Author:platonides
Status:resolved (Comments)
Tags:
Comment:
Make a sidebar key with value false mean 'skip this header'.
Intended for the forced headers, such as SEARCH.
These entries would be added using SkinBuildSidebar hook.
Modified paths:
  • /trunk/phase3/skins/MonoBook.php (modified) (history)
  • /trunk/phase3/skins/Vector.php (modified) (history)

Diff [purge]

Index: trunk/phase3/skins/Vector.php
@@ -274,6 +274,9 @@
275275 }
276276 // Render portals
277277 foreach ( $portals as $name => $content ) {
 278+ if ( $cont === false )
 279+ continue;
 280+
278281 echo "\n<!-- {$name} -->\n";
279282 switch( $name ) {
280283 case 'SEARCH':
Index: trunk/phase3/skins/MonoBook.php
@@ -180,6 +180,9 @@
181181 if ( !isset( $sidebar['LANGUAGES'] ) ) $sidebar['LANGUAGES'] = true;
182182
183183 foreach ($sidebar as $boxName => $cont) {
 184+ if ( $cont === false )
 185+ continue;
 186+
184187 if ( $boxName == 'SEARCH' ) {
185188 $this->searchBox();
186189 } elseif ( $boxName == 'TOOLBOX' ) {

Follow-up revisions

RevisionCommit summaryAuthorDate
r91094Fix for r91081, I think he meant $content, not $cont.demon18:40, 29 June 2011
r91095Followup r91094: monobook wasn't broken, but I broke it. Rename to content he...demon18:44, 29 June 2011

Comments

#Comment by Krinkle (talk | contribs)   18:08, 29 June 2011

There's errors filling up the sidebar:


Notice: Undefined variable: cont in /htdocs/SVN/mediawiki/trunk/phase3/skins/Vector.php on line 277

Notice: Undefined variable: cont in /htdocs/SVN/mediawiki/trunk/phase3/skins/Vector.php on line 277

Notice: Undefined variable: cont in /htdocs/SVN/mediawiki/trunk/phase3/skins/Vector.php on line 277

Status & tagging log