MediaWiki
REL1_21
|
Base class for all changes lists. More...
Public Member Functions | |
__construct ($obj) | |
Changeslist constructor. | |
beginRecentChangesList () | |
Returns text for the start of the tabular part of RC. | |
endRecentChangesList () | |
Returns text for the end of RC. | |
formatCharacterDifference (RecentChange $old, RecentChange $new=null) | |
Format the character difference of one or several changes. | |
getTimestamp ($rc) | |
Get the timestamp from $rc formatted with current user's settings and a separator. | |
insertArticleLink (&$s, &$rc, $unpatrolled, $watched) | |
insertComment ($rc) | |
Insert a formatted comment. | |
insertDateHeader (&$s, $rc_timestamp) | |
insertDiffHist (&$s, &$rc, $unpatrolled) | |
insertExtra (&$s, &$rc, &$classes) | |
insertLog (&$s, $title, $logtype) | |
insertLogEntry ($rc) | |
Insert a formatted action. | |
insertRollback (&$s, &$rc) | |
Inserts a rollback link. | |
insertTags (&$s, &$rc, &$classes) | |
insertTimestamp (&$s, $rc) | |
Insert time timestamp string from $rc into $s. | |
insertUserRelatedLinks (&$s, &$rc) | |
Insert links to user page, user talk page and eventually a blocking link. | |
setWatchlistDivs ($value=true) | |
Sets the list to use a "<li class='watchlist-(namespace)-(page)'>" tag. | |
Static Public Member Functions | |
static | flag ($flag) |
Provide the "<abbr>" element appropriate to a given abbreviated flag, namely the flag indicating a new page, a minor edit, a bot edit, or an unpatrolled edit. | |
static | isDeleted ($rc, $field) |
Determine if said field of a revision is hidden. | |
static | newFromContext (IContextSource $context) |
Fetch an appropriate changes list class for the specified context Some users might want to use an enhanced list format, for instance. | |
static | newFromUser ($unused) |
Fetch an appropriate changes list class for the main context This first argument used to be an User object. | |
static | showCharacterDifference ($old, $new, IContextSource $context=null) |
Show formatted char difference. | |
static | usePatrol () |
Check whether to enable recent changes patrol features. | |
static | userCan ($rc, $field, User $user=null) |
Determine if the current user is allowed to view a particular field of this revision, if it's marked as deleted. | |
Public Attributes | |
Skin | $skin |
Protected Member Functions | |
maybeWatchedLink ($link, $watched=false) | |
numberofWatchingusers ($count) | |
Returns the string which indicates the number of watching users. | |
recentChangesFlags ($flags, $nothing= ' ') | |
Returns the appropriate flags for new page, minor change and patrolling. | |
showAsUnpatrolled (RecentChange $rc) | |
Protected Attributes | |
$message | |
$watchlist = false | |
Private Member Functions | |
preCacheMessages () | |
As we use the same small set of messages in various methods and that they are called often, we call them once and save them in $this->message. |
Base class for all changes lists.
Definition at line 51 of file ChangesList.php.
ChangesList::__construct | ( | $ | obj | ) |
Changeslist constructor.
$obj | Skin or IContextSource |
Definition at line 66 of file ChangesList.php.
Returns text for the start of the tabular part of RC.
Reimplemented in EnhancedChangesList.
Definition at line 188 of file ChangesList.php.
Returns text for the end of RC.
Reimplemented in EnhancedChangesList.
Definition at line 280 of file ChangesList.php.
static ChangesList::flag | ( | $ | flag | ) | [static] |
Provide the "<abbr>" element appropriate to a given abbreviated flag, namely the flag indicating a new page, a minor edit, a bot edit, or an unpatrolled edit.
By default in English it will contain "N", "m", "b", "!" respectively, plus it will have an appropriate title and class.
string | $flag | 'newpage', 'unpatrolled', 'minor', or 'bot' |
Definition at line 155 of file ChangesList.php.
Referenced by DeletedContribsPager\formatRow().
ChangesList::formatCharacterDifference | ( | RecentChange $ | old, |
RecentChange $ | new = null |
||
) |
Format the character difference of one or several changes.
$old | RecentChange |
$new | RecentChange last change to use, if not provided, $old will be used |
Definition at line 260 of file ChangesList.php.
ChangesList::getTimestamp | ( | $ | rc | ) |
Get the timestamp from $rc formatted with current user's settings and a separator.
$rc | RecentChange |
Definition at line 401 of file ChangesList.php.
ChangesList::insertArticleLink | ( | &$ | s, |
&$ | rc, | ||
$ | unpatrolled, | ||
$ | watched | ||
) |
string | $s | HTML to update |
$rc | RecentChange | |
$unpatrolled | ||
$watched |
Definition at line 365 of file ChangesList.php.
ChangesList::insertComment | ( | $ | rc | ) |
Insert a formatted comment.
$rc | RecentChange |
Definition at line 451 of file ChangesList.php.
ChangesList::insertDateHeader | ( | &$ | s, |
$ | rc_timestamp | ||
) |
string | $s | HTML to update |
$rc_timestamp | mixed |
Definition at line 292 of file ChangesList.php.
ChangesList::insertDiffHist | ( | &$ | s, |
&$ | rc, | ||
$ | unpatrolled | ||
) |
string | $s | HTML to update |
$rc | RecentChange | |
$unpatrolled |
Definition at line 321 of file ChangesList.php.
ChangesList::insertExtra | ( | &$ | s, |
&$ | rc, | ||
&$ | classes | ||
) |
Definition at line 564 of file ChangesList.php.
ChangesList::insertLog | ( | &$ | s, |
$ | title, | ||
$ | logtype | ||
) |
string | $s | HTML to update |
$title | Title | |
$logtype | string |
Definition at line 310 of file ChangesList.php.
ChangesList::insertLogEntry | ( | $ | rc | ) |
Insert a formatted action.
$rc | RecentChange |
Definition at line 438 of file ChangesList.php.
ChangesList::insertRollback | ( | &$ | s, |
&$ | rc | ||
) |
Inserts a rollback link.
$s | string |
$rc | RecentChange |
Definition at line 531 of file ChangesList.php.
ChangesList::insertTags | ( | &$ | s, |
&$ | rc, | ||
&$ | classes | ||
) |
$s | string |
$rc | RecentChange |
$classes |
Definition at line 555 of file ChangesList.php.
ChangesList::insertTimestamp | ( | &$ | s, |
$ | rc | ||
) |
Insert time timestamp string from $rc into $s.
string | $s | HTML to update |
$rc | RecentChange |
Definition at line 412 of file ChangesList.php.
ChangesList::insertUserRelatedLinks | ( | &$ | s, |
&$ | rc | ||
) |
Insert links to user page, user talk page and eventually a blocking link.
&$s | String HTML to update |
&$rc | RecentChange |
Definition at line 422 of file ChangesList.php.
static ChangesList::isDeleted | ( | $ | rc, |
$ | field | ||
) | [static] |
Determine if said field of a revision is hidden.
$rc | RCCacheEntry |
$field | Integer: one of DELETED_* bitfield constants |
Definition at line 493 of file ChangesList.php.
ChangesList::maybeWatchedLink | ( | $ | link, |
$ | watched = false |
||
) | [protected] |
static ChangesList::newFromContext | ( | IContextSource $ | context | ) | [static] |
Fetch an appropriate changes list class for the specified context Some users might want to use an enhanced list format, for instance.
$context | IContextSource to use |
Definition at line 97 of file ChangesList.php.
Referenced by SpecialWatchlist\execute(), and SpecialRecentChanges\webOutput().
static ChangesList::newFromUser | ( | $ | unused | ) | [static] |
Fetch an appropriate changes list class for the main context This first argument used to be an User object.
string | User | $unused | Unused |
Definition at line 85 of file ChangesList.php.
ChangesList::numberofWatchingusers | ( | $ | count | ) | [protected] |
Returns the string which indicates the number of watching users.
Definition at line 475 of file ChangesList.php.
ChangesList::preCacheMessages | ( | ) | [private] |
As we use the same small set of messages in various methods and that they are called often, we call them once and save them in $this->message.
Definition at line 121 of file ChangesList.php.
ChangesList::recentChangesFlags | ( | $ | flags, |
$ | nothing = ' ' |
||
) | [protected] |
Returns the appropriate flags for new page, minor change and patrolling.
array | $flags | Associative array of 'flag' => Bool |
string | $nothing | to use for empty space |
Definition at line 136 of file ChangesList.php.
ChangesList::setWatchlistDivs | ( | $ | value = true | ) |
Sets the list to use a "<li class='watchlist-(namespace)-(page)'>" tag.
$value | Boolean |
Definition at line 113 of file ChangesList.php.
ChangesList::showAsUnpatrolled | ( | RecentChange $ | rc | ) | [protected] |
Definition at line 568 of file ChangesList.php.
References ContextSource\getUser().
static ChangesList::showCharacterDifference | ( | $ | old, |
$ | new, | ||
IContextSource $ | context = null |
||
) | [static] |
Show formatted char difference.
$old | Integer: bytes |
$new | Integer: bytes |
$context | IContextSource context to use |
Definition at line 205 of file ChangesList.php.
static ChangesList::usePatrol | ( | ) | [static] |
Check whether to enable recent changes patrol features.
Definition at line 466 of file ChangesList.php.
static ChangesList::userCan | ( | $ | rc, |
$ | field, | ||
User $ | user = null |
||
) | [static] |
Determine if the current user is allowed to view a particular field of this revision, if it's marked as deleted.
$rc | RCCacheEntry |
$field | Integer |
$user | User object to check, or null to use $wgUser |
Definition at line 505 of file ChangesList.php.
ChangesList::$message [protected] |
Definition at line 59 of file ChangesList.php.
Definition at line 55 of file ChangesList.php.
ChangesList::$watchlist = false [protected] |
Definition at line 57 of file ChangesList.php.