MediaWiki  REL1_19
WatchedItem Class Reference

List of all members.

Public Member Functions

 addWatch ()
 Given a title and user (assumes the object is setup), add the watch to the database.
 isWatched ()
 Is mTitle being watched by mUser?
 removeWatch ()
 Same as addWatch, only the opposite.

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

Static Private Member Functions

static doDuplicateEntries ($ot, $nt)
 Handle duplicate entries.

Detailed Description

Definition at line 10 of file WatchedItem.php.


Member Function Documentation

Given a title and user (assumes the object is setup), add the watch to the database.

Returns:
bool (always true)

Definition at line 54 of file WatchedItem.php.

References MWNamespace\getSubject(), MWNamespace\getTalk(), wfGetDB(), wfProfileIn(), and wfProfileOut().

Here is the call graph for this function:

static WatchedItem::doDuplicateEntries ( ot,
nt 
) [static, private]

Handle duplicate entries.

Backend for duplicateEntries().

Parameters:
$otTitle
$ntTitle
Returns:
bool

Definition at line 142 of file WatchedItem.php.

References $res, and wfGetDB().

Referenced by duplicateEntries().

Here is the call graph for this function:

Here is the caller graph for this function:

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.

Parameters:
$otTitle: page title to duplicate entries from, if present
$ntTitle: page title to add watches on

Definition at line 129 of file WatchedItem.php.

References doDuplicateEntries().

Referenced by Title\moveTo().

Here is the call graph for this function:

Here is the caller graph for this function:

static WatchedItem::fromUserTitle ( user,
title 
) [static]

Create a WatchedItem object with the given user and title.

Parameters:
$userUser: the user to use for (un)watching
$titleTitle: the title we're going to (un)watch
Returns:
WatchedItem object

Definition at line 19 of file WatchedItem.php.

References $title, and $user.

Referenced by User\addWatch(), User\isWatched(), and User\removeWatch().

Here is the caller graph for this function:

Is mTitle being watched by mUser?

Returns:
bool

Definition at line 38 of file WatchedItem.php.

References $dbr, $res, and wfGetDB().

Here is the call graph for this function:

Same as addWatch, only the opposite.

Returns:
bool

Definition at line 86 of file WatchedItem.php.

References $success, MWNamespace\getSubject(), MWNamespace\getTalk(), wfGetDB(), wfProfileIn(), and wfProfileOut().

Here is the call graph for this function:


Member Data Documentation

WatchedItem::$id

Definition at line 11 of file WatchedItem.php.

WatchedItem::$mTitle

Definition at line 11 of file WatchedItem.php.

WatchedItem::$mUser

Definition at line 11 of file WatchedItem.php.

WatchedItem::$ns

Definition at line 11 of file WatchedItem.php.

WatchedItem::$ti

Definition at line 11 of file WatchedItem.php.


The documentation for this class was generated from the following file: