From e09772cc562bc34fc6a0eef8ed46cd866b19c211 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bartosz=20Dziewo=C5=84ski?= Date: Sun, 24 Jan 2016 21:31:34 +0100 Subject: [PATCH] LocalFile: Ensure same timestamp for log entry and image revision For file patrolling, we rely on the timestamp of image revision (`image` table) and log entry (`logging` table) being the same, but we weren't actually making sure it is the same. Note that the timestamp of page revision can still differ, but that shouldn't matter and it's a more involved fix. Change-Id: I8e1b75d744c4a96cb0bb636b153d6e8ea2ee1fcf --- includes/filerepo/file/LocalFile.php | 1 + 1 file changed, 1 insertion(+) diff --git a/includes/filerepo/file/LocalFile.php b/includes/filerepo/file/LocalFile.php index 9e214f6e20..2b5a4e6375 100644 --- a/includes/filerepo/file/LocalFile.php +++ b/includes/filerepo/file/LocalFile.php @@ -1355,6 +1355,7 @@ class LocalFile extends File { // Add the log entry... $logEntry = new ManualLogEntry( 'upload', $reupload ? 'overwrite' : 'upload' ); + $logEntry->setTimestamp( $this->timestamp ); $logEntry->setPerformer( $user ); $logEntry->setComment( $comment ); $logEntry->setTarget( $descTitle ); -- 2.20.1