MediaWiki REL1_28
EnhancedChangesList Class Reference
Inheritance diagram for EnhancedChangesList:
Collaboration diagram for EnhancedChangesList:

Public Member Functions

 __construct ( $obj)
 
 beginRecentChangesList ()
 Add the JavaScript file for enhanced changeslist.
 
 endRecentChangesList ()
 Returns text for the end of RC If enhanced RC is in use, returns pretty much all the text.
 
 getDiffHistLinks (RCCacheEntry $rc, array $query)
 Returns value to be used in 'historyLink' element of $data param in EnhancedChangesListModifyBlockLineData hook.
 
 recentChangesLine (&$rc, $watched=false, $linenumber=null)
 Format a line for enhanced recentchange (aka with javascript and block of lines).
 
- Public Member Functions inherited from ChangesList
 formatCharacterDifference (RecentChange $old, RecentChange $new=null)
 Format the character difference of one or several changes.
 
 getArticleLink (&$rc, $unpatrolled, $watched)
 
 getRollback (RecentChange $rc)
 
 getTags (RecentChange $rc, array &$classes)
 
 getTimestamp ( $rc)
 Get the timestamp from $rc formatted with current user's settings and a separator.
 
 initChangesListRows ( $rows)
 
 insertArticleLink (&$s, RecentChange $rc, $unpatrolled, $watched)
 
 insertComment ( $rc)
 Insert a formatted comment.
 
 insertDateHeader (&$s, $rc_timestamp)
 
 insertDiffHist (&$s, &$rc, $unpatrolled=null)
 
 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.
 
 isWatchlist ()
 
 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.
 
- Public Member Functions inherited from ContextSource
 canUseWikiPage ()
 Check whether a WikiPage object can be get with getWikiPage().
 
 exportSession ()
 Export the resolved user IP, HTTP headers, user ID, and session ID.
 
 getConfig ()
 Get the Config object.
 
 getContext ()
 Get the base IContextSource object.
 
 getLanguage ()
 Get the Language object.
 
 getOutput ()
 Get the OutputPage object.
 
 getRequest ()
 Get the WebRequest object.
 
 getSkin ()
 Get the Skin object.
 
 getStats ()
 Get the Stats object.
 
 getTiming ()
 Get the Timing object.
 
 getTitle ()
 Get the Title object.
 
 getUser ()
 Get the User object.
 
 getWikiPage ()
 Get the WikiPage object.
 
 msg ()
 Get a Message object with context set Parameters are the same as wfMessage()
 
 setContext (IContextSource $context)
 Set the IContextSource object.
 

Protected Member Functions

 addCacheEntry (RCCacheEntry $cacheEntry)
 Put accumulated information into the cache, for later display.
 
 getLineData (array $block, RCCacheEntry $rcObj, array $queryParams=[])
 
 getLogText ( $block, $queryParams, $allLogs, $isnew, $namehidden)
 Generates amount of changes (linking to diff ) & link to history.
 
 makeCacheGroupingKey (RCCacheEntry $cacheEntry)
 
 recentChangesBlock ()
 If enhanced RC is in use, this function takes the previously cached RC lines, arranges them, and outputs the HTML.
 
 recentChangesBlockGroup ( $block)
 Enhanced RC group.
 
 recentChangesBlockLine ( $rcObj)
 Enhanced RC ungrouped line.
 
- Protected Member Functions inherited from ChangesList
 getHTMLClasses ( $rc, $watched)
 Get an array of default HTML class attributes for the change.
 
 isCategorizationWithoutRevision ( $rcObj)
 Determines whether a revision is linked to this change; this may not be the case when the categorization wasn't done by an edit but a conditional parser function.
 
 maybeWatchedLink ( $link, $watched=false)
 
 numberofWatchingusers ( $count)
 Returns the string which indicates the number of watching users.
 
 showAsUnpatrolled (RecentChange $rc)
 

Protected Attributes

RCCacheEntryFactory $cacheEntryFactory
 
array $rc_cache
 Array of array of RCCacheEntry.
 
- Protected Attributes inherited from ChangesList
 $lastdate
 
LinkRenderer $linkRenderer
 
 $message
 
 $rc_cache
 
 $rcCacheIndex
 
 $rclistOpen
 
 $rcMoveIndex
 
 $watchlist = false
 
BagOStuff $watchMsgCache
 

Additional Inherited Members

- Static Public Member Functions inherited from ChangesList
static flag ( $flag, IContextSource $context=null)
 Make an "<abbr>" element for a given change flag.
 
static isDeleted ( $rc, $field)
 Determine if said field of a revision is hidden.
 
static isUnpatrolled ( $rc, User $user)
 
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 showCharacterDifference ( $old, $new, IContextSource $context=null)
 Show formatted char difference.
 
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 inherited from ChangesList
Skin $skin
 

Detailed Description

Definition at line 23 of file EnhancedChangesList.php.

Constructor & Destructor Documentation

◆ __construct()

EnhancedChangesList::__construct (   $obj)
Parameters
IContextSource | Skin$obj
Exceptions
MWException

Reimplemented from ChangesList.

Definition at line 39 of file EnhancedChangesList.php.

References ContextSource\$context, and message.

Member Function Documentation

◆ addCacheEntry()

EnhancedChangesList::addCacheEntry ( RCCacheEntry  $cacheEntry)
protected

Put accumulated information into the cache, for later display.

Page moves go on their own line.

Parameters
RCCacheEntry$cacheEntry

Definition at line 123 of file EnhancedChangesList.php.

References makeCacheGroupingKey().

Referenced by recentChangesLine().

◆ beginRecentChangesList()

EnhancedChangesList::beginRecentChangesList ( )

Add the JavaScript file for enhanced changeslist.

Returns
string

Reimplemented from ChangesList.

Definition at line 66 of file EnhancedChangesList.php.

References ContextSource\getOutput().

◆ endRecentChangesList()

EnhancedChangesList::endRecentChangesList ( )

Returns text for the end of RC If enhanced RC is in use, returns pretty much all the text.

Returns
string

Reimplemented from ChangesList.

Definition at line 754 of file EnhancedChangesList.php.

References recentChangesBlock().

◆ getDiffHistLinks()

EnhancedChangesList::getDiffHistLinks ( RCCacheEntry  $rc,
array  $query 
)

Returns value to be used in 'historyLink' element of $data param in EnhancedChangesListModifyBlockLineData hook.

Since
1.27
Parameters
RCCacheEntry$rc
array$queryarray of key/value pairs to append as a query string
Returns
string HTML

Definition at line 708 of file EnhancedChangesList.php.

References $query, RecentChange\getAttribute(), RecentChange\getTitle(), message, ContextSource\msg(), and RC_CATEGORIZE.

Referenced by recentChangesBlockLine().

◆ getLineData()

◆ getLogText()

EnhancedChangesList::getLogText (   $block,
  $queryParams,
  $allLogs,
  $isnew,
  $namehidden 
)
protected

Generates amount of changes (linking to diff ) & link to history.

Parameters
array$block
array$queryParams
bool$allLogs
bool$isnew
bool$namehidden
Returns
string

Definition at line 482 of file EnhancedChangesList.php.

References $last, $params, as, Revision\DELETED_TEXT, ContextSource\getUser(), message, ContextSource\msg(), RC_CATEGORIZE, and ChangesList\userCan().

Referenced by recentChangesBlockGroup().

◆ makeCacheGroupingKey()

EnhancedChangesList::makeCacheGroupingKey ( RCCacheEntry  $cacheEntry)
protected
Todo:
use rc_source to group, if set; fallback to rc_type
Parameters
RCCacheEntry$cacheEntry
Returns
string

Definition at line 140 of file EnhancedChangesList.php.

References $title, $type, RecentChange\getTitle(), SpecialPage\getTitleFor(), and RC_LOG.

Referenced by addCacheEntry().

◆ recentChangesBlock()

EnhancedChangesList::recentChangesBlock ( )
protected

If enhanced RC is in use, this function takes the previously cached RC lines, arranges them, and outputs the HTML.

Returns
string

Definition at line 732 of file EnhancedChangesList.php.

References as, recentChangesBlockGroup(), and recentChangesBlockLine().

Referenced by endRecentChangesList(), and recentChangesLine().

◆ recentChangesBlockGroup()

◆ recentChangesBlockLine()

◆ recentChangesLine()

EnhancedChangesList::recentChangesLine ( $rc,
  $watched = false,
  $linenumber = null 
)

Format a line for enhanced recentchange (aka with javascript and block of lines).

Parameters
RecentChange$rc
bool$watched
int$linenumber(default null)
Returns
string

Reimplemented from ChangesList.

Definition at line 93 of file EnhancedChangesList.php.

References $ret, addCacheEntry(), Xml\element(), ContextSource\getLanguage(), and recentChangesBlock().

Member Data Documentation

◆ $cacheEntryFactory

RCCacheEntryFactory EnhancedChangesList::$cacheEntryFactory
protected

Definition at line 28 of file EnhancedChangesList.php.

◆ $rc_cache

array EnhancedChangesList::$rc_cache
protected

Array of array of RCCacheEntry.

Definition at line 33 of file EnhancedChangesList.php.


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