39 if ( $linenumber & 1 ) {
40 $classes[] =
'mw-line-odd';
42 $classes[] =
'mw-line-even';
48 if ( $this->watchlist ) {
50 $rc->mAttribs[
'rc_namespace'] .
'-' . $rc->mAttribs[
'rc_title'] );
53 if ( !
Hooks::run(
'OldChangesListRecentChangesLine', [ &$this, &
$html, $rc, &$classes ] ) ) {
60 return "$dateheader<li class=\"" . implode(
' ', $classes ) .
"\">" .
$html .
"</li>\n";
74 if ( $rc->mAttribs[
'rc_log_type'] ) {
76 $this->
insertLog(
$html, $logtitle, $rc->mAttribs[
'rc_log_type'] );
78 'bot' => $rc->mAttribs[
'rc_bot'] ],
'' );
83 } elseif ( $rc->mAttribs[
'rc_namespace'] ==
NS_SPECIAL ) {
85 if (
$name ==
'Log' ) {
91 # M, N, b and ! (minor, new, bot and unpatrolled)
94 'newpage' => $rc->mAttribs[
'rc_type'] ==
RC_NEW,
95 'minor' => $rc->mAttribs[
'rc_minor'],
96 'unpatrolled' => $unpatrolled,
97 'bot' => $rc->mAttribs[
'rc_bot']
105 # Bytes added or removed
106 if ( $this->
getConfig()->
get(
'RCShowChangedSize' ) ) {
109 $html .= $cd .
' <span class="mw-changeslist-separator">. .</span> ';
113 if ( $rc->mAttribs[
'rc_type'] ==
RC_LOG ) {
120 # LTR/RTL direction mark
132 # How many users watch this page
133 if ( $rc->numberofWatchingusers > 0 ) {
Utility class for creating new RC entries.
null means default in associative array with keys and values unescaped Should be merged with default with a value of false meaning to suppress the attribute in associative array with keys and values unescaped noclasses just before the function returns a value If you return an< a > element with HTML attributes $attribs and contents $html will be returned If you return $ret will be returned and may include noclasses & $html
deferred txt A few of the database updates required by various functions here can be deferred until after the result page is displayed to the user For updating the view updating the linked to tables after a etc PHP does not yet have any way to tell the server to actually return and disconnect while still running these but it might have such a feature in the future We handle these by creating a deferred update object and putting those objects on a global list
insertLog(&$s, $title, $logtype)
the array() calling protocol came about after MediaWiki 1.4rc1.
getLanguage()
Get the Language object.
insertExtra(&$s, &$rc, &$classes)
insertRollback(&$s, &$rc)
Inserts a rollback link.
recentChangesFlags($flags, $nothing= ' ')
Returns the appropriate flags for new page, minor change and patrolling.
static getTitleFor($name, $subpage=false, $fragment= '')
Get a localised Title object for a specified special page name If you don't need a full Title object...
numberofWatchingusers($count)
Returns the string which indicates the number of watching users.
it s the revision text itself In either if gzip is the revision text is gzipped $flags
formatCharacterDifference(RecentChange $old, RecentChange $new=null)
Format the character difference of one or several changes.
static escapeClass($class)
Given a value, escape it so that it can be used as a CSS class and return it.
insertDateHeader(&$s, $rc_timestamp)
insertUserRelatedLinks(&$s, &$rc)
Insert links to user page, user talk page and eventually a blocking link.
getConfig()
Get the Config object.
getArticleLink(&$rc, $unpatrolled, $watched)
showAsUnpatrolled(RecentChange $rc)
isCategorizationWithoutRevision($rcObj)
Determines whether a revision is linked to this change; this may not be the case when the categorizat...
static run($event, array $args=[], $deprecatedVersion=null)
Call hook functions defined in Hooks::register and $wgHooks.
insertTimestamp(&$s, $rc)
Insert time timestamp string from $rc into $s.
insertTags(&$s, &$rc, &$classes)
formatChangeLine(RecentChange $rc, array &$classes, $watched)
injection txt This is an overview of how MediaWiki makes use of dependency injection The design described here grew from the discussion of RFC T384 The term dependency this means that anything an object needs to operate should be injected from the the object itself should only know narrow no concrete implementation of the logic it relies on The requirement to inject everything typically results in an architecture that based on two main types of and essentially stateless service objects that use other service objects to operate on the value objects As of the beginning MediaWiki is only starting to use the DI approach Much of the code still relies on global state or direct resulting in a highly cyclical dependency which acts as the top level factory for services in MediaWiki which can be used to gain access to default instances of various services MediaWikiServices however also allows new services to be defined and default services to be redefined Services are defined or redefined by providing a callback the instantiator that will return a new instance of the service When it will create an instance of MediaWikiServices and populate it with the services defined in the files listed by thereby bootstrapping the DI framework Per $wgServiceWiringFiles lists includes ServiceWiring php
static resolveAlias($alias)
Given a special page name with a possible subpage, return an array where the first element is the spe...
insertLogEntry($rc)
Insert a formatted action.
insertComment($rc)
Insert a formatted comment.
getHTMLClasses($rc, $watched)
Get an array of default HTML class attributes for the change.
insertDiffHist(&$s, &$rc, $unpatrolled=null)
recentChangesLine(&$rc, $watched=false, $linenumber=null)
Format a line using the old system (aka without any javascript).
Allows to change the fields on the form that will be generated $name