jenkins-bot has submitted this change and it was merged.

Change subject: Dependency inject DB into ManualLogEntry::insert()
......................................................................


Dependency inject DB into ManualLogEntry::insert()

Change-Id: I5018a6ef6095929edca444ad2d901adcf8680ed2
---
M includes/logging/LogEntry.php
1 file changed, 3 insertions(+), 2 deletions(-)

Approvals:
  Parent5446: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/includes/logging/LogEntry.php b/includes/logging/LogEntry.php
index b99f16b..92a0abe 100644
--- a/includes/logging/LogEntry.php
+++ b/includes/logging/LogEntry.php
@@ -430,12 +430,13 @@
 
        /**
         * Inserts the entry into the logging table.
+        * @param DatabaseBase $dbw
         * @return int If of the log entry
         */
-       public function insert() {
+       public function insert( DatabaseBase $dbw = null ) {
                global $wgContLang;
 
-               $dbw = wfGetDB( DB_MASTER );
+               $dbw = $dbw ?: wfGetDB( DB_MASTER );
                $id = $dbw->nextSequenceValue( 'logging_log_id_seq' );
 
                if ( $this->timestamp === null ) {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I5018a6ef6095929edca444ad2d901adcf8680ed2
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz <[email protected]>
Gerrit-Reviewer: Demon <[email protected]>
Gerrit-Reviewer: Parent5446 <[email protected]>
Gerrit-Reviewer: jenkins-bot

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

Reply via email to