ce 1.31
*
* @param UserIdentity $user
* @param LinkTarget $title
* @param string $force Whether to force the write query to be executed even if the
* page is not watched or the notification timestamp is already NULL.
* 'force' in order to force
* @param int $oldid The revision id being viewed. If not given or 0, latest revision is
* assumed.
*
* @return bool success Whether a job was enqueued
*/
public function resetNotificationTimestamp(
UserIdentity $user, LinkTarget $title, $force = '', $oldid = 0 );
/**
* @since 1.31
*
* @param UserIdentity $user
* @param int|null $unreadLimit
*
* @return int|bool The number of unread notifications
* true if greater than or equal to $unreadLimit
*/
public function countUnreadNotifications( UserIdentity $user, $unreadLimit = null );
/**
* Check if the given title already is watched by the user, and if so
* add a watch for the new title.
*
* To be used for page renames and such.
*
* @since 1.31
*
* @param LinkTarget $oldTarget
* @param LinkTarget $newTarget
*/
public function duplicateAllAssociatedEntries( LinkTarget $oldTarget, LinkTarget $newTarget );
/**
* Check if the given title already is watched by the user, and if so
* add a watch for the new title.
*
* To be used for page renames and such.
* This must be called separately for Subject and Talk pages
*
* @since 1.31
*
* @param LinkTarget $oldTarget
* @param LinkTarget $newTarget
*/
public function duplicateEntry( LinkTarget $oldTarget, LinkTarget $newTarget );
/**
* Synchronously clear the users watchlist.
*
* @since 1.31
*
* @param UserIdentity $user
*/
public function clearUserWatchedItems( UserIdentity $user );
/**
* Does the size of the users watchlist require clearUserWatchedItemsUsingJobQueue() to be used
* instead of clearUserWatchedItems()
*
* @since 1.35
*
* @param UserIdentity $user
* @return bool
*/
public function mustClearWatchedItemsUsingJobQueue( UserIdentity $user ): bool;
/**
* Queues a job that will clear the users watchlist using the Job Queue.
*
* @since 1.31
*
* @param UserIdentity $user
*/
public function clearUserWatchedItemsUsingJobQueue( UserIdentity $user );
/**
* Probabilistically add a job to purge the expired watchlist items.
*
* @since 1.35
*
* @param float $watchlistPurgeRate The value of the $wgWatchlistPurgeRate configuration variable.
*/
public function enqueueWatchlistExpiryJob( float $watchlistPurgeRate ): void;
/**
* @since 1.32
*
* @param UserIdentity $user
* @param LinkTarget[] $targets
*
* @return bool success
*/
public function removeWatchBatchForUser( UserIdentity $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 UserIdentity $user
* @param LinkTarget $target
* @return string|null TS_MW timestamp of first unseen revision or null if there isn't one
*/
public function getLatestNotificationTimestamp(
$timestamp, UserIdentity $user, LinkTarget $target );
/**
* Get the number of watchlist items that expire before the current time.
*
* @since 1.35
*
* @return int
*/
public function countExpired(): int;
/**
* Remove some number of expired watchlist items.
*
* @since 1.35
*
* @param int $limit The number of items to remove.
* @param bool $deleteOrphans Whether to also delete `watchlist_expiry` rows that have no
* related `watchlist` rows (because not all code knows about the expiry table yet). This runs
* two extra queries, so is only done from the purgeExpiredWatchlistItems.php maintenance script.
*/
public function removeExpired( int $limit, bool $deleteOrphans = false ): void;
}
Partituur:Lied 0260: verschil tussen versies - Parwiki