From: Bartosz DziewoƄski Date: Sun, 24 Jan 2016 20:31:34 +0000 (+0100) Subject: LocalFile: Ensure same timestamp for log entry and image revision X-Git-Tag: 1.31.0-rc.0~8218^2 X-Git-Url: http://git.cyclocoop.org/wiki/Target_page?a=commitdiff_plain;h=e09772cc562bc34fc6a0eef8ed46cd866b19c211;p=lhc%2Fweb%2Fwiklou.git 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 --- 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 );