From: Aaron Schulz Date: Sat, 30 Jan 2016 00:03:29 +0000 (-0800) Subject: Code style cleanups to notifyOnPageChange() X-Git-Tag: 1.31.0-rc.0~8144^2 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/categories/modifier.php?a=commitdiff_plain;h=5e1d0584b7ddab5528484222450968ee15af4bcf;p=lhc%2Fweb%2Fwiklou.git Code style cleanups to notifyOnPageChange() Change-Id: I08593be2eba6417cdfae31b1aa1021da7db00c74 --- diff --git a/includes/mail/EmailNotification.php b/includes/mail/EmailNotification.php index e51b4341eb..8bac6b8135 100644 --- a/includes/mail/EmailNotification.php +++ b/includes/mail/EmailNotification.php @@ -166,22 +166,21 @@ class EmailNotification { } } - if ( !$sendEmail ) { - return; + if ( $sendEmail ) { + JobQueueGroup::singleton()->lazyPush( new EnotifNotifyJob( + $title, + array( + 'editor' => $editor->getName(), + 'editorID' => $editor->getID(), + 'timestamp' => $timestamp, + 'summary' => $summary, + 'minorEdit' => $minorEdit, + 'oldid' => $oldid, + 'watchers' => $watchers, + 'pageStatus' => $pageStatus + ) + ) ); } - - $params = array( - 'editor' => $editor->getName(), - 'editorID' => $editor->getID(), - 'timestamp' => $timestamp, - 'summary' => $summary, - 'minorEdit' => $minorEdit, - 'oldid' => $oldid, - 'watchers' => $watchers, - 'pageStatus' => $pageStatus - ); - $job = new EnotifNotifyJob( $title, $params ); - JobQueueGroup::singleton()->lazyPush( $job ); } /**