mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/AJAXPoll
synced 2024-11-23 22:46:17 +00:00
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:
parent
a2d2792a3c
commit
97573a4e7d
|
@ -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.<br />
|
||||
The last vote has been given $clockago ago.<br/>
|
||||
During the last 48 hours, $tab2[0] votes have been given.";
|
||||
|
|
Loading…
Reference in a new issue