MediaWiki  REL1_19
ChangesList Class Reference

Base class for all changes lists. More...

Inheritance diagram for ChangesList:
Collaboration diagram for ChangesList:

List of all members.

Public Member Functions

 __construct ($obj)
 Changeslist contructor.
 beginRecentChangesList ()
 Returns text for the start of the tabular part of RC.
 endRecentChangesList ()
 Returns text for the end of RC.
 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)
 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 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)
 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

Protected Member Functions

 maybeWatchedLink ($link, $watched=false)
 numberofWatchingusers ($count)
 Returns the string which indicates the number of watching users.
 recentChangesFlags ($flags, $nothing= '&#160;')
 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.

Detailed Description

Base class for all changes lists.

Definition at line 34 of file ChangesList.php.


Constructor & Destructor Documentation

Changeslist contructor.

Parameters:
$objSkin or IContextSource

Definition at line 50 of file ChangesList.php.

References preCacheMessages(), and ContextSource\setContext().

Here is the call graph for this function:


Member Function Documentation

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

Returns:
String

Reimplemented in EnhancedChangesList.

Definition at line 172 of file ChangesList.php.

Returns text for the end of RC.

Returns:
String

Reimplemented in EnhancedChangesList.

Definition at line 231 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:
$flagString: 'newpage', 'unpatrolled', 'minor', or 'bot'
Returns:
String: Raw HTML

Definition at line 139 of file ChangesList.php.

References $messages, and wfMsgExt().

Referenced by DeletedContribsPager\formatRow(), ContribsPager\formatRow(), HistoryPager\historyLine(), recentChangesFlags(), and DifferenceEngine\showDiffPage().

Here is the call graph for this function:

Here is the caller graph for this function:

ChangesList::insertArticleLink ( &$  s,
&$  rc,
unpatrolled,
watched 
)
Parameters:
$s
$rcRecentChange
$unpatrolled
$watched

Definition at line 307 of file ChangesList.php.

References Revision\DELETED_TEXT, ContextSource\getLanguage(), isDeleted(), Linker\linkKnown(), and wfRunHooks().

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

Here is the call graph for this function:

Here is the caller graph for this function:

Insert a formatted comment.

Parameters:
$rcRecentChange

Definition at line 379 of file ChangesList.php.

References Linker\commentBlock(), Revision\DELETED_COMMENT, isDeleted(), and wfMsgHtml().

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

Here is the call graph for this function:

Here is the caller graph for this function:

ChangesList::insertDateHeader ( &$  s,
rc_timestamp 
)

Definition at line 239 of file ChangesList.php.

References Xml\element(), and ContextSource\getLanguage().

Referenced by OldChangesList\recentChangesLine().

Here is the call graph for this function:

Here is the caller graph for this function:

ChangesList::insertDiffHist ( &$  s,
&$  rc,
unpatrolled 
)
Parameters:
$s
$rcRecentChange
$unpatrolled

Definition at line 263 of file ChangesList.php.

References Revision\DELETED_TEXT, ContextSource\getUser(), and Linker\linkKnown().

Referenced by OldChangesList\recentChangesLine().

Here is the call graph for this function:

Here is the caller graph for this function:

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

Definition at line 491 of file ChangesList.php.

Referenced by OldChangesList\recentChangesLine().

Here is the caller graph for this function:

ChangesList::insertLog ( &$  s,
title,
logtype 
)

Definition at line 252 of file ChangesList.php.

References $page, $title, and Linker\linkKnown().

Referenced by OldChangesList\recentChangesLine().

Here is the call graph for this function:

Here is the caller graph for this function:

Insert a formatted action.

Parameters:
$rcRecentChange

Definition at line 368 of file ChangesList.php.

References ContextSource\getLanguage(), and LogFormatter\newFromRow().

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

Here is the call graph for this function:

Here is the caller graph for this function:

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

Inserts a rollback link.

Parameters:
$sstring
$rcRecentChange

Definition at line 458 of file ChangesList.php.

References $page, ContextSource\getContext(), and ContextSource\getUser().

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

Here is the call graph for this function:

Here is the caller graph for this function:

ChangesList::insertTags ( &$  s,
&$  rc,
&$  classes 
)
Parameters:
$sstring
$rcRecentChange
$classes

Definition at line 482 of file ChangesList.php.

References ChangeTags\formatSummaryRow().

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

Here is the call graph for this function:

Here is the caller graph for this function:

ChangesList::insertTimestamp ( &$  s,
rc 
)
Parameters:
$s
$rcRecentChange

Definition at line 342 of file ChangesList.php.

References ContextSource\getLanguage().

Referenced by OldChangesList\recentChangesLine().

Here is the call graph for this function:

Here is the caller graph for this function:

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

References Revision\DELETED_USER, ContextSource\getLanguage(), isDeleted(), Linker\userLink(), Linker\userToolLinks(), and wfMsgHtml().

Referenced by OldChangesList\recentChangesLine().

Here is the call graph for this function:

Here is the caller graph for this function:

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

Referenced by insertArticleLink(), insertComment(), insertUserRelatedLinks(), EnhancedChangesList\recentChangesBlockGroup(), and EnhancedChangesList\recentChangesLine().

Here is the caller graph for this function:

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

Definition at line 445 of file ChangesList.php.

Referenced by EnhancedChangesList\recentChangesBlockGroup().

Here is the caller graph for this function:

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

References $user, IContextSource\getRequest(), IContextSource\getSkin(), IContextSource\getUser(), and wfRunHooks().

Referenced by SpecialWatchlist\execute(), newFromUser(), and SpecialRecentChanges\webOutput().

Here is the call graph for this function:

Here is the caller graph for this function:

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:
$unusedUnused
Returns:
ChangesList|EnhancedChangesList|OldChangesList derivative

Definition at line 69 of file ChangesList.php.

References RequestContext\getMain(), newFromContext(), and wfDeprecated().

Here is the call graph for this function:

ChangesList::numberofWatchingusers ( count) [protected]

Returns the string which indicates the number of watching users.

Definition at line 401 of file ChangesList.php.

References $count, ContextSource\getLanguage(), and wfMsgExt().

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

Here is the call graph for this function:

Here is the caller graph for this function:

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

References wfMsgExt().

Referenced by __construct().

Here is the call graph for this function:

Here is the caller graph for this function:

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

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

Parameters:
$flagsArray Associative array of 'flag' => Bool
$nothingString to use for empty space
Returns:
String

Definition at line 120 of file ChangesList.php.

References $f, and flag().

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

Here is the call graph for this function:

Here is the caller graph for this function:

ChangesList::setWatchlistDivs ( value = true)

Sets the list to use a tag.

Parameters:
$valueBoolean

Definition at line 97 of file ChangesList.php.

Definition at line 495 of file ChangesList.php.

References ContextSource\getUser().

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

Here is the call graph for this function:

Here is the caller graph for this function:

static ChangesList::showCharacterDifference ( old,
new 
) [static]

Show formatted char difference.

Parameters:
$oldInteger: bytes
$newInteger: bytes
Returns:
String

Definition at line 187 of file ChangesList.php.

References $wgLang, $wgMiserMode, $wgRCChangedSizeThreshold, Html\element(), wfMessage(), wfMsgExt(), and wfMsgNoTrans().

Referenced by ContribsPager\formatRow(), RecentChange\getCharacterDifference(), and HistoryPager\historyLine().

Here is the call graph for this function:

Here is the caller graph for this function:

static ChangesList::usePatrol ( ) [static]

Check whether to enable recent changes patrol features.

Returns:
Boolean

Definition at line 393 of file ChangesList.php.

References $wgUser.

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

References $user, LogEventsList\userCanBitfield(), and Revision\userCanBitfield().

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

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

ChangesList::$message [protected]

Definition at line 43 of file ChangesList.php.

ChangesList::$skin

Definition at line 39 of file ChangesList.php.

ChangesList::$watchlist = false [protected]

Definition at line 41 of file ChangesList.php.


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