Use $log_id
authorAaron Schulz <aaron@users.mediawiki.org>
Mon, 28 Apr 2008 02:10:31 +0000 (02:10 +0000)
committerAaron Schulz <aaron@users.mediawiki.org>
Mon, 28 Apr 2008 02:10:31 +0000 (02:10 +0000)
includes/LogPage.php

index a90b781..38064e6 100644 (file)
@@ -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()}" );