Merge "Unroll Article::__call"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Sat, 30 Jan 2016 13:53:07 +0000 (13:53 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Sat, 30 Jan 2016 13:53:07 +0000 (13:53 +0000)
includes/db/loadbalancer/LoadBalancer.php
includes/logging/LogFormatter.php
includes/mail/EmailNotification.php

index 97df0d6..7199389 100644 (file)
@@ -1364,7 +1364,7 @@ class LoadBalancer {
         * case on many installations.
         *
         * @param IDatabase $conn
-        * @return int
+        * @return int|bool Returns false on error
         */
        public function safeGetLag( IDatabase $conn ) {
                if ( $this->getServerCount() == 1 ) {
index bb3d490..b99cb41 100644 (file)
@@ -67,7 +67,7 @@ class LogFormatter {
        /**
         * Handy shortcut for constructing a formatter directly from
         * database row.
-        * @param object $row
+        * @param stdClass|array $row
         * @see DatabaseLogEntry::getSelectQueryData
         * @return LogFormatter
         */
index e51b434..8bac6b8 100644 (file)
@@ -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 );
        }
 
        /**