Available from version 1.32.0 (Gerrit change 473958)
Removed in version 1.38.0 (Gerrit change 722707)
Allows prevention of clearing of notification timestamp when a user views a page in their watchlist.
Define function:
public static function onBeforeResetNotificationTimestamp( User $user, title $title, string $force, int $oldId ) { ... }
Attach hook: In extension.json:
	"Hooks": {
		"BeforeResetNotificationTimestamp": "MediaWiki\\Extension\\MyExtension\\Hooks::onBeforeResetNotificationTimestamp"
Called from: File(s): watcheditem/WatchedItemStore.php
Function(s): resetNotificationTimestamp
Interface: BeforeResetNotificationTimestampHook.php

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

Details edit

  • &$user: User object
  • &$title: Title object
  • &$force: Whether or not the write query is forced to be executed even if the page is not watched or the notification timestamp is already NULL.
  • $oldId: The revision ID being viewed. If not given or 0, latest revision is assumed.

See also edit