r107120 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r107119‎ | r107120 | r107121 >
Date:23:09, 22 December 2011
Author:robin
Status:ok (Comments)
Tags:
Comment:
A hook function shouldn't return false. This was causing MoodBar & WikiLove to not work on Incubator because they are called after WikimediaIncubator (bug 32772).
Modified paths:
  • /trunk/extensions/WikimediaIncubator/IncubatorTest.php (modified) (history)

Diff [purge]

Index: trunk/extensions/WikimediaIncubator/IncubatorTest.php
@@ -666,7 +666,7 @@
667667 static function fnTestWikiLogo( &$out ) {
668668 $setLogo = self::shouldWeSetCustomLogo( $out->getTitle() );
669669 if( !$setLogo ) {
670 - return false;
 670+ return true;
671671 }
672672 global $wgLogo;
673673 $prefixForPageTitle = str_replace( '/', '-', strtolower( $setLogo['prefix'] ) );
@@ -683,7 +683,7 @@
684684 $wgLogo = $thumb->getUrl();
685685 return true;
686686 }
687 - return false;
 687+ return true;
688688 }
689689 # Use MediaWiki:Incubator-logo-wx-xx(x)
690690 $thumb = $file->transform( array( 'width' => 135, 'height' => 135 ) );

Sign-offs

UserFlagDate
Ebe123inspected18:30, 27 December 2011
Ebe123tested18:30, 27 December 2011

Follow-up revisions

RevisionCommit summaryAuthorDate
r107125MFT to 1.18wmf1 r107120...hashar00:06, 23 December 2011
r107929MFT r104622, r104867, r107120, r107337reedy19:34, 3 January 2012

Comments

#Comment by Hashar (talk | contribs)   00:04, 23 December 2011

Good for me.

Hooks::run() use a nice foreach and whenever the hook return something else than true, it will happily exit the foreach thus skipping any extension loading after.

Status & tagging log