Fix comment handling on image upload or deletion
authorBrad Jorsch <bjorsch@wikimedia.org>
Thu, 18 Oct 2018 21:12:44 +0000 (17:12 -0400)
committerBrad Jorsch <bjorsch@wikimedia.org>
Thu, 18 Oct 2018 21:12:44 +0000 (17:12 -0400)
commita2f8caa37193ccf63e88ead2269cb5d1880954f0
treeea1d1803c580d41605258f9cfd8d64f35ff66cf8
parente3c441f50b1aac90c397a715e7f306d1237b6bf3
Fix comment handling on image upload or deletion

Before Iab5f5215, the call to CommentStore::insertWithTempTable() also
happened to populate image_comment_temp for the later call to
insertSelect() when moving rows from the image table to oldimage or
filearchive. There was nothing in the image table itself that needed
updating.

In that change those calls were changed to CommentStore::insert(), but
it was missed that in that case we do have to update the image table
itself.

Bug: T207419
Change-Id: I26c417c9ab8a9160a7c7ec548ffdfabf17f01980
includes/filerepo/file/LocalFile.php