From 97573a4e7d06f4b7819adf079834df647b6b8bff Mon Sep 17 00:00:00 2001 From: Paladox Date: Sat, 23 Jun 2018 22:46:53 +0000 Subject: [PATCH] Remove begin/commit from buildStats This avoids notices like "Implicit transaction already active" and "Explicit commit of implicit transaction" in the DBQuery log. Bug: T198023 Change-Id: I8a91ac9f3bbb8d8042bc5f91cd5c44b3e8c92942 --- includes/AJAXPoll.class.php | 3 --- 1 file changed, 3 deletions(-) diff --git a/includes/AJAXPoll.class.php b/includes/AJAXPoll.class.php index 64dfc73..ea444ef 100644 --- a/includes/AJAXPoll.class.php +++ b/includes/AJAXPoll.class.php @@ -148,7 +148,6 @@ class AJAXPoll { private static function buildStats( $id, $userName ) { $dbr = wfGetDB( DB_REPLICA ); - $dbr->begin( __METHOD__ ); $res = $dbr->select( 'ajaxpoll_vote', @@ -191,8 +190,6 @@ class AJAXPoll { ); $tab2 = $dbr->fetchRow( $res ); - $dbr->commit( __METHOD__ ); - return "There are $tab[1] polls and $tab[0] votes given by $tab[2] different people.
The last vote has been given $clockago ago.
During the last 48 hours, $tab2[0] votes have been given.";