MediaWiki
REL1_20
|
Representation of a pair of user and title for watchlist entries. More...
Public Member Functions | |
addWatch () | |
Given a title and user (assumes the object is setup), add the watch to the database. | |
getNotificationTimestamp () | |
Get the notification timestamp of this entry. | |
isWatched () | |
Is mTitle being watched by mUser? | |
removeWatch () | |
Same as addWatch, only the opposite. | |
resetNotificationTimestamp ($force= '') | |
Reset the notification timestamp of this entry. | |
Static Public Member Functions | |
static | duplicateEntries ($ot, $nt) |
Check if the given title already is watched by the user, and if so add watches on a new title. | |
static | fromUserTitle ($user, $title) |
Create a WatchedItem object with the given user and title. | |
Public Attributes | |
$id | |
$mTitle | |
$mUser | |
$ns | |
$ti | |
$timestamp | |
$watched | |
Private Member Functions | |
dbCond () | |
Return an array of conditions to select or update the appropriate database row. | |
load () | |
Load the object from the database. | |
Static Private Member Functions | |
static | doDuplicateEntries ($ot, $nt) |
Handle duplicate entries. | |
Private Attributes | |
$loaded = false |
Representation of a pair of user and title for watchlist entries.
Definition at line 29 of file WatchedItem.php.
Given a title and user (assumes the object is setup), add the watch to the database.
Definition at line 139 of file WatchedItem.php.
References MWNamespace\getSubject(), MWNamespace\getTalk(), wfGetDB(), wfProfileIn(), and wfProfileOut().
WatchedItem::dbCond | ( | ) | [private] |
Return an array of conditions to select or update the appropriate database row.
Definition at line 60 of file WatchedItem.php.
Referenced by load(), and resetNotificationTimestamp().
static WatchedItem::doDuplicateEntries | ( | $ | ot, |
$ | nt | ||
) | [static, private] |
Handle duplicate entries.
Backend for duplicateEntries().
Definition at line 231 of file WatchedItem.php.
References $res, $s, and wfGetDB().
Referenced by duplicateEntries().
static WatchedItem::duplicateEntries | ( | $ | ot, |
$ | nt | ||
) | [static] |
Check if the given title already is watched by the user, and if so add watches on a new title.
To be used for page renames and such.
$ot | Title: page title to duplicate entries from, if present |
$nt | Title: page title to add watches on |
Definition at line 218 of file WatchedItem.php.
References doDuplicateEntries().
Referenced by Title\moveTo().
static WatchedItem::fromUserTitle | ( | $ | user, |
$ | title | ||
) | [static] |
Create a WatchedItem object with the given user and title.
$user | User: the user to use for (un)watching |
$title | Title: the title we're going to (un)watch |
Definition at line 39 of file WatchedItem.php.
Get the notification timestamp of this entry.
Definition at line 103 of file WatchedItem.php.
References load().
Is mTitle being watched by mUser?
Definition at line 92 of file WatchedItem.php.
References load().
WatchedItem::load | ( | ) | [private] |
Load the object from the database.
Definition at line 67 of file WatchedItem.php.
References $dbr, dbCond(), and wfGetDB().
Referenced by getNotificationTimestamp(), isWatched(), and resetNotificationTimestamp().
Same as addWatch, only the opposite.
Definition at line 173 of file WatchedItem.php.
References $success, MWNamespace\getSubject(), MWNamespace\getTalk(), wfGetDB(), wfProfileIn(), and wfProfileOut().
WatchedItem::resetNotificationTimestamp | ( | $ | force = '' | ) |
Reset the notification timestamp of this entry.
$force | Whether to force the write query to be executed even if the page is not watched or the notification timestamp is already NULL. |
Definition at line 118 of file WatchedItem.php.
WatchedItem::$id |
Definition at line 30 of file WatchedItem.php.
WatchedItem::$loaded = false [private] |
Definition at line 31 of file WatchedItem.php.
WatchedItem::$mTitle |
Definition at line 30 of file WatchedItem.php.
WatchedItem::$mUser |
Definition at line 30 of file WatchedItem.php.
WatchedItem::$ns |
Definition at line 30 of file WatchedItem.php.
WatchedItem::$ti |
Definition at line 30 of file WatchedItem.php.
WatchedItem::$timestamp |
Definition at line 31 of file WatchedItem.php.
WatchedItem::$watched |
Definition at line 31 of file WatchedItem.php.