Manual:Hooks/DifferenceEngineMarkPatrolledRCID

From MediaWiki.org
Jump to navigation Jump to search
DifferenceEngineMarkPatrolledRCID
Available from version 1.29.0 (Gerrit change 322039)
Allows extensions to possibly change the rcid parameter.
Define function:
public static function onDifferenceEngineMarkPatrolledRCID( int &$rcid, DifferenceEngine $differenceEngine, RecentChange $change, User $user ) { ... }
Attach hook:

In extension.json:

{
	"Hooks": {
		"DifferenceEngineMarkPatrolledRCID": "MyExtensionHooks::onDifferenceEngineMarkPatrolledRCID"
	}
}

For MediaWiki ≤1.25:

$wgHooks['DifferenceEngineMarkPatrolledRCID'][] = 'MyExtensionHooks::onDifferenceEngineMarkPatrolledRCID';
Called from:File(s): diff/DifferenceEngine.php
Function(s): getMarkPatrolledLinkInfo

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

Allows extensions to possibly change the rcid parameter. For example the rcid might be set to zero due to the user being the same as the performer of the change but an extension might still want to show it under certain conditions.

Details[edit]

  • &$rcid: rc_id (int) of the change or 0
  • $differenceEngine: DifferenceEngine object
  • $change: RecentChange object
  • $user: User object representing the current user