mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/AJAXPoll
synced 2024-11-12 01:01:40 +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
130f4040fe
commit
3cbe1779e2
|
@ -135,7 +135,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',
|
||||||
|
@ -178,8 +177,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.";
|
||||||
|
|
Loading…
Reference in a new issue