From 5e1d0584b7ddab5528484222450968ee15af4bcf Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Fri, 29 Jan 2016 16:03:29 -0800 Subject: [PATCH] Code style cleanups to notifyOnPageChange() Change-Id: I08593be2eba6417cdfae31b1aa1021da7db00c74 --- includes/mail/EmailNotification.php | 29 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 15 deletions(-) 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 ); } /** -- 2.20.1