Aaron Schulz has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/265617

Change subject: Remove redundant DB begin/commit calls
......................................................................

Remove redundant DB begin/commit calls

Change-Id: Iba38a52e228e26a3a90ef6914549f9d686c63796
---
M DeviceMapLogCapture.hooks.php
1 file changed, 1 insertion(+), 3 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/DeviceMapLogCapture 
refs/changes/17/265617/1

diff --git a/DeviceMapLogCapture.hooks.php b/DeviceMapLogCapture.hooks.php
index b7bae45..6ea0d16 100644
--- a/DeviceMapLogCapture.hooks.php
+++ b/DeviceMapLogCapture.hooks.php
@@ -28,7 +28,6 @@
                $retval = true;
                if ( $wgDeviceMapDatabase ) {
                        $dbw = wfGetDB( DB_MASTER );
-                       $dbw->begin( __METHOD__ );
                        $data = array(
                                'action_time' => $dbw->timestamp(),
                                'session_id' => (string) $token,
@@ -38,8 +37,7 @@
                                'country_code' => (string) $countryCode,
                                'user_agent' => (string) $userAgent,
                        );
-                       $db_status = $dbw->insert( 'device_map_log_capture', 
$data, __METHOD__ );
-                       $dbw->commit( __METHOD__ );
+                       $dbw->insert( 'device_map_log_capture', $data, 
__METHOD__ );
                }
 
                if ( $wgDeviceMapLog ) {

-- 
To view, visit https://gerrit.wikimedia.org/r/265617
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iba38a52e228e26a3a90ef6914549f9d686c63796
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/DeviceMapLogCapture
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to