3 * Generates a list of changes using an Enhanced system (uses javascript).
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License along
16 * with this program; if not, write to the Free Software Foundation, Inc.,
17 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18 * http://www.gnu.org/copyleft/gpl.html
23 class EnhancedChangesList
extends ChangesList
{
26 * @var RCCacheEntryFactory
28 protected $cacheEntryFactory;
31 * @var array Array of array of RCCacheEntry
38 protected $templateParser;
41 * @param IContextSource|Skin $obj
42 * @param array $filterGroups Array of ChangesListFilterGroup objects (currently optional)
45 public function __construct( $obj, array $filterGroups = [] ) {
46 if ( $obj instanceof Skin
) {
47 // @todo: deprecate constructing with Skin
48 $context = $obj->getContext();
50 if ( !$obj instanceof IContextSource
) {
51 throw new MWException( 'EnhancedChangesList must be constructed with a '
52 . 'context source or skin.' );
58 parent
::__construct( $context, $filterGroups );
60 // message is set by the parent ChangesList class
61 $this->cacheEntryFactory
= new RCCacheEntryFactory(
66 $this->templateParser
= new TemplateParser();
70 * Add the JavaScript file for enhanced changeslist
73 public function beginRecentChangesList() {
75 $this->rcMoveIndex
= 0;
76 $this->rcCacheIndex
= 0;
78 $this->rclistOpen
= false;
79 $this->getOutput()->addModuleStyles( [
80 'mediawiki.special.changeslist',
81 'mediawiki.special.changeslist.enhanced',
83 $this->getOutput()->addModules( [
84 'jquery.makeCollapsible',
88 return '<div class="mw-changeslist">';
92 * Format a line for enhanced recentchange (aka with javascript and block of lines).
94 * @param RecentChange &$rc
95 * @param bool $watched
96 * @param int $linenumber (default null)
100 public function recentChangesLine( &$rc, $watched = false, $linenumber = null ) {
101 $date = $this->getLanguage()->userDate(
102 $rc->mAttribs
['rc_timestamp'],
105 if ( $this->lastdate
=== '' ) {
106 $this->lastdate
= $date;
111 # If it's a new day, flush the cache and update $this->lastdate
112 if ( $date !== $this->lastdate
) {
113 # Process current cache (uses $this->lastdate to generate a heading)
114 $ret = $this->recentChangesBlock();
115 $this->rc_cache
= [];
116 $this->lastdate
= $date;
119 $cacheEntry = $this->cacheEntryFactory
->newFromRecentChange( $rc, $watched );
120 $this->addCacheEntry( $cacheEntry );
126 * Put accumulated information into the cache, for later display.
127 * Page moves go on their own line.
129 * @param RCCacheEntry $cacheEntry
131 protected function addCacheEntry( RCCacheEntry
$cacheEntry ) {
132 $cacheGroupingKey = $this->makeCacheGroupingKey( $cacheEntry );
134 if ( !isset( $this->rc_cache
[$cacheGroupingKey] ) ) {
135 $this->rc_cache
[$cacheGroupingKey] = [];
138 array_push( $this->rc_cache
[$cacheGroupingKey], $cacheEntry );
142 * @todo use rc_source to group, if set; fallback to rc_type
144 * @param RCCacheEntry $cacheEntry
148 protected function makeCacheGroupingKey( RCCacheEntry
$cacheEntry ) {
149 $title = $cacheEntry->getTitle();
150 $cacheGroupingKey = $title->getPrefixedDBkey();
152 $type = $cacheEntry->mAttribs
['rc_type'];
154 if ( $type == RC_LOG
) {
156 $cacheGroupingKey = SpecialPage
::getTitleFor(
158 $cacheEntry->mAttribs
['rc_log_type']
159 )->getPrefixedDBkey();
162 return $cacheGroupingKey;
167 * @param RCCacheEntry[] $block
169 * @throws DomainException
171 protected function recentChangesBlockGroup( $block ) {
172 $recentChangesFlags = $this->getConfig()->get( 'RecentChangesFlags' );
174 # Add the namespace and title of the block as part of the class
175 $tableClasses = [ 'mw-collapsible', 'mw-collapsed', 'mw-enhanced-rc', 'mw-changeslist-line' ];
176 if ( $block[0]->mAttribs
['rc_log_type'] ) {
178 $tableClasses[] = 'mw-changeslist-log';
179 $tableClasses[] = Sanitizer
::escapeClass( 'mw-changeslist-log-'
180 . $block[0]->mAttribs
['rc_log_type'] );
182 $tableClasses[] = 'mw-changeslist-edit';
183 $tableClasses[] = Sanitizer
::escapeClass( 'mw-changeslist-ns'
184 . $block[0]->mAttribs
['rc_namespace'] . '-' . $block[0]->mAttribs
['rc_title'] );
186 if ( $block[0]->watched
187 && $block[0]->mAttribs
['rc_timestamp'] >= $block[0]->watched
189 $tableClasses[] = 'mw-changeslist-line-watched';
191 $tableClasses[] = 'mw-changeslist-line-not-watched';
194 # Collate list of users
198 # Some catalyst variables...
201 $RCShowChangedSize = $this->getConfig()->get( 'RCShowChangedSize' );
203 # Default values for RC flags
204 $collectedRcFlags = [];
205 foreach ( $recentChangesFlags as $key => $value ) {
206 $flagGrouping = ( $recentChangesFlags[$key]['grouping'] ??
'any' );
207 switch ( $flagGrouping ) {
209 $collectedRcFlags[$key] = true;
212 $collectedRcFlags[$key] = false;
215 throw new DomainException( "Unknown grouping type \"{$flagGrouping}\"" );
218 foreach ( $block as $rcObj ) {
219 // If all log actions to this page were hidden, then don't
220 // give the name of the affected page for this block!
221 if ( !$this->isDeleted( $rcObj, LogPage
::DELETED_ACTION
) ) {
224 $u = $rcObj->userlink
;
225 if ( !isset( $userlinks[$u] ) ) {
228 if ( $rcObj->mAttribs
['rc_type'] != RC_LOG
) {
231 # Get the latest entry with a page_id and oldid
232 # since logs may not have these.
233 if ( !$curId && $rcObj->mAttribs
['rc_cur_id'] ) {
234 $curId = $rcObj->mAttribs
['rc_cur_id'];
240 # Sort the list and convert to text
241 krsort( $userlinks );
244 foreach ( $userlinks as $userlink => $count ) {
246 $text .= $this->getLanguage()->getDirMark();
248 $formattedCount = $this->msg( 'ntimes' )->numParams( $count )->escaped();
249 $text .= ' ' . $this->msg( 'parentheses' )->rawParams( $formattedCount )->escaped();
251 array_push( $users, $text );
256 $revDeletedMsg = false;
258 $revDeletedMsg = $this->msg( 'rev-deleted-event' )->escaped();
259 } elseif ( $allLogs ) {
260 $articleLink = $this->maybeWatchedLink( $block[0]->link
, $block[0]->watched
);
262 $articleLink = $this->getArticleLink( $block[0], $block[0]->unpatrolled
, $block[0]->watched
);
265 $queryParams['curid'] = $curId;
269 foreach ( $block as $i => $rcObj ) {
270 $line = $this->getLineData( $block, $rcObj, $queryParams );
272 // completely ignore this RC entry if we don't want to render it
278 foreach ( $line['recentChangesFlagsRaw'] as $key => $value ) {
279 $flagGrouping = ( $recentChangesFlags[$key]['grouping'] ??
'any' );
280 switch ( $flagGrouping ) {
283 $collectedRcFlags[$key] = false;
288 $collectedRcFlags[$key] = true;
292 throw new DomainException( "Unknown grouping type \"{$flagGrouping}\"" );
299 // Further down are some assumptions that $block is a 0-indexed array
300 // with (count-1) as last key. Let's make sure it is.
301 $block = array_values( $block );
303 if ( empty( $block ) ||
!$lines ) {
304 // if we can't show anything, don't display this block altogether
308 $logText = $this->getLogText( $block, $queryParams, $allLogs,
309 $collectedRcFlags['newpage'], $namehidden
312 # Character difference (does not apply if only log items)
313 $charDifference = false;
314 if ( $RCShowChangedSize && !$allLogs ) {
316 $first = count( $block ) - 1;
317 # Some events (like logs and category changes) have an "empty" size, so we need to skip those...
318 while ( $last < $first && $block[$last]->mAttribs
['rc_new_len'] === null ) {
321 while ( $last < $first && $block[$first]->mAttribs
['rc_old_len'] === null ) {
325 $charDifference = $this->formatCharacterDifference( $block[$first], $block[$last] ) ?
: false;
328 $numberofWatchingusers = $this->numberofWatchingusers( $block[0]->numberofWatchingusers
);
329 $usersList = $this->msg( 'brackets' )->rawParams(
330 implode( $this->message
['semicolon-separator'], $users )
334 if ( is_callable( $this->changeLinePrefixer
) ) {
335 $prefix = call_user_func( $this->changeLinePrefixer
, $block[0], $this, true );
339 'articleLink' => $articleLink,
340 'charDifference' => $charDifference,
341 'collectedRcFlags' => $this->recentChangesFlags( $collectedRcFlags ),
342 'languageDirMark' => $this->getLanguage()->getDirMark(),
344 'logText' => $logText,
345 'numberofWatchingusers' => $numberofWatchingusers,
347 'rev-deleted-event' => $revDeletedMsg,
348 'tableClasses' => $tableClasses,
349 'timestamp' => $block[0]->timestamp
,
350 'fullTimestamp' => $block[0]->getAttribute( 'rc_timestamp' ),
351 'users' => $usersList,
354 $this->rcCacheIndex++
;
356 return $this->templateParser
->processTemplate(
357 'EnhancedChangesListGroup',
363 * @param RCCacheEntry[] $block
364 * @param RCCacheEntry $rcObj
365 * @param array $queryParams
369 * @throws MWException
371 protected function getLineData( array $block, RCCacheEntry
$rcObj, array $queryParams = [] ) {
372 $RCShowChangedSize = $this->getConfig()->get( 'RCShowChangedSize' );
374 $type = $rcObj->mAttribs
['rc_type'];
376 $lineParams = [ 'targetTitle' => $rcObj->getTitle() ];
378 $classes = [ 'mw-enhanced-rc' ];
380 && $rcObj->mAttribs
['rc_timestamp'] >= $rcObj->watched
382 $classes[] = 'mw-enhanced-watched';
384 $classes = array_merge( $classes, $this->getHTMLClasses( $rcObj, $rcObj->watched
) );
386 $separator = ' <span class="mw-changeslist-separator">. .</span> ';
388 $data['recentChangesFlags'] = [
389 'newpage' => $type == RC_NEW
,
390 'minor' => $rcObj->mAttribs
['rc_minor'],
391 'unpatrolled' => $rcObj->unpatrolled
,
392 'bot' => $rcObj->mAttribs
['rc_bot'],
395 $params = $queryParams;
397 if ( $rcObj->mAttribs
['rc_this_oldid'] != 0 ) {
398 $params['oldid'] = $rcObj->mAttribs
['rc_this_oldid'];
402 if ( $type == RC_LOG
) {
403 $link = $rcObj->timestamp
;
405 } elseif ( !ChangesList
::userCan( $rcObj, Revision
::DELETED_TEXT
, $this->getUser() ) ) {
406 $link = '<span class="history-deleted">' . $rcObj->timestamp
. '</span> ';
408 $link = $this->linkRenderer
->makeKnownLink(
410 new HtmlArmor( $rcObj->timestamp
),
414 if ( $this->isDeleted( $rcObj, Revision
::DELETED_TEXT
) ) {
415 $link = '<span class="history-deleted">' . $link . '</span> ';
418 $data['timestampLink'] = $link;
420 $currentAndLastLinks = '';
421 if ( !$type == RC_LOG ||
$type == RC_NEW
) {
422 $currentAndLastLinks .= ' ' . $this->msg( 'parentheses' )->rawParams(
424 $this->message
['pipe-separator'] .
428 $data['currentAndLastLinks'] = $currentAndLastLinks;
429 $data['separatorAfterCurrentAndLastLinks'] = $separator;
432 if ( $RCShowChangedSize ) {
433 $cd = $this->formatCharacterDifference( $rcObj );
435 $data['characterDiff'] = $cd;
436 $data['separatorAfterCharacterDiff'] = $separator;
440 if ( $rcObj->mAttribs
['rc_type'] == RC_LOG
) {
441 $data['logEntry'] = $this->insertLogEntry( $rcObj );
442 } elseif ( $this->isCategorizationWithoutRevision( $rcObj ) ) {
443 $data['comment'] = $this->insertComment( $rcObj );
446 $data['userLink'] = $rcObj->userlink
;
447 $data['userTalkLink'] = $rcObj->usertalklink
;
448 $data['comment'] = $this->insertComment( $rcObj );
452 $data['rollback'] = $this->getRollback( $rcObj );
455 $data['tags'] = $this->getTags( $rcObj, $classes );
457 $attribs = $this->getDataAttributes( $rcObj );
459 // give the hook a chance to modify the data
460 $success = Hooks
::run( 'EnhancedChangesListModifyLineData',
461 [ $this, &$data, $block, $rcObj, &$classes, &$attribs ] );
463 // skip entry if hook aborted it
466 $attribs = wfArrayFilterByKey( $attribs, [ Sanitizer
::class, 'isReservedDataAttribute' ] );
468 $lineParams['recentChangesFlagsRaw'] = [];
469 if ( isset( $data['recentChangesFlags'] ) ) {
470 $lineParams['recentChangesFlags'] = $this->recentChangesFlags( $data['recentChangesFlags'] );
471 # FIXME: This is used by logic, don't return it in the template params.
472 $lineParams['recentChangesFlagsRaw'] = $data['recentChangesFlags'];
473 unset( $data['recentChangesFlags'] );
476 if ( isset( $data['timestampLink'] ) ) {
477 $lineParams['timestampLink'] = $data['timestampLink'];
478 unset( $data['timestampLink'] );
481 $lineParams['classes'] = array_values( $classes );
482 $lineParams['attribs'] = Html
::expandAttributes( $attribs );
484 // everything else: makes it easier for extensions to add or remove data
485 $lineParams['data'] = array_values( $data );
491 * Generates amount of changes (linking to diff ) & link to history.
493 * @param array $block
494 * @param array $queryParams
495 * @param bool $allLogs
497 * @param bool $namehidden
500 protected function getLogText( $block, $queryParams, $allLogs, $isnew, $namehidden ) {
501 if ( empty( $block ) ) {
506 static $nchanges = [];
507 static $sinceLastVisitMsg = [];
509 $n = count( $block );
510 if ( !isset( $nchanges[$n] ) ) {
511 $nchanges[$n] = $this->msg( 'nchanges' )->numParams( $n )->escaped();
515 $unvisitedOldid = null;
516 /** @var RCCacheEntry $rcObj */
517 foreach ( $block as $rcObj ) {
518 // Same logic as below inside main foreach
519 if ( $rcObj->watched
&& $rcObj->mAttribs
['rc_timestamp'] >= $rcObj->watched
) {
521 $unvisitedOldid = $rcObj->mAttribs
['rc_last_oldid'];
524 if ( !isset( $sinceLastVisitMsg[$sinceLast] ) ) {
525 $sinceLastVisitMsg[$sinceLast] =
526 $this->msg( 'enhancedrc-since-last-visit' )->numParams( $sinceLast )->escaped();
529 $currentRevision = 0;
530 foreach ( $block as $rcObj ) {
531 if ( !$currentRevision ) {
532 $currentRevision = $rcObj->mAttribs
['rc_this_oldid'];
538 /** @var RecentChange $block0 */
540 $last = $block[count( $block ) - 1];
542 if ( !ChangesList
::userCan( $rcObj, Revision
::DELETED_TEXT
, $this->getUser() ) ||
544 $rcObj->mAttribs
['rc_type'] == RC_CATEGORIZE
546 $links['total-changes'] = $nchanges[$n];
548 $links['total-changes'] = $this->linkRenderer
->makeKnownLink(
550 new HtmlArmor( $nchanges[$n] ),
551 [ 'class' => 'mw-changeslist-groupdiff' ],
553 'diff' => $currentRevision,
554 'oldid' => $last->mAttribs
['rc_last_oldid'],
557 if ( $sinceLast > 0 && $sinceLast < $n ) {
558 $links['total-changes-since-last'] = $this->linkRenderer
->makeKnownLink(
560 new HtmlArmor( $sinceLastVisitMsg[$sinceLast] ),
561 [ 'class' => 'mw-changeslist-groupdiff' ],
563 'diff' => $currentRevision,
564 'oldid' => $unvisitedOldid,
572 if ( $allLogs ||
$rcObj->mAttribs
['rc_type'] == RC_CATEGORIZE
) {
573 // don't show history link for logs
574 } elseif ( $namehidden ||
!$block0->getTitle()->exists() ) {
575 $links['history'] = $this->message
['enhancedrc-history'];
577 $params = $queryParams;
578 $params['action'] = 'history';
580 $links['history'] = $this->linkRenderer
->makeKnownLink(
582 new HtmlArmor( $this->message
['enhancedrc-history'] ),
583 [ 'class' => 'mw-changeslist-history' ],
588 # Allow others to alter, remove or add to these links
589 Hooks
::run( 'EnhancedChangesList::getLogText',
590 [ $this, &$links, $block ] );
596 $logtext = implode( $this->message
['pipe-separator'], $links );
597 $logtext = $this->msg( 'parentheses' )->rawParams( $logtext )->escaped();
598 return ' ' . $logtext;
602 * Enhanced RC ungrouped line.
604 * @param RecentChange|RCCacheEntry $rcObj
605 * @return string A HTML formatted line (generated using $r)
607 protected function recentChangesBlockLine( $rcObj ) {
610 $query['curid'] = $rcObj->mAttribs
['rc_cur_id'];
612 $type = $rcObj->mAttribs
['rc_type'];
613 $logType = $rcObj->mAttribs
['rc_log_type'];
614 $classes = $this->getHTMLClasses( $rcObj, $rcObj->watched
);
615 $classes[] = 'mw-enhanced-rc';
619 $classes[] = 'mw-changeslist-log';
620 $classes[] = Sanitizer
::escapeClass( 'mw-changeslist-log-' . $logType );
622 $classes[] = 'mw-changeslist-edit';
623 $classes[] = Sanitizer
::escapeClass( 'mw-changeslist-ns' .
624 $rcObj->mAttribs
['rc_namespace'] . '-' . $rcObj->mAttribs
['rc_title'] );
628 $data['recentChangesFlags'] = [
629 'newpage' => $type == RC_NEW
,
630 'minor' => $rcObj->mAttribs
['rc_minor'],
631 'unpatrolled' => $rcObj->unpatrolled
,
632 'bot' => $rcObj->mAttribs
['rc_bot'],
634 // timestamp is not really a link here, but is called timestampLink
635 // for consistency with EnhancedChangesListModifyLineData
636 $data['timestampLink'] = $rcObj->timestamp
;
638 # Article or log link
640 $logPage = new LogPage( $logType );
641 $logTitle = SpecialPage
::getTitleFor( 'Log', $logType );
642 $logName = $logPage->getName()->text();
643 $data['logLink'] = $this->msg( 'parentheses' )
645 $this->linkRenderer
->makeKnownLink( $logTitle, $logName )
648 $data['articleLink'] = $this->getArticleLink( $rcObj, $rcObj->unpatrolled
, $rcObj->watched
);
651 # Diff and hist links
652 if ( $type != RC_LOG
&& $type != RC_CATEGORIZE
) {
653 $query['action'] = 'history';
654 $data['historyLink'] = $this->getDiffHistLinks( $rcObj, $query );
656 $data['separatorAfterLinks'] = ' <span class="mw-changeslist-separator">. .</span> ';
659 if ( $this->getConfig()->get( 'RCShowChangedSize' ) ) {
660 $cd = $this->formatCharacterDifference( $rcObj );
662 $data['characterDiff'] = $cd;
663 $data['separatorAftercharacterDiff'] = ' <span class="mw-changeslist-separator">. .</span> ';
667 if ( $type == RC_LOG
) {
668 $data['logEntry'] = $this->insertLogEntry( $rcObj );
669 } elseif ( $this->isCategorizationWithoutRevision( $rcObj ) ) {
670 $data['comment'] = $this->insertComment( $rcObj );
672 $data['userLink'] = $rcObj->userlink
;
673 $data['userTalkLink'] = $rcObj->usertalklink
;
674 $data['comment'] = $this->insertComment( $rcObj );
675 if ( $type == RC_CATEGORIZE
) {
676 $data['historyLink'] = $this->getDiffHistLinks( $rcObj, $query );
678 $data['rollback'] = $this->getRollback( $rcObj );
682 $data['tags'] = $this->getTags( $rcObj, $classes );
684 # Show how many people are watching this if enabled
685 $data['watchingUsers'] = $this->numberofWatchingusers( $rcObj->numberofWatchingusers
);
687 $data['attribs'] = array_merge( $this->getDataAttributes( $rcObj ), [ 'class' => $classes ] );
689 // give the hook a chance to modify the data
690 $success = Hooks
::run( 'EnhancedChangesListModifyBlockLineData',
691 [ $this, &$data, $rcObj ] );
693 // skip entry if hook aborted it
696 $attribs = $data['attribs'];
697 unset( $data['attribs'] );
698 $attribs = wfArrayFilterByKey( $attribs, function ( $key ) {
699 return $key === 'class' || Sanitizer
::isReservedDataAttribute( $key );
703 if ( is_callable( $this->changeLinePrefixer
) ) {
704 $prefix = call_user_func( $this->changeLinePrefixer
, $rcObj, $this, false );
707 $line = Html
::openElement( 'table', $attribs ) . Html
::openElement( 'tr' );
709 $line .= Html
::rawElement( 'td', [],
710 $this->getHighlightsContainerDiv()
713 $line .= Html
::rawElement( 'td', [], '<span class="mw-enhancedchanges-arrow-space"></span>' );
714 $line .= Html
::rawElement( 'td', [ 'class' => 'mw-changeslist-line-prefix' ], $prefix );
715 $line .= '<td class="mw-enhanced-rc" colspan="2">';
717 if ( isset( $data['recentChangesFlags'] ) ) {
718 $line .= $this->recentChangesFlags( $data['recentChangesFlags'] );
719 unset( $data['recentChangesFlags'] );
722 if ( isset( $data['timestampLink'] ) ) {
723 $line .= "\u{00A0}" . $data['timestampLink'];
724 unset( $data['timestampLink'] );
726 $line .= "\u{00A0}</td>";
727 $line .= Html
::openElement( 'td', [
728 'class' => 'mw-changeslist-line-inner',
729 // Used for reliable determination of the affiliated page
730 'data-target-page' => $rcObj->getTitle(),
733 // everything else: makes it easier for extensions to add or remove data
734 $line .= implode( '', $data );
736 $line .= "</td></tr></table>\n";
742 * Returns value to be used in 'historyLink' element of $data param in
743 * EnhancedChangesListModifyBlockLineData hook.
747 * @param RCCacheEntry $rc
748 * @param array $query array of key/value pairs to append as a query string
749 * @return string HTML
751 public function getDiffHistLinks( RCCacheEntry
$rc, array $query ) {
752 $pageTitle = $rc->getTitle();
753 if ( $rc->getAttribute( 'rc_type' ) == RC_CATEGORIZE
) {
754 // For categorizations we must swap the category title with the page title!
755 $pageTitle = Title
::newFromID( $rc->getAttribute( 'rc_cur_id' ) );
757 // The page has been deleted, but the RC entry
758 // deletion job has not run yet. Just skip.
763 $retVal = ' ' . $this->msg( 'parentheses' )
764 ->rawParams( $rc->difflink
. $this->message
['pipe-separator']
765 . $this->linkRenderer
->makeKnownLink(
767 new HtmlArmor( $this->message
['hist'] ),
768 [ 'class' => 'mw-changeslist-history' ],
775 * If enhanced RC is in use, this function takes the previously cached
776 * RC lines, arranges them, and outputs the HTML
780 protected function recentChangesBlock() {
781 if ( count( $this->rc_cache
) == 0 ) {
786 foreach ( $this->rc_cache
as $block ) {
787 if ( count( $block ) < 2 ) {
788 $blockOut .= $this->recentChangesBlockLine( array_shift( $block ) );
790 $blockOut .= $this->recentChangesBlockGroup( $block );
794 if ( $blockOut === '' ) {
797 // $this->lastdate is kept up to date by recentChangesLine()
798 return Xml
::element( 'h4', null, $this->lastdate
) . "\n<div>" . $blockOut . '</div>';
802 * Returns text for the end of RC
803 * If enhanced RC is in use, returns pretty much all the text
806 public function endRecentChangesList() {
807 return $this->recentChangesBlock() . '</div>';