|
MediaWiki
master
|


Public Member Functions | |
| __construct ($obj) | |
| Changeslist constructor. More... | |
| beginRecentChangesList () | |
| Returns text for the start of the tabular part of RC. More... | |
| endRecentChangesList () | |
| Returns text for the end of RC. More... | |
| formatCharacterDifference (RecentChange $old, RecentChange $new=null) | |
| Format the character difference of one or several changes. More... | |
| 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. More... | |
| initChangesListRows ($rows) | |
| insertArticleLink (&$s, RecentChange $rc, $unpatrolled, $watched) | |
| insertComment ($rc) | |
| Insert a formatted comment. More... | |
| insertDateHeader (&$s, $rc_timestamp) | |
| insertDiffHist (&$s, &$rc, $unpatrolled=null) | |
| insertExtra (&$s, &$rc, &$classes) | |
| insertLog (&$s, $title, $logtype) | |
| insertLogEntry ($rc) | |
| Insert a formatted action. More... | |
| insertRollback (&$s, &$rc) | |
| Inserts a rollback link. More... | |
| insertTags (&$s, &$rc, &$classes) | |
| insertTimestamp (&$s, $rc) | |
| Insert time timestamp string from $rc into $s. More... | |
| insertUserRelatedLinks (&$s, &$rc) | |
| Insert links to user page, user talk page and eventually a blocking link. More... | |
| isWatchlist () | |
| recentChangesFlags ($flags, $nothing= ' ') | |
| Returns the appropriate flags for new page, minor change and patrolling. More... | |
| recentChangesLine (&$rc, $watched=false, $linenumber=null) | |
| Format a line. More... | |
| setWatchlistDivs ($value=true) | |
| Sets the list to use a "<li class='watchlist-(namespace)-(page)'>" tag. More... | |
Public Member Functions inherited from ContextSource | |
| canUseWikiPage () | |
| Check whether a WikiPage object can be get with getWikiPage(). More... | |
| exportSession () | |
| Export the resolved user IP, HTTP headers, user ID, and session ID. More... | |
| getConfig () | |
| Get the Config object. More... | |
| getContext () | |
| Get the base IContextSource object. More... | |
| getLanguage () | |
| Get the Language object. More... | |
| getOutput () | |
| Get the OutputPage object. More... | |
| getRequest () | |
| Get the WebRequest object. More... | |
| getSkin () | |
| Get the Skin object. More... | |
| getStats () | |
| Get the Stats object. More... | |
| getTiming () | |
| Get the Timing object. More... | |
| getTitle () | |
| Get the Title object. More... | |
| getUser () | |
| Get the User object. More... | |
| getWikiPage () | |
| Get the WikiPage object. More... | |
| msg () | |
| Get a Message object with context set Parameters are the same as wfMessage() More... | |
| setContext (IContextSource $context) | |
| Set the IContextSource object. More... | |
Static Public Member Functions | |
| static | flag ($flag, IContextSource $context=null) |
| Make an "<abbr>" element for a given change flag. More... | |
| static | isDeleted ($rc, $field) |
| Determine if said field of a revision is hidden. More... | |
| 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. More... | |
| static | showCharacterDifference ($old, $new, IContextSource $context=null) |
| Show formatted char difference. More... | |
| 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. More... | |
Public Attributes | |
| Skin | $skin |
Protected Member Functions | |
| getHTMLClasses ($rc, $watched) | |
| Get an array of default HTML class attributes for the change. More... | |
| 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. More... | |
| maybeWatchedLink ($link, $watched=false) | |
| numberofWatchingusers ($count) | |
| Returns the string which indicates the number of watching users. More... | |
| showAsUnpatrolled (RecentChange $rc) | |
Protected Attributes | |
| $lastdate | |
| LinkRenderer | $linkRenderer |
| $message | |
| $rc_cache | |
| $rcCacheIndex | |
| $rclistOpen | |
| $rcMoveIndex | |
| $watchlist = false | |
| BagOStuff | $watchMsgCache |
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. More... | |
Definition at line 27 of file ChangesList.php.
| ChangesList::__construct | ( | $obj | ) |
Changeslist constructor.
| Skin | IContextSource | $obj |
Definition at line 54 of file ChangesList.php.
References ContextSource\getSkin(), preCacheMessages(), ContextSource\setContext(), and skin().
| ChangesList::beginRecentChangesList | ( | ) |
Returns text for the start of the tabular part of RC.
Definition at line 219 of file ChangesList.php.
References ContextSource\getOutput().
| ChangesList::endRecentChangesList | ( | ) |
Returns text for the end of RC.
Definition at line 320 of file ChangesList.php.
References $out.
|
static |
Make an "<abbr>" element for a given change flag.
The flag indicating a new page, minor edit, bot edit, or unpatrolled edit. In English it typically contains "N", "m", "b", or "!".
| string | $flag | One key of $wgRecentChangesFlags |
| IContextSource | $context |
Definition at line 186 of file ChangesList.php.
References ContextSource\$context, $value, $wgRecentChangesFlags, as, Html\element(), RequestContext\getMain(), global, ContextSource\setContext(), text, and wfMessage().
Referenced by SpecialUndelete\diffHeader(), DeletedContribsPager\formatRevisionRow(), SpecialUndelete\formatRevisionRow(), ContribsPager\formatRow(), HistoryPager\historyLine(), and DifferenceEngine\showDiffPage().
| ChangesList::formatCharacterDifference | ( | RecentChange | $old, |
| RecentChange | $new = null |
||
| ) |
Format the character difference of one or several changes.
| RecentChange | $old | |
| RecentChange | $new | Last change to use, if not provided, $old will be used |
Definition at line 300 of file ChangesList.php.
References ContextSource\getContext().
Referenced by OldChangesList\formatChangeLine(), EnhancedChangesList\getLineData(), EnhancedChangesList\recentChangesBlockGroup(), and EnhancedChangesList\recentChangesBlockLine().
| ChangesList::getArticleLink | ( | & | $rc, |
| $unpatrolled, | |||
| $watched | |||
| ) |
| RecentChange | $rc | |
| bool | $unpatrolled | |
| bool | $watched |
Definition at line 425 of file ChangesList.php.
References $params, $s, Revision\DELETED_TEXT, ContextSource\getLanguage(), isDeleted(), and Hooks\run().
Referenced by OldChangesList\formatChangeLine(), insertArticleLink(), EnhancedChangesList\recentChangesBlockGroup(), and EnhancedChangesList\recentChangesBlockLine().
|
protected |
Get an array of default HTML class attributes for the change.
| RecentChange | RCCacheEntry | $rc | |
| string | bool | $watched | Optionally timestamp for adding watched class |
Definition at line 158 of file ChangesList.php.
References Sanitizer\escapeClass().
Referenced by EnhancedChangesList\recentChangesBlockLine(), and OldChangesList\recentChangesLine().
| ChangesList::getRollback | ( | RecentChange | $rc | ) |
| RecentChange | $rc |
Definition at line 615 of file ChangesList.php.
References $s, and insertRollback().
Referenced by EnhancedChangesList\getLineData(), and EnhancedChangesList\recentChangesBlockLine().
| ChangesList::getTags | ( | RecentChange | $rc, |
| array & | $classes | ||
| ) |
| RecentChange | $rc | |
| array | $classes |
Definition at line 646 of file ChangesList.php.
References $s, and insertTags().
Referenced by EnhancedChangesList\getLineData(), and EnhancedChangesList\recentChangesBlockLine().
| ChangesList::getTimestamp | ( | $rc | ) |
Get the timestamp from $rc formatted with current user's settings and a separator.
| RecentChange | $rc |
Definition at line 460 of file ChangesList.php.
References ContextSource\getLanguage(), and message.
Referenced by insertTimestamp().
| ChangesList::initChangesListRows | ( | $rows | ) |
| ResultWrapper | array | $rows |
Definition at line 233 of file ChangesList.php.
References Hooks\run().
| ChangesList::insertArticleLink | ( | & | $s, |
| RecentChange | $rc, | ||
| $unpatrolled, | |||
| $watched | |||
| ) |
| string | $s | Article link will be appended to this string, in place. |
| RecentChange | $rc | |
| bool | $unpatrolled | |
| bool | $watched |
Definition at line 414 of file ChangesList.php.
References $s, and getArticleLink().
| ChangesList::insertComment | ( | $rc | ) |
Insert a formatted comment.
| RecentChange | $rc |
Definition at line 516 of file ChangesList.php.
References Linker\commentBlock(), Revision\DELETED_COMMENT, isDeleted(), and ContextSource\msg().
Referenced by OldChangesList\formatChangeLine(), EnhancedChangesList\getLineData(), and EnhancedChangesList\recentChangesBlockLine().
| ChangesList::insertDateHeader | ( | & | $s, |
| $rc_timestamp | |||
| ) |
| string | $s | HTML to update |
| mixed | $rc_timestamp |
Definition at line 331 of file ChangesList.php.
References $s, Xml\element(), ContextSource\getLanguage(), and ContextSource\getUser().
Referenced by OldChangesList\recentChangesLine().
| ChangesList::insertDiffHist | ( | & | $s, |
| & | $rc, | ||
$unpatrolled = null |
|||
| ) |
| string | $s | HTML to update |
| RecentChange | $rc | |
| bool | null | $unpatrolled | Unused variable, since 1.27. |
Definition at line 362 of file ChangesList.php.
References $query, $s, Revision\DELETED_TEXT, ContextSource\getUser(), message, ContextSource\msg(), RC_CATEGORIZE, RC_LOG, and RC_NEW.
Referenced by OldChangesList\formatChangeLine().
| ChangesList::insertExtra | ( | & | $s, |
| & | $rc, | ||
| & | $classes | ||
| ) |
Definition at line 652 of file ChangesList.php.
Referenced by OldChangesList\formatChangeLine().
| ChangesList::insertLog | ( | & | $s, |
| $title, | |||
| $logtype | |||
| ) |
| string | $s | HTML to update |
| Title | $title | |
| string | $logtype |
Definition at line 349 of file ChangesList.php.
References $page, $s, $title, ContextSource\getContext(), and ContextSource\msg().
Referenced by OldChangesList\formatChangeLine().
| ChangesList::insertLogEntry | ( | $rc | ) |
Insert a formatted action.
| RecentChange | $rc |
Definition at line 502 of file ChangesList.php.
References ContextSource\getContext(), and ContextSource\getLanguage().
Referenced by OldChangesList\formatChangeLine(), EnhancedChangesList\getLineData(), and EnhancedChangesList\recentChangesBlockLine().
| ChangesList::insertRollback | ( | & | $s, |
| & | $rc | ||
| ) |
Inserts a rollback link.
| string | $s | |
| RecentChange | $rc |
Definition at line 587 of file ChangesList.php.
References $page, $rev, $s, Linker\generateRollback(), ContextSource\getContext(), ContextSource\getUser(), and RC_EDIT.
Referenced by OldChangesList\formatChangeLine(), and getRollback().
| ChangesList::insertTags | ( | & | $s, |
| & | $rc, | ||
| & | $classes | ||
| ) |
| string | $s | |
| RecentChange | $rc | |
| array | $classes |
Definition at line 626 of file ChangesList.php.
References $s, ChangeTags\formatSummaryRow(), and list.
Referenced by OldChangesList\formatChangeLine(), and getTags().
| ChangesList::insertTimestamp | ( | & | $s, |
| $rc | |||
| ) |
Insert time timestamp string from $rc into $s.
| string | $s | HTML to update |
| RecentChange | $rc |
Definition at line 475 of file ChangesList.php.
References $s, and getTimestamp().
Referenced by OldChangesList\formatChangeLine().
| ChangesList::insertUserRelatedLinks | ( | & | $s, |
| & | $rc | ||
| ) |
Insert links to user page, user talk page and eventually a blocking link.
| string | &$s | HTML to update |
| RecentChange | &$rc |
Definition at line 485 of file ChangesList.php.
References $s, Revision\DELETED_USER, ContextSource\getLanguage(), isDeleted(), ContextSource\msg(), Linker\userLink(), and Linker\userToolLinks().
Referenced by OldChangesList\formatChangeLine().
|
protected |
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.
| RecentChange | RCCacheEntry | $rcObj |
Definition at line 700 of file ChangesList.php.
References RC_CATEGORIZE.
Referenced by OldChangesList\formatChangeLine(), EnhancedChangesList\getLineData(), and EnhancedChangesList\recentChangesBlockLine().
|
static |
Determine if said field of a revision is hidden.
| RCCacheEntry | RecentChange | $rc | |
| int | $field | One of DELETED_* bitfield constants |
Definition at line 549 of file ChangesList.php.
Referenced by getArticleLink(), EnhancedChangesList\getLineData(), RCCacheEntryFactory\getUserLink(), insertComment(), insertUserRelatedLinks(), RCCacheEntryFactory\newFromRecentChange(), and EnhancedChangesList\recentChangesBlockGroup().
|
static |
| object | RecentChange | $rc | Database row from recentchanges or a RecentChange object |
| User | $user |
Definition at line 665 of file ChangesList.php.
References RC_NEW, User\useFilePatrol(), User\useNPPatrol(), and User\useRCPatrol().
Referenced by ApiQueryWatchlist\extractOutputData(), ApiQueryRecentChanges\extractRowInfo(), and RCCacheEntryFactory\newFromRecentChange().
| ChangesList::isWatchlist | ( | ) |
Definition at line 114 of file ChangesList.php.
References $watchlist.
|
protected |
| string | $link | |
| bool | $watched |
Definition at line 574 of file ChangesList.php.
References $link.
Referenced by EnhancedChangesList\recentChangesBlockGroup().
|
static |
Fetch an appropriate changes list class for the specified context Some users might want to use an enhanced list format, for instance.
| IContextSource | $context |
Definition at line 74 of file ChangesList.php.
References $user, IContextSource\getRequest(), IContextSource\getSkin(), IContextSource\getUser(), and Hooks\run().
Referenced by SpecialRecentChanges\outputChangesList(), and SpecialWatchlist\outputChangesList().
|
protected |
Returns the string which indicates the number of watching users.
| int | $count | Number of user watching a page |
Definition at line 530 of file ChangesList.php.
References $cache, $count, $watchMsgCache, ContextSource\msg(), and use.
Referenced by OldChangesList\formatChangeLine(), EnhancedChangesList\recentChangesBlockGroup(), and EnhancedChangesList\recentChangesBlockLine().
|
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 122 of file ChangesList.php.
References as, message, and ContextSource\msg().
Referenced by __construct().
| ChangesList::recentChangesFlags | ( | $flags, | |
$nothing = ' ' |
|||
| ) |
Returns the appropriate flags for new page, minor change and patrolling.
| array | $flags | Associative array of 'flag' => Bool |
| string | $nothing | To use for empty space |
Definition at line 139 of file ChangesList.php.
References $flags, as, ContextSource\getConfig(), and ContextSource\getContext().
Referenced by OldChangesList\formatChangeLine(), EnhancedChangesList\getLineData(), EnhancedChangesList\recentChangesBlockGroup(), and EnhancedChangesList\recentChangesBlockLine().
| ChangesList::recentChangesLine | ( | & | $rc, |
$watched = false, |
|||
$linenumber = null |
|||
| ) |
Format a line.
| RecentChange | $rc | Passed by reference |
| bool | $watched | (default false) |
| int | $linenumber | (default null) |
Definition at line 98 of file ChangesList.php.
| ChangesList::setWatchlistDivs | ( | $value = true | ) |
Sets the list to use a "<li class='watchlist-(namespace)-(page)'>" tag.
| bool | $value |
Definition at line 106 of file ChangesList.php.
References $value.
|
protected |
Definition at line 656 of file ChangesList.php.
References ContextSource\getUser().
Referenced by OldChangesList\formatChangeLine().
|
static |
Show formatted char difference.
Needs the css module 'mediawiki.special.changeslist' to style output
| int | $old | Number of bytes |
| int | $new | Number of bytes |
| IContextSource | $context |
Definition at line 247 of file ChangesList.php.
References $code, ContextSource\$context, $lang, $tag, Html\element(), IContextSource\getConfig(), IContextSource\getLanguage(), RequestContext\getMain(), and IContextSource\msg().
Referenced by ContribsPager\formatRow(), RecentChange\getCharacterDifference(), and HistoryPager\historyLine().
|
static |
Determine if the current user is allowed to view a particular field of this revision, if it's marked as deleted.
| RCCacheEntry | RecentChange | $rc | |
| int | $field | |
| User | $user | User object to check, or null to use $wgUser |
Definition at line 561 of file ChangesList.php.
References $user, RC_LOG, LogEventsList\userCanBitfield(), and Revision\userCanBitfield().
Referenced by EnhancedChangesList\getLineData(), EnhancedChangesList\getLogText(), and RCCacheEntryFactory\showDiffLinks().
|
protected |
Definition at line 34 of file ChangesList.php.
|
protected |
Definition at line 47 of file ChangesList.php.
|
protected |
Definition at line 35 of file ChangesList.php.
|
protected |
Definition at line 36 of file ChangesList.php.
|
protected |
Definition at line 37 of file ChangesList.php.
|
protected |
Definition at line 38 of file ChangesList.php.
|
protected |
Definition at line 39 of file ChangesList.php.
| Skin ChangesList::$skin |
Definition at line 31 of file ChangesList.php.
|
protected |
Definition at line 33 of file ChangesList.php.
Referenced by isWatchlist().
|
protected |
Definition at line 42 of file ChangesList.php.
Referenced by numberofWatchingusers().