Removed redundant begin/commit calls
authorAaron Schulz <aschulz@wikimedia.org>
Wed, 25 Jun 2014 01:58:49 +0000 (18:58 -0700)
committerAaron Schulz <aschulz@wikimedia.org>
Wed, 25 Jun 2014 01:58:49 +0000 (18:58 -0700)
* onTransactionIdle() callbacks already run in auto-commit mode.

Change-Id: I1eab5953080fe28fe58d7a75f88612c591db6e9a

includes/UserMailer.php

index d3e8cb8..d73f6b4 100644 (file)
@@ -544,7 +544,6 @@ class EmailNotification {
                                $fname = __METHOD__;
                                $dbw->onTransactionIdle(
                                        function() use ( $dbw, $timestamp, $watchers, $title, $fname ) {
-                                               $dbw->begin( $fname );
                                                $dbw->update( 'watchlist',
                                                        array( /* SET */
                                                                'wl_notificationtimestamp' => $dbw->timestamp( $timestamp )
@@ -554,7 +553,6 @@ class EmailNotification {
                                                                'wl_title' => $title->getDBkey(),
                                                        ), $fname
                                                );
-                                               $dbw->commit( $fname );
                                        }
                                );
                        }