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
This commit is contained in:
Paladox 2018-06-23 22:46:53 +00:00
parent 130f4040fe
commit 3cbe1779e2

View file

@ -135,7 +135,6 @@ class AJAXPoll {
private static function buildStats( $id, $userName ) {
$dbr = wfGetDB( DB_REPLICA );
$dbr->begin( __METHOD__ );
$res = $dbr->select(
'ajaxpoll_vote',
@ -178,8 +177,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.<br />
The last vote has been given $clockago ago.<br/>
During the last 48 hours, $tab2[0] votes have been given.";