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
* Special:ActiveUsers will no longer filter out users who became inactive since
the last time the active users query cache was updated.
* (T215675) RecentChange and ManualLogEntry implement new Taggable interface.
+* (T215675) Added a hook, ManualLogEntryBeforePublish, to allow extensions
+ to modify (example: add tags) log entries.
=== New developer features in 1.33 ===
* The AuthManagerLoginAuthenticateAudit hook has a new parameter for
Skin::makeVariablesScript
$out: The OutputPage which called the hook, can be used to get the real title.
+'ManualLogEntryBeforePublish': Allows to access or modify log entry just before it is
+published.
+$logEntry: ManualLogEntry object
+
'MarkPatrolled': Before an edit is marked patrolled.
$rcid: ID of the revision to be marked patrolled
&$user: the user (object) marking the revision as patrolled
function () use ( $newId, $to ) {
$log = new LogPage( $this->getType() );
if ( !$log->isRestricted() ) {
+ Hooks::runWithoutAbort( 'ManualLogEntryBeforePublish', [ $this ] );
$rc = $this->getRecentChange( $newId );
if ( $to === 'rc' || $to === 'rcandudp' ) {