Manual:Hooks/MarkPatrolled

MarkPatrolled
Available from version 1.6.0
Called before an edit is marked patrolled
Define function:
public static function onMarkPatrolled( $rcid, User $user, $wcOnlySysopsCanPatrol, $auto, array &$tags ) { ... }
Attach hook:

In extension.json:

{
	"Hooks": {
		"MarkPatrolled": "MyExtensionHooks::onMarkPatrolled"
	}
}

For MediaWiki ≤1.25:

$wgHooks['MarkPatrolled'][] = 'MyExtensionHooks::onMarkPatrolled';
Called from:File(s): changes/RecentChange.php
Function(s): doMarkPatrolled

For more information about attaching hooks, see Manual:Hooks.
For examples of extensions using this hook, see Category:MarkPatrolled extensions.

DetailsEdit

  • $rcid: ID of the revision to be marked patrolled
  • $user: the user (object) marking the revision as patrolled
  • $wcOnlySysopsCanPatrol: always false since git #fcd1cdeb93 / task T7282
  • $auto: whether the edit is being marked as patrolled automatically (since gerrit:243821)
  • &$tags: the tags that will be added to the patrol log entry (since gerrit:500176)