Define ManualLogEntryBeforePublish hook
authorPiotr Miazga <piotr@polishdeveloper.pl>
Wed, 13 Mar 2019 20:16:39 +0000 (21:16 +0100)
committerPiotr Miazga <piotr@polishdeveloper.pl>
Mon, 18 Mar 2019 23:49:53 +0000 (00:49 +0100)
commit384ab964cdde099637e2dbdefa6957ab944b4dd8
treef19ee46bfb69c777a3810ce7bf3200bfae330469
parent6202c33473d64bcfc923006cfd8f84e53b7dd69c
Define ManualLogEntryBeforePublish hook

This hook is required by extensions like MobileFrontend to tag
log entries when actions are performed on the mobile web.

There is a possibility to tag log entries by using
'RecentChange_save' hook, but that works only when the log entry
is published to 'rc' or 'rcandudp'. This means, that tagged log
will appear also on the Special:RecentChanges page which is something
what extensions like 'Thanks' wants to avoid.

In the future we should avoid using 'RecentChange_save' as an
indirect way to tag log entries, and use the
'ManualLogEntryBeforePublish' hook instead.

To cover ourselves in the future, instead of passing &$tags only,
we pass the $this (the log entry object) so extensions can perform
additional checks before using setTags().

Bug: T215675
Change-Id: I747eded4bc5406cd5d4676fc93b0bb55c99f9a4d
RELEASE-NOTES-1.33
docs/hooks.txt
includes/logging/LogEntry.php