From: James Montalvo Date: Fri, 16 Nov 2018 00:09:11 +0000 (-0600) Subject: Add BeforeResetNotificationTimestamp hook X-Git-Tag: 1.34.0-rc.0~2941^2 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/categories/%24h?a=commitdiff_plain;h=ac3e1829c55778cd56f87911584a38bc36e57b0a;p=lhc%2Fweb%2Fwiklou.git Add BeforeResetNotificationTimestamp hook Allows prevention of clearing of notification timestamp when a user views a page in their watchlist. Change-Id: Id0af5c89c648ac6dce80012a1566426d5552942f --- diff --git a/includes/watcheditem/WatchedItemStore.php b/includes/watcheditem/WatchedItemStore.php index a9bba7a9f0..4abe7af6e4 100644 --- a/includes/watcheditem/WatchedItemStore.php +++ b/includes/watcheditem/WatchedItemStore.php @@ -908,6 +908,10 @@ class WatchedItemStore implements WatchedItemStoreInterface, StatsdAwareInterfac return false; } + if ( ! Hooks::run( 'BeforeResetNotificationTimestamp', [ &$user, &$title, $force, &$oldid ] ) ) { + return false; + } + $item = null; if ( $force != 'force' ) { $item = $this->loadWatchedItem( $user, $title );