HomePhabricator

Define ManualLogEntryBeforePublish hook

Description

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

Details