From 9b052aa552e576714db3be7c85ad265a5657cff2 Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Mon, 28 Apr 2008 02:10:31 +0000 Subject: [PATCH] Use $log_id --- includes/LogPage.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/includes/LogPage.php b/includes/LogPage.php index a90b781eb8..38064e637f 100644 --- a/includes/LogPage.php +++ b/includes/LogPage.php @@ -61,6 +61,7 @@ class LogPage { $this->timestamp = $now = wfTimestampNow(); $data = array( + 'log_id' => $log_id, 'log_type' => $this->type, 'log_action' => $this->action, 'log_timestamp' => $dbw->timestamp( $now ), @@ -71,7 +72,7 @@ class LogPage { 'log_params' => $this->params ); $dbw->insert( 'logging', $data, $fname ); - $newId = $dbw->insertId(); + $newId = !is_null($log_id) ? $log_id : $dbw->insertId(); if( !($dbw->affectedRows() > 0) ) { wfDebugLog( "logging", "LogPage::saveContent failed to insert row - Error {$dbw->lastErrno()}: {$dbw->lastError()}" ); -- 2.20.1