Manual:Hooks/DifferenceEngineShowDiffPageMaybeShowMissingRevision

From MediaWiki.org
Jump to navigation Jump to search
DifferenceEngineShowDiffPageMaybeShowMissingRevision
Available from version 1.29.0 (Gerrit change 322039)
called in DifferenceEngine::showDiffPage() when revision data cannot be loaded.
Define function:
public static function onDifferenceEngineShowDiffPageMaybeShowMissingRevision( $differenceEngine ) { ... }
Attach hook:

In extension.json:

{
	"Hooks": {
		"DifferenceEngineShowDiffPageMaybeShowMissingRevision": "MyExtensionHooks::onDifferenceEngineShowDiffPageMaybeShowMissingRevision"
	}
}

For MediaWiki ≤1.25:

$wgHooks['DifferenceEngineShowDiffPageMaybeShowMissingRevision'][] = 'MyExtensionHooks::onDifferenceEngineShowDiffPageMaybeShowMissingRevision';
Called from:File(s): DifferenceEngine.php
Function(s): showDiffPage

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

Called in DifferenceEngine::showDiffPage() when revision data cannot be loaded. Return false in order to prevent displaying the missing revision message (i.e. to prevent DifferenceEngine::showMissingRevision() from being called).

Details[edit]

  • $differenceEngine: DifferenceEngine object