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 a2d2792a3c
commit 97573a4e7d

View file

@ -148,7 +148,6 @@ class AJAXPoll {
private static function buildStats( $id, $userName ) { private static function buildStats( $id, $userName ) {
$dbr = wfGetDB( DB_REPLICA ); $dbr = wfGetDB( DB_REPLICA );
$dbr->begin( __METHOD__ );
$res = $dbr->select( $res = $dbr->select(
'ajaxpoll_vote', 'ajaxpoll_vote',
@ -191,8 +190,6 @@ class AJAXPoll {
); );
$tab2 = $dbr->fetchRow( $res ); $tab2 = $dbr->fetchRow( $res );
$dbr->commit( __METHOD__ );
return "There are $tab[1] polls and $tab[0] votes given by $tab[2] different people.<br /> 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/> The last vote has been given $clockago ago.<br/>
During the last 48 hours, $tab2[0] votes have been given."; During the last 48 hours, $tab2[0] votes have been given.";