X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fwatcheditem%2FWatchedItemStoreInterface.php;h=99a051de9f8e0c320810fe75487b700d58e24b71;hb=a38af7ba26579bb3004f673e44d39710887763aa;hp=30d1cbbe3be248043da0a39a1d2b4e7b0d200c0f;hpb=fd3f586dbbbb556aa19c0a53c7e8cb1aa93fa164;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/watcheditem/WatchedItemStoreInterface.php b/includes/watcheditem/WatchedItemStoreInterface.php index 30d1cbbe3b..349d98a231 100644 --- a/includes/watcheditem/WatchedItemStoreInterface.php +++ b/includes/watcheditem/WatchedItemStoreInterface.php @@ -193,7 +193,7 @@ interface WatchedItemStoreInterface { public function addWatchBatchForUser( User $user, array $targets ); /** - * Removes the an entry for the User watching the LinkTarget + * Removes an entry for the User watching the LinkTarget * Must be called separately for Subject & Talk namespaces * * @since 1.31 @@ -264,7 +264,7 @@ interface WatchedItemStoreInterface { * @since 1.31 * * @param User $user - * @param int $unreadLimit + * @param int|null $unreadLimit * * @return int|bool The number of unread notifications * true if greater than or equal to $unreadLimit @@ -316,4 +316,28 @@ interface WatchedItemStoreInterface { */ public function clearUserWatchedItemsUsingJobQueue( User $user ); + /** + * @since 1.32 + * + * @param User $user + * @param LinkTarget[] $targets + * + * @return bool success + */ + public function removeWatchBatchForUser( User $user, array $targets ); + + /** + * Convert $timestamp to TS_MW or return null if the page was visited since then by $user + * + * Use this only on single-user methods (having higher read-after-write expectations) + * and not in places involving arbitrary batches of different users + * + * Usage of this method should be limited to WatchedItem* classes + * + * @param string|null $timestamp Value of wl_notificationtimestamp from the DB + * @param User $user + * @param LinkTarget $target + * @return string TS_MW timestamp or null + */ + public function getLatestNotificationTimestamp( $timestamp, User $user, LinkTarget $target ); }