MediaWiki master
|
Generate a list of changes using an Enhanced system (uses javascript). More...
Inherits ChangesList.
Public Member Functions | |
__construct ( $context, array $filterGroups=[]) | |
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, $query=null, $useParentheses=null) | |
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) | |
Get the HTML link to the changed page, possibly with a prefix from hook handlers, and a suffix for temporarily watched items. | |
getRollback (RecentChange $rc) | |
getTags (RecentChange $rc, array &$classes) | |
getTimestamp ( $rc) | |
Get the timestamp from $rc formatted with current user's settings and a separator. | |
getWatchlistExpiry (RecentChange $recentChange) | |
Get HTML to display the clock icon for watched items that have a watchlist expiry time. | |
initChangesListRows ( $rows) | |
insertComment ( $rc) | |
Insert a formatted comment. | |
insertDateHeader (&$s, $rc_timestamp) | |
insertDiffHist (&$s, &$rc, $unpatrolled=null) | |
insertExtra (&$s, &$rc, &$classes) | |
insertLog (&$s, $title, $logtype, $useParentheses=true) | |
insertLogEntry ( $rc) | |
Insert a formatted action. | |
insertRollback (&$s, &$rc) | |
Insert 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="\u{00A0}") | |
Returns the appropriate flags for new page, minor change and patrolling. | |
setChangeLinePrefixer (callable $prefixer) | |
Sets the callable that generates a change line prefix added to the beginning of each line. | |
setWatchlistDivs ( $value=true) | |
Sets the list to use a "<li class='watchlist-(namespace)-(page)'>" tag. | |
Public Member Functions inherited from MediaWiki\Context\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. | |
getActionName () | |
Get the action name for the current web request. | |
getAuthority () | |
getConfig () | |
getContext () | |
Get the base IContextSource object. | |
getCsrfTokenSet () | |
Get a repository to obtain and match CSRF tokens. | |
getLanguage () | |
getLanguageCode () | |
getOutput () | |
getRequest () | |
getSkin () | |
getTiming () | |
getTitle () | |
getUser () | |
getWikiPage () | |
Get the WikiPage object. | |
msg ( $key,... $params) | |
Get a Message object with context set Parameters are the same as wfMessage() | |
setContext (IContextSource $context) | |
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 | |
getDataAttributes (RecentChange $rc) | |
Get recommended data attributes for a change line. | |
getHighlightsContainerDiv () | |
Get the container for highlights that are used in the new StructuredFilters system. | |
getHTMLClasses ( $rc, $watched) | |
Get an array of default HTML class attributes for the change. | |
getHTMLClassesForFilters ( $rc) | |
Get an array of CSS classes attributed to filters for this row. | |
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 |
RCCacheEntry[][] | $rc_cache |
TemplateParser | $templateParser |
Protected Attributes inherited from ChangesList | |
callable | $changeLinePrefixer |
RowCommentFormatter | $commentFormatter |
ChangesListFilterGroup[] | $filterGroups |
string[] | $formattedComments |
Comments indexed by rc_id. | |
string | $lastdate |
LinkRenderer | $linkRenderer |
string[] | $message |
array | $rc_cache |
int | $rcCacheIndex |
bool | $rclistOpen |
int | $rcMoveIndex |
MapCacheLRU | $tagsCache |
MapCacheLRU | $userLinkCache |
bool | $watchlist = false |
MapCacheLRU | $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, array $groups=[]) |
Fetch an appropriate changes list class for the specified context Some users might want to use an enhanced list format, for instance. | |
static | revDateLink (RevisionRecord $rev, Authority $performer, Language $lang, $title=null, $className='') |
Render the date and time of a revision in the current user language based on whether the user is able to view this information or not. | |
static | showCharacterDifference ( $old, $new, ?IContextSource $context=null) |
Show formatted char difference. | |
static | userCan ( $rc, $field, ?Authority $performer=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 | |
const | CSS_CLASS_PREFIX = 'mw-changeslist-' |
Generate a list of changes using an Enhanced system (uses javascript).
Definition at line 35 of file EnhancedChangesList.php.
EnhancedChangesList::__construct | ( | $context, | |
array | $filterGroups = [] ) |
IContextSource | $context | |
ChangesListFilterGroup[] | $filterGroups | Array of ChangesListFilterGroup objects (currently optional) |
Reimplemented from ChangesList.
Definition at line 56 of file EnhancedChangesList.php.
References ChangesList\$filterGroups.
|
protected |
Put accumulated information into the cache, for later display.
Page moves go on their own line.
RCCacheEntry | $cacheEntry |
Definition at line 121 of file EnhancedChangesList.php.
References makeCacheGroupingKey().
Referenced by recentChangesLine().
EnhancedChangesList::beginRecentChangesList | ( | ) |
Add the JavaScript file for enhanced changeslist.
Reimplemented from ChangesList.
Definition at line 72 of file EnhancedChangesList.php.
References MediaWiki\Context\ContextSource\getOutput().
EnhancedChangesList::endRecentChangesList | ( | ) |
Returns text for the end of RC If enhanced RC is in use, returns pretty much all the text.
Reimplemented from ChangesList.
Definition at line 830 of file EnhancedChangesList.php.
References recentChangesBlock().
EnhancedChangesList::getDiffHistLinks | ( | RCCacheEntry | $rc, |
$query = null, | |||
$useParentheses = null ) |
Returns value to be used in 'historyLink' element of $data param in EnhancedChangesListModifyBlockLineData hook.
RCCacheEntry | $rc | |
bool | array | null | $query | deprecated |
bool | null | $useParentheses | (optional) Wrap comments in parentheses where needed |
Definition at line 759 of file EnhancedChangesList.php.
References RecentChange\getAttribute(), RecentChange\getTitle(), MediaWiki\Context\ContextSource\msg(), RC_CATEGORIZE, and wfDeprecated().
Referenced by getLineData(), and recentChangesBlockLine().
|
protected |
RCCacheEntry[] | $block | |
RCCacheEntry | $rcObj | |
array | $queryParams |
Definition at line 353 of file EnhancedChangesList.php.
References $params, $success, ChangesList\formatCharacterDifference(), MediaWiki\Context\ContextSource\getAuthority(), MediaWiki\Context\ContextSource\getConfig(), ChangesList\getDataAttributes(), getDiffHistLinks(), ChangesList\getHTMLClasses(), ChangesList\getRollback(), ChangesList\getTags(), RecentChange\getTitle(), ChangesList\insertComment(), ChangesList\insertLogEntry(), ChangesList\isCategorizationWithoutRevision(), MediaWiki\Context\ContextSource\msg(), RC_CATEGORIZE, RC_EDIT, RC_LOG, RC_NEW, ChangesList\recentChangesFlags(), and ChangesList\userCan().
Referenced by recentChangesBlockGroup().
|
protected |
Generates amount of changes (linking to diff ) & link to history.
RCCacheEntry[] | $block | |
array | $queryParams | |
bool | $allLogs | |
bool | $isnew | |
bool | $namehidden |
Definition at line 487 of file EnhancedChangesList.php.
References MediaWiki\Context\ContextSource\msg(), and RC_CATEGORIZE.
Referenced by recentChangesBlockGroup().
|
protected |
RCCacheEntry | $cacheEntry |
Definition at line 133 of file EnhancedChangesList.php.
References RecentChange\getTitle(), and RC_LOG.
Referenced by addCacheEntry().
|
protected |
If enhanced RC is in use, this function takes the previously cached RC lines, arranges them, and outputs the HTML.
Definition at line 804 of file EnhancedChangesList.php.
References recentChangesBlockGroup(), and recentChangesBlockLine().
Referenced by endRecentChangesList(), and recentChangesLine().
|
protected |
Enhanced RC group.
RCCacheEntry[] | $block |
Definition at line 155 of file EnhancedChangesList.php.
References $lines, ChangesList\formatCharacterDifference(), ChangesList\getArticleLink(), MediaWiki\Context\ContextSource\getConfig(), ChangesList\getHTMLClassesForFilters(), getLineData(), getLogText(), ChangesList\getTags(), ChangesList\maybeWatchedLink(), MediaWiki\Context\ContextSource\msg(), ChangesList\numberofWatchingusers(), RC_LOG, and ChangesList\recentChangesFlags().
Referenced by recentChangesBlock().
|
protected |
Enhanced RC ungrouped line.
RecentChange | RCCacheEntry | $rcObj |
Definition at line 614 of file EnhancedChangesList.php.
References $success, ChangesList\formatCharacterDifference(), ChangesList\getArticleLink(), MediaWiki\Context\ContextSource\getConfig(), ChangesList\getDataAttributes(), getDiffHistLinks(), ChangesList\getHighlightsContainerDiv(), ChangesList\getHTMLClasses(), ChangesList\getRollback(), ChangesList\getTags(), ChangesList\insertComment(), ChangesList\insertLogEntry(), ChangesList\isCategorizationWithoutRevision(), ChangesList\numberofWatchingusers(), RC_CATEGORIZE, RC_LOG, RC_NEW, and ChangesList\recentChangesFlags().
Referenced by recentChangesBlock().
EnhancedChangesList::recentChangesLine | ( | & | $rc, |
$watched = false, | |||
$linenumber = null ) |
Format a line for enhanced recentchange (aka with javascript and block of lines).
RecentChange | &$rc | |
bool | $watched | |
int | null | $linenumber | (default null) |
Reimplemented from ChangesList.
Definition at line 90 of file EnhancedChangesList.php.
References addCacheEntry(), MediaWiki\Context\ContextSource\getLanguage(), and recentChangesBlock().
|
protected |
Definition at line 40 of file EnhancedChangesList.php.
|
protected |
Definition at line 45 of file EnhancedChangesList.php.
|
protected |
Definition at line 50 of file EnhancedChangesList.php.