Aaron Schulz has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/263852

Change subject: Remove unnecessary DB begin/commit calls
......................................................................

Remove unnecessary DB begin/commit calls

Change-Id: I988da908937b96d37262942e63f8f09eeceea9ff
---
M SpecialPatroller.php
1 file changed, 0 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Patroller 
refs/changes/52/263852/1

diff --git a/SpecialPatroller.php b/SpecialPatroller.php
index fd34666..c08b039 100644
--- a/SpecialPatroller.php
+++ b/SpecialPatroller.php
@@ -308,7 +308,6 @@
                global $wgUser;
                if ( !$wgUser->isBlocked( false ) ) { # Check block against 
master
                        $dbw = wfGetDB( DB_MASTER );
-                       $dbw->begin( __METHOD__ );
                        $title = $edit->getTitle();
                        # Prepare the comment
                        $comment = wfMessage( 'patrol-reverting', $comment 
)->inContentLanguage()->text();
@@ -328,7 +327,6 @@
                                $article = new Article( $title );
                                $article->doEdit( $old->getText(), $comment, 
EDIT_UPDATE & EDIT_MINOR & EDIT_SUPPRESS_RC );
                        }
-                       $dbw->commit( __METHOD__ );
                        # Mark the edit patrolled so it doesn't bother us again
                        RecentChange::markPatrolled( $edit->mAttribs['rc_id'] );
                        return true;

-- 
To view, visit https://gerrit.wikimedia.org/r/263852
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I988da908937b96d37262942e63f8f09eeceea9ff
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Patroller
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to