Aaron Schulz has uploaded a new change for review.
https://gerrit.wikimedia.org/r/261737
Change subject: Use __METHOD__ for DB begin/commit calls
......................................................................
Use __METHOD__ for DB begin/commit calls
Change-Id: I6b3df688a8f5dded71f9101cfcb4f8603e6bf9fb
---
M api/ApiImportTranslationMemories.php
1 file changed, 4 insertions(+), 4 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/LiveTranslate
refs/changes/37/261737/1
diff --git a/api/ApiImportTranslationMemories.php
b/api/ApiImportTranslationMemories.php
index 23f0bd9..ac690c8 100644
--- a/api/ApiImportTranslationMemories.php
+++ b/api/ApiImportTranslationMemories.php
@@ -92,7 +92,7 @@
$idOffset = ( $memoryId - 1 ) * 100000;
$wordId = 0;
- $dbw->begin();
+ $dbw->begin( __METHOD__ );
// Insert the memory in the db.
foreach ( $tm->getTranslationUnits() as $tu ) {
@@ -122,8 +122,8 @@
$wordId++;
if ( $wordId % 500 == 0 ) {
- $dbw->commit();
- $dbw->begin();
+ $dbw->commit( __METHOD__ );
+ $dbw->begin( __METHOD__ );
}
}
@@ -137,7 +137,7 @@
array( 'memory_id' => $memoryId )
);
- $dbw->commit();
+ $dbw->commit( __METHOD__ );
}
/**
--
To view, visit https://gerrit.wikimedia.org/r/261737
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I6b3df688a8f5dded71f9101cfcb4f8603e6bf9fb
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/LiveTranslate
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits