MediaWiki  REL1_22
ChangesList Class Reference
Inheritance diagram for ChangesList:
Collaboration diagram for ChangesList:

List of all members.

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.
 recentChangesFlags ($flags, $nothing= ' ')
 Returns the appropriate flags for new page, minor change and patrolling.
 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.
 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.

Detailed Description

Definition at line 25 of file ChangesList.php.


Constructor & Destructor Documentation

Changeslist constructor.

Parameters:
$objSkin or IContextSource

Definition at line 40 of file ChangesList.php.


Member Function Documentation

Returns text for the start of the tabular part of RC.

Returns:
String

Reimplemented in EnhancedChangesList.

Definition at line 164 of file ChangesList.php.

Returns text for the end of RC.

Returns:
String

Reimplemented in EnhancedChangesList.

Definition at line 256 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.

Parameters:
string$flagOne key of $wgRecentChangesFlags
Returns:
String: Raw HTML

Definition at line 132 of file ChangesList.php.

Referenced by EnhancedChangesList\recentChangesBlockGroup().

Format the character difference of one or several changes.

Parameters:
$oldRecentChange
$newRecentChange last change to use, if not provided, $old will be used
Returns:
string HTML fragment

Definition at line 236 of file ChangesList.php.

Referenced by EnhancedChangesList\recentChangesBlockGroup(), EnhancedChangesList\recentChangesBlockLine(), and OldChangesList\recentChangesLine().

Get the timestamp from $rc formatted with current user's settings and a separator.

Parameters:
$rcRecentChange
Returns:
string HTML fragment

Definition at line 367 of file ChangesList.php.

ChangesList::insertArticleLink ( &$  s,
&$  rc,
unpatrolled,
watched 
)
Parameters:
string$sHTML to update
$rcRecentChange
$unpatrolled
$watched

Definition at line 337 of file ChangesList.php.

Referenced by EnhancedChangesList\recentChangesBlockGroup(), EnhancedChangesList\recentChangesBlockLine(), and OldChangesList\recentChangesLine().

Insert a formatted comment.

Parameters:
$rcRecentChange
Returns:
string

Definition at line 417 of file ChangesList.php.

Referenced by EnhancedChangesList\recentChangesBlockGroup(), EnhancedChangesList\recentChangesBlockLine(), and OldChangesList\recentChangesLine().

ChangesList::insertDateHeader ( &$  s,
rc_timestamp 
)
Parameters:
string$sHTML to update
$rc_timestampmixed

Definition at line 268 of file ChangesList.php.

Referenced by OldChangesList\recentChangesLine().

ChangesList::insertDiffHist ( &$  s,
&$  rc,
unpatrolled 
)
Parameters:
string$sHTML to update
$rcRecentChange
$unpatrolled

Definition at line 297 of file ChangesList.php.

Referenced by OldChangesList\recentChangesLine().

ChangesList::insertExtra ( &$  s,
&$  rc,
&$  classes 
)

Definition at line 536 of file ChangesList.php.

Referenced by OldChangesList\recentChangesLine().

ChangesList::insertLog ( &$  s,
title,
logtype 
)
Parameters:
string$sHTML to update
$titleTitle
$logtypestring

Definition at line 286 of file ChangesList.php.

Referenced by OldChangesList\recentChangesLine().

Insert a formatted action.

Parameters:
$rcRecentChange
Returns:
string

Definition at line 404 of file ChangesList.php.

Referenced by EnhancedChangesList\recentChangesBlockGroup(), EnhancedChangesList\recentChangesBlockLine(), and OldChangesList\recentChangesLine().

ChangesList::insertRollback ( &$  s,
&$  rc 
)

Inserts a rollback link.

Parameters:
$sstring
$rcRecentChange

Definition at line 502 of file ChangesList.php.

Referenced by EnhancedChangesList\recentChangesBlockGroup(), EnhancedChangesList\recentChangesBlockLine(), and OldChangesList\recentChangesLine().

ChangesList::insertTags ( &$  s,
&$  rc,
&$  classes 
)
ChangesList::insertTimestamp ( &$  s,
rc 
)

Insert time timestamp string from $rc into $s.

Parameters:
string$sHTML to update
$rcRecentChange

Definition at line 378 of file ChangesList.php.

Referenced by OldChangesList\recentChangesLine().

ChangesList::insertUserRelatedLinks ( &$  s,
&$  rc 
)

Insert links to user page, user talk page and eventually a blocking link.

Parameters:
&$sString HTML to update
&$rcRecentChange

Definition at line 388 of file ChangesList.php.

Referenced by OldChangesList\recentChangesLine().

static ChangesList::isDeleted ( rc,
field 
) [static]

Determine if said field of a revision is hidden.

Parameters:
$rcRCCacheEntry
$fieldInteger: one of DELETED_* bitfield constants
Returns:
Boolean

Definition at line 464 of file ChangesList.php.

Referenced by EnhancedChangesList\recentChangesBlockGroup(), and EnhancedChangesList\recentChangesLine().

ChangesList::maybeWatchedLink ( link,
watched = false 
) [protected]
Parameters:
$linkstring
$watchedbool
Returns:
string

Definition at line 489 of file ChangesList.php.

Referenced by EnhancedChangesList\recentChangesBlockGroup().

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.

Parameters:
$contextIContextSource to use
Returns:
ChangesList|EnhancedChangesList|OldChangesList derivative

Definition at line 71 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.

Deprecated:
in 1.18; use newFromContext() instead
Parameters:
string | User$unusedUnused
Returns:
ChangesList|EnhancedChangesList|OldChangesList derivative

Definition at line 59 of file ChangesList.php.

ChangesList::numberofWatchingusers ( count) [protected]

Returns the string which indicates the number of watching users.

Returns:
string

Definition at line 446 of file ChangesList.php.

Referenced by EnhancedChangesList\recentChangesBlockGroup(), EnhancedChangesList\recentChangesBlockLine(), and OldChangesList\recentChangesLine().

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 95 of file ChangesList.php.

ChangesList::recentChangesFlags ( flags,
nothing = '&#160;' 
)

Returns the appropriate flags for new page, minor change and patrolling.

Parameters:
array$flagsAssociative array of 'flag' => Bool
string$nothingto use for empty space
Returns:
String

Definition at line 112 of file ChangesList.php.

Referenced by EnhancedChangesList\recentChangesBlockGroup(), EnhancedChangesList\recentChangesBlockLine(), and OldChangesList\recentChangesLine().

Sets the list to use a "<li class='watchlist-(namespace)-(page)'>" tag.

Parameters:
$valueBoolean

Definition at line 87 of file ChangesList.php.

static ChangesList::showCharacterDifference ( old,
new,
IContextSource context = null 
) [static]

Show formatted char difference.

Parameters:
$oldInteger: bytes
$newInteger: bytes
$contextIContextSource context to use
Returns:
String

Definition at line 181 of file ChangesList.php.

static ChangesList::usePatrol ( ) [static]

Check whether to enable recent changes patrol features.

Deprecated:
since 1.22
Returns:
Boolean

Definition at line 434 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.

Parameters:
$rcRCCacheEntry
$fieldInteger
$userUser object to check, or null to use $wgUser
Returns:
Boolean

Definition at line 476 of file ChangesList.php.

Referenced by EnhancedChangesList\recentChangesBlockGroup(), and EnhancedChangesList\recentChangesLine().


Member Data Documentation

ChangesList::$message [protected]

Definition at line 33 of file ChangesList.php.

Skin ChangesList::$skin

Definition at line 29 of file ChangesList.php.

ChangesList::$watchlist = false [protected]

Definition at line 31 of file ChangesList.php.


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