Make it possible to tag new file uploads without messy queries
authorBartosz Dziewoński <matma.rex@gmail.com>
Thu, 21 Jan 2016 17:14:40 +0000 (18:14 +0100)
committerBartosz Dziewoński <matma.rex@gmail.com>
Mon, 25 Jan 2016 19:06:53 +0000 (20:06 +0100)
commit61c7852049de45664593437f8b8335809fdbccae
tree35486704d8e139ede72f80c5c3f4131674801875
parent8e15e679b6c291ec3dd8d842694dffb03ec60d48
Make it possible to tag new file uploads without messy queries

UploadBase::performUpload() now takes a $tags parameter and passes it
to LocalFile::upload() and LocalFile::recordUpload2(), which
eventually adds the requested tags to the log_id, rev_id and rc_id
that are created for the file upload.

Previously you'd have to query the database for the latest rev_id and
log_id for the page title under which the title is being uploaded, as
performUpload() is unable to return them to you because it's all
deferred in funny ways.

Bug: T121874
Change-Id: I99a8fd67c84219d2715d3d88cc21500614431179
includes/filerepo/file/LocalFile.php
includes/logging/LogEntry.php
includes/upload/UploadBase.php