From: Alexandre Emsenhuber Date: Tue, 4 Oct 2011 14:32:07 +0000 (+0000) Subject: Simplify a bit by adding the result inside the wfRunHooks() check X-Git-Tag: 1.31.0-rc.0~27275 X-Git-Url: http://git.cyclocoop.org/%24action?a=commitdiff_plain;h=fdb6b286d48362de31698ef576cdccca13028d9a;p=lhc%2Fweb%2Fwiklou.git Simplify a bit by adding the result inside the wfRunHooks() check --- diff --git a/includes/LogEventsList.php b/includes/LogEventsList.php index 284e537f4d..d2deeeaf97 100644 --- a/includes/LogEventsList.php +++ b/includes/LogEventsList.php @@ -707,16 +707,15 @@ class LogEventsList { } /* hook can return false, if we don't want the message to be emitted (Wikia BugId:7093) */ - if ( !wfRunHooks( 'LogEventsListShowLogExtract', array( &$s, $types, $page, $user, $param ) ) ) { - return $pager->getNumRows(); + if ( wfRunHooks( 'LogEventsListShowLogExtract', array( &$s, $types, $page, $user, $param ) ) ) { + // $out can be either an OutputPage object or a String-by-reference + if ( $out instanceof OutputPage ){ + $out->addHTML( $s ); + } else { + $out = $s; + } } - // $out can be either an OutputPage object or a String-by-reference - if( $out instanceof OutputPage ){ - $out->addHTML( $s ); - } else { - $out = $s; - } return $pager->getNumRows(); }