MediaWiki REL1_37
|
Manages user talk page notifications. More...
Public Member Functions | |
__construct (ServiceOptions $serviceOptions, ILoadBalancer $loadBalancer, ReadOnlyMode $readOnlyMode, RevisionLookup $revisionLookup) | |
clearInstanceCache (UserIdentity $user) | |
Remove the cached newtalk status for the given user. | |
getLatestSeenMessageTimestamp (UserIdentity $user) | |
Returns the timestamp of the latest revision of the user talkpage that the user has already seen in TS_MW format. | |
removeUserHasNewMessages (UserIdentity $user) | |
Remove the new messages status. | |
setUserHasNewMessages (UserIdentity $user, RevisionRecord $curRev=null) | |
Update the talk page messages status. | |
userHasNewMessages (UserIdentity $user) | |
Check if the user has new messages. | |
Public Attributes | |
const | CONSTRUCTOR_OPTIONS |
Private Member Functions | |
dbCheckNewUserMessages (UserIdentity $user) | |
Internal uncached check for new messages. | |
dbDeleteNewUserMessages (UserIdentity $user) | |
Clear the new messages flag for the given user. | |
dbUpdateNewUserMessages (UserIdentity $user, RevisionRecord $curRev=null) | |
Add or update the new messages flag. | |
getCacheKey (UserIdentity $user) | |
Gets a unique key for various caches. | |
getQueryFieldAndId (UserIdentity $user) | |
Get the field name and id for the user_newtalk table query. | |
isTalkDisabled (UserIdentity $user) | |
Check whether the talk page is disabled for a user. | |
Private Attributes | |
bool | $disableAnonTalk |
ILoadBalancer | $loadBalancer |
ReadOnlyMode | $readOnlyMode |
RevisionLookup | $revisionLookup |
array | $userMessagesCache = [] |
Manages user talk page notifications.
Definition at line 35 of file TalkPageNotificationManager.php.
MediaWiki\User\TalkPageNotificationManager::__construct | ( | ServiceOptions | $serviceOptions, |
ILoadBalancer | $loadBalancer, | ||
ReadOnlyMode | $readOnlyMode, | ||
RevisionLookup | $revisionLookup | ||
) |
ServiceOptions | $serviceOptions | |
ILoadBalancer | $loadBalancer | |
ReadOnlyMode | $readOnlyMode | |
RevisionLookup | $revisionLookup |
Definition at line 65 of file TalkPageNotificationManager.php.
References MediaWiki\User\TalkPageNotificationManager\$loadBalancer, MediaWiki\User\TalkPageNotificationManager\$readOnlyMode, MediaWiki\User\TalkPageNotificationManager\$revisionLookup, MediaWiki\Config\ServiceOptions\assertRequiredOptions(), and MediaWiki\Config\ServiceOptions\get().
MediaWiki\User\TalkPageNotificationManager::clearInstanceCache | ( | UserIdentity | $user | ) |
Remove the cached newtalk status for the given user.
UserIdentity | $user |
Definition at line 175 of file TalkPageNotificationManager.php.
|
private |
Internal uncached check for new messages.
UserIdentity | $user |
Definition at line 194 of file TalkPageNotificationManager.php.
Referenced by MediaWiki\User\TalkPageNotificationManager\userHasNewMessages().
|
private |
Clear the new messages flag for the given user.
UserIdentity | $user |
Definition at line 248 of file TalkPageNotificationManager.php.
|
private |
Add or update the new messages flag.
UserIdentity | $user | |
RevisionRecord | null | $curRev | New, as yet unseen revision of the user talk page. Ignored if null. |
Definition at line 213 of file TalkPageNotificationManager.php.
|
private |
Gets a unique key for various caches.
UserIdentity | $user |
Definition at line 283 of file TalkPageNotificationManager.php.
MediaWiki\User\TalkPageNotificationManager::getLatestSeenMessageTimestamp | ( | UserIdentity | $user | ) |
Returns the timestamp of the latest revision of the user talkpage that the user has already seen in TS_MW format.
If the user has no new messages, returns null
UserIdentity | $user |
Definition at line 143 of file TalkPageNotificationManager.php.
|
private |
Get the field name and id for the user_newtalk table query.
UserIdentity | $user |
Definition at line 267 of file TalkPageNotificationManager.php.
References MediaWiki\User\UserIdentity\getId().
|
private |
Check whether the talk page is disabled for a user.
UserIdentity | $user |
Definition at line 185 of file TalkPageNotificationManager.php.
Referenced by MediaWiki\User\TalkPageNotificationManager\userHasNewMessages().
MediaWiki\User\TalkPageNotificationManager::removeUserHasNewMessages | ( | UserIdentity | $user | ) |
Remove the new messages status.
UserIdentity | $user |
Definition at line 124 of file TalkPageNotificationManager.php.
Referenced by MediaWiki\Watchlist\WatchlistManager\clearTitleUserNotifications().
MediaWiki\User\TalkPageNotificationManager::setUserHasNewMessages | ( | UserIdentity | $user, |
RevisionRecord | $curRev = null |
||
) |
Update the talk page messages status.
UserIdentity | $user | |
RevisionRecord | null | $curRev | New, as yet unseen revision of the user talk page. Null is acceptable in case the revision is not known. This will indicate that new messages exist, but will not affect the latest seen message timestamp |
Definition at line 107 of file TalkPageNotificationManager.php.
Referenced by MediaWiki\Watchlist\WatchlistManager\clearTitleUserNotifications().
MediaWiki\User\TalkPageNotificationManager::userHasNewMessages | ( | UserIdentity | $user | ) |
Check if the user has new messages.
UserIdentity | $user |
Definition at line 83 of file TalkPageNotificationManager.php.
References MediaWiki\User\TalkPageNotificationManager\dbCheckNewUserMessages(), and MediaWiki\User\TalkPageNotificationManager\isTalkDisabled().
Referenced by MediaWiki\Watchlist\WatchlistManager\clearTitleUserNotifications().
|
private |
Definition at line 48 of file TalkPageNotificationManager.php.
|
private |
Definition at line 51 of file TalkPageNotificationManager.php.
Referenced by MediaWiki\User\TalkPageNotificationManager\__construct().
|
private |
Definition at line 54 of file TalkPageNotificationManager.php.
Referenced by MediaWiki\User\TalkPageNotificationManager\__construct().
|
private |
Definition at line 57 of file TalkPageNotificationManager.php.
Referenced by MediaWiki\User\TalkPageNotificationManager\__construct().
|
private |
Definition at line 45 of file TalkPageNotificationManager.php.
const MediaWiki\User\TalkPageNotificationManager::CONSTRUCTOR_OPTIONS |
Definition at line 40 of file TalkPageNotificationManager.php.