ChangesList Class Reference

Class to show various lists of changes: More...

Inherited by EnhancedChangesList, and OldChangesList.

List of all members.

Public Member Functions

 __construct ($skin)
 Changeslist contructor.
 setWatchlistDivs ($value=true)
 Sets the list to use a tag.
 beginRecentChangesList ()
 Returns text for the start of the tabular part of RC.
 endRecentChangesList ()
 Returns text for the end of RC.
 insertMove (&$s, $rc)
 insertDateHeader (&$s, $rc_timestamp)
 insertLog (&$s, $title, $logtype)
 insertDiffHist (&$s, &$rc, $unpatrolled)
 insertArticleLink (&$s, &$rc, $unpatrolled, $watched)
 insertTimestamp (&$s, $rc)
 insertUserRelatedLinks (&$s, &$rc)
 Insert links to user page, user talk page and eventually a blocking link.
 insertAction (&$s, &$rc)
 insert a formatted action
 insertComment (&$s, &$rc)
 insert a formatted comment
 insertRollback (&$s, &$rc)
 Inserts a rollback link.
 insertTags (&$s, &$rc, &$classes)
 insertExtra (&$s, &$rc, &$classes)

Static Public Member Functions

static newFromUser (&$user)
 Fetch an appropriate changes list class for the specified user Some users might want to use an enhanced list format, for instance.
static flag ($key)
 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 flagLegend ()
 A handy legend to tell users what the little "m", "b", and so on mean.
static showCharacterDifference ($old, $new)
 Show formatted char difference.
static usePatrol ()
 Check whether to enable recent changes patrol features.
static isDeleted ($rc, $field)
 Determine if said field of a revision is hidden.
static userCan ($rc, $field)
 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

 recentChangesFlags ($new, $minor, $patrolled, $nothing= '&nbsp;', $bot=false)
 Returns the appropriate flags for new page, minor change and patrolling.
 numberofWatchingusers ($count)
 Returns the string which indicates the number of watching users.
 maybeWatchedLink ($link, $watched=false)

Protected Attributes

 $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.

Static Private Member Functions

static flagLine ($key)
 Some explanatory wrapper text for the given flag, to be used in a legend explaining what the flags mean.


Detailed Description

Class to show various lists of changes:

Definition at line 25 of file ChangesList.php.


Constructor & Destructor Documentation

ChangesList::__construct ( skin  ) 

Changeslist contructor.

Parameters:
$skin Skin

Definition at line 34 of file ChangesList.php.

References $skin, and preCacheMessages().


Member Function Documentation

ChangesList::beginRecentChangesList (  ) 

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

Returns:
String

Reimplemented in EnhancedChangesList.

Definition at line 171 of file ChangesList.php.

ChangesList::endRecentChangesList (  ) 

Returns text for the end of RC.

Returns:
String

Reimplemented in EnhancedChangesList.

Definition at line 220 of file ChangesList.php.

static ChangesList::flag ( key  )  [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:
$key String: 'newpage', 'unpatrolled', 'minor', or 'bot'
Returns:
String: Raw HTML

Definition at line 105 of file ChangesList.php.

References $messages, $msg, and wfMsgExt().

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

static ChangesList::flagLegend (  )  [static]

A handy legend to tell users what the little "m", "b", and so on mean.

Returns:
String: Raw HTML

Definition at line 144 of file ChangesList.php.

References $wgGroupPermissions, $wgLang, flagLine(), and wfMsgExt().

Referenced by SpecialRecentChanges::doHeader(), and wfSpecialWatchlist().

static ChangesList::flagLine ( key  )  [static, private]

Some explanatory wrapper text for the given flag, to be used in a legend explaining what the flags mean.

For instance, "N - new page". See also flag().

Parameters:
$key String: 'newpage', 'unpatrolled', 'minor', or 'bot'
Returns:
String: Raw HTML

Definition at line 134 of file ChangesList.php.

References wfMsgExt().

Referenced by flagLegend().

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

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

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

ChangesList::insertDateHeader ( &$  s,
rc_timestamp 
)

Definition at line 260 of file ChangesList.php.

References $s, $wgLang, and Xml::element().

Referenced by OldChangesList::recentChangesLine().

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

Definition at line 285 of file ChangesList.php.

References $s, and Revision::DELETED_TEXT.

Referenced by OldChangesList::recentChangesLine().

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

Definition at line 494 of file ChangesList.php.

Referenced by OldChangesList::recentChangesLine().

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

Definition at line 274 of file ChangesList.php.

References $s, $title, and LogPage::logName().

Referenced by OldChangesList::recentChangesLine().

ChangesList::insertMove ( &$  s,
rc 
)

Definition at line 228 of file ChangesList.php.

References $msg, $s, and wfMsg().

Referenced by OldChangesList::recentChangesLine().

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

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

ChangesList::insertTimestamp ( &$  s,
rc 
)

Definition at line 366 of file ChangesList.php.

References $s, and $wgLang.

Referenced by OldChangesList::recentChangesLine().

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

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

Definition at line 373 of file ChangesList.php.

References $s, Revision::DELETED_USER, isDeleted(), and wfMsgHtml().

Referenced by OldChangesList::recentChangesLine().

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

Determine if said field of a revision is hidden.

Parameters:
$rc RCCacheEntry
$field Integer: one of DELETED_* bitfield constants
Returns:
Boolean

Definition at line 437 of file ChangesList.php.

Referenced by insertAction(), insertArticleLink(), insertComment(), insertUserRelatedLinks(), EnhancedChangesList::recentChangesBlockGroup(), EnhancedChangesList::recentChangesBlockLine(), and EnhancedChangesList::recentChangesLine().

ChangesList::maybeWatchedLink ( link,
watched = false 
) [protected]

Definition at line 456 of file ChangesList.php.

Referenced by EnhancedChangesList::recentChangesBlockGroup().

static ChangesList::newFromUser ( &$  user  )  [static]

Fetch an appropriate changes list class for the specified user Some users might want to use an enhanced list format, for instance.

Parameters:
$user User to fetch the list class for
Returns:
ChangesList derivative

Definition at line 46 of file ChangesList.php.

References wfRunHooks().

Referenced by SpecialRecentChanges::webOutput(), and wfSpecialWatchlist().

ChangesList::numberofWatchingusers ( count  )  [protected]

Returns the string which indicates the number of watching users.

Definition at line 417 of file ChangesList.php.

References $wgLang, and wfMsgExt().

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

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

References $msg, and wfMsgExt().

Referenced by __construct().

ChangesList::recentChangesFlags ( new,
minor,
patrolled,
nothing = '&nbsp;',
bot = false 
) [protected]

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

Parameters:
$new Boolean
$minor Boolean
$patrolled Boolean
$nothing String to use for empty space
$bot Boolean
Returns:
String

Definition at line 88 of file ChangesList.php.

References flag().

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

ChangesList::setWatchlistDivs ( value = true  ) 

Sets the list to use a tag.

Parameters:
$value Boolean

Definition at line 61 of file ChangesList.php.

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

Show formatted char difference.

Parameters:
$old Integer: bytes
$new Integer: bytes
Returns:
String

Definition at line 186 of file ChangesList.php.

References $code, $wgLang, $wgMiserMode, $wgRCChangedSizeThreshold, wfMsgExt(), and wfMsgNoTrans().

Referenced by RecentChange::getCharacterDifference().

static ChangesList::usePatrol (  )  [static]

Check whether to enable recent changes patrol features.

Returns:
Boolean

Definition at line 409 of file ChangesList.php.

References $wgUser.

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

Determine if the current user is allowed to view a particular field of this revision, if it's marked as deleted.

Parameters:
$rc RCCacheEntry
$field Integer
Returns:
Boolean

Definition at line 448 of file ChangesList.php.

References Revision::userCanBitfield(), and LogEventsList::userCanBitfield().

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


Member Data Documentation

ChangesList::$skin

Definition at line 27 of file ChangesList.php.

Referenced by __construct().

ChangesList::$watchlist = false [protected]

Definition at line 28 of file ChangesList.php.


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

Generated on Sat Apr 30 22:57:33 2011 for MediaWiki by  doxygen 1.5.9