Allow adding Deleted log entries
authorcsteipp <csteipp@wikimedia.org>
Mon, 28 Apr 2014 22:28:41 +0000 (15:28 -0700)
committercsteipp <csteipp@wikimedia.org>
Mon, 28 Apr 2014 22:28:41 +0000 (15:28 -0700)
Set log_deleted when a LogEntry object's deleted property is set.

Bug: 63650
Change-Id: Iebd6f7442cba5176d112eb613e2b7ca2e67e37b1

includes/logging/LogEntry.php

index c7f9e40..dc63241 100644 (file)
@@ -504,6 +504,10 @@ class ManualLogEntry extends LogEntryBase {
                        'log_comment' => $comment,
                        'log_params' => serialize( (array)$this->getParameters() ),
                );
+               if ( isset( $this->deleted ) ) {
+                       $data['log_deleted'] = $this->deleted;
+               }
+
                $dbw->insert( 'logging', $data, __METHOD__ );
                $this->id = !is_null( $id ) ? $id : $dbw->insertId();