3 * Implements Special:Recentchanges
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
21 * @ingroup SpecialPage
25 * A special page that lists last changes made to the wiki
27 * @ingroup SpecialPage
29 class SpecialRecentChanges
extends IncludableSpecialPage
{
30 var $rcOptions, $rcSubpage;
31 protected $customFilters;
33 public function __construct( $name = 'Recentchanges' ) {
34 parent
::__construct( $name );
38 * Get a FormOptions object containing the default options
42 public function getDefaultOptions() {
43 $opts = new FormOptions();
45 $opts->add( 'days', (int)$this->getUser()->getOption( 'rcdays' ) );
46 $opts->add( 'limit', (int)$this->getUser()->getOption( 'rclimit' ) );
47 $opts->add( 'from', '' );
49 $opts->add( 'hideminor', $this->getUser()->getBoolOption( 'hideminor' ) );
50 $opts->add( 'hidebots', true );
51 $opts->add( 'hideanons', false );
52 $opts->add( 'hideliu', false );
53 $opts->add( 'hidepatrolled', $this->getUser()->getBoolOption( 'hidepatrolled' ) );
54 $opts->add( 'hidemyself', false );
56 $opts->add( 'namespace', '', FormOptions
::INTNULL
);
57 $opts->add( 'invert', false );
58 $opts->add( 'associated', false );
60 $opts->add( 'categories', '' );
61 $opts->add( 'categories_any', false );
62 $opts->add( 'tagfilter', '' );
67 * Create a FormOptions object with options as specified by the user
69 * @param $parameters array
73 public function setup( $parameters ) {
76 $opts = $this->getDefaultOptions();
78 $this->customFilters
= array();
79 wfRunHooks( 'SpecialRecentChangesFilters', array( $this, &$this->customFilters
) );
80 foreach( $this->customFilters
as $key => $params ) {
81 $opts->add( $key, $params['default'] );
84 $opts->fetchValuesFromRequest( $wgRequest );
86 // Give precedence to subpage syntax
87 if( $parameters !== null ) {
88 $this->parseParameters( $parameters, $opts );
91 $opts->validateIntBounds( 'limit', 0, 5000 );
96 * Create a FormOptions object specific for feed requests and return it
100 public function feedSetup() {
101 global $wgFeedLimit, $wgRequest;
102 $opts = $this->getDefaultOptions();
103 # Feed is cached on limit,hideminor,namespace; other params would randomly not work
104 $opts->fetchValuesFromRequest( $wgRequest, array( 'limit', 'hideminor', 'namespace' ) );
105 $opts->validateIntBounds( 'limit', 0, $wgFeedLimit );
110 * Get the current FormOptions for this request
112 public function getOptions() {
113 if ( $this->rcOptions
=== null ) {
115 $feedFormat = $wgRequest->getVal( 'feed' );
116 $this->rcOptions
= $feedFormat ?
$this->feedSetup() : $this->setup( $this->rcSubpage
);
118 return $this->rcOptions
;
123 * Main execution point
125 * @param $subpage String
127 public function execute( $subpage ) {
128 global $wgRequest, $wgOut;
129 $this->rcSubpage
= $subpage;
130 $feedFormat = $wgRequest->getVal( 'feed' );
132 # 10 seconds server-side caching max
133 $wgOut->setSquidMaxage( 10 );
134 # Check if the client has a cached version
135 $lastmod = $this->checkLastModified( $feedFormat );
136 if( $lastmod === false ) {
140 $opts = $this->getOptions();
142 $this->outputHeader();
143 $this->addRecentChangesJS();
145 // Fetch results, prepare a batch link existence check query
146 $conds = $this->buildMainQueryConds( $opts );
147 $rows = $this->doMainQuery( $conds, $opts );
148 if( $rows === false ){
149 if( !$this->including() ) {
150 $this->doHeader( $opts );
156 $batch = new LinkBatch
;
157 foreach( $rows as $row ) {
158 $batch->add( NS_USER
, $row->rc_user_text
);
159 $batch->add( NS_USER_TALK
, $row->rc_user_text
);
160 $batch->add( $row->rc_namespace
, $row->rc_title
);
165 list( $changesFeed, $formatter ) = $this->getFeedObject( $feedFormat );
166 $changesFeed->execute( $formatter, $rows, $lastmod, $opts );
168 $this->webOutput( $rows, $opts );
175 * Return an array with a ChangesFeed object and ChannelFeed object
179 public function getFeedObject( $feedFormat ){
180 $changesFeed = new ChangesFeed( $feedFormat, 'rcfeed' );
181 $formatter = $changesFeed->getFeedObject(
182 wfMsgForContent( 'recentchanges' ),
183 wfMsgForContent( 'recentchanges-feed-description' ),
184 $this->getTitle()->getFullURL()
186 return array( $changesFeed, $formatter );
190 * Process $par and put options found if $opts
191 * Mainly used when including the page
194 * @param $opts FormOptions
196 public function parseParameters( $par, FormOptions
$opts ) {
197 $bits = preg_split( '/\s*,\s*/', trim( $par ) );
198 foreach( $bits as $bit ) {
199 if( 'hidebots' === $bit ) {
200 $opts['hidebots'] = true;
202 if( 'bots' === $bit ) {
203 $opts['hidebots'] = false;
205 if( 'hideminor' === $bit ) {
206 $opts['hideminor'] = true;
208 if( 'minor' === $bit ) {
209 $opts['hideminor'] = false;
211 if( 'hideliu' === $bit ) {
212 $opts['hideliu'] = true;
214 if( 'hidepatrolled' === $bit ) {
215 $opts['hidepatrolled'] = true;
217 if( 'hideanons' === $bit ) {
218 $opts['hideanons'] = true;
220 if( 'hidemyself' === $bit ) {
221 $opts['hidemyself'] = true;
224 if( is_numeric( $bit ) ) {
225 $opts['limit'] = $bit;
229 if( preg_match( '/^limit=(\d+)$/', $bit, $m ) ) {
230 $opts['limit'] = $m[1];
232 if( preg_match( '/^days=(\d+)$/', $bit, $m ) ) {
233 $opts['days'] = $m[1];
239 * Get last modified date, for client caching
240 * Don't use this if we are using the patrol feature, patrol changes don't
241 * update the timestamp
243 * @param $feedFormat String
244 * @return String or false
246 public function checkLastModified( $feedFormat ) {
247 $dbr = wfGetDB( DB_SLAVE
);
248 $lastmod = $dbr->selectField( 'recentchanges', 'MAX(rc_timestamp)', false, __METHOD__
);
249 if( $feedFormat ||
!$this->getUser()->useRCPatrol() ) {
250 if( $lastmod && $this->getOutput()->checkLastModified( $lastmod ) ) {
251 # Client cache fresh and headers sent, nothing more to do.
259 * Return an array of conditions depending of options set in $opts
261 * @param $opts FormOptions
264 public function buildMainQueryConds( FormOptions
$opts ) {
265 $dbr = wfGetDB( DB_SLAVE
);
268 # It makes no sense to hide both anons and logged-in users
269 # Where this occurs, force anons to be shown
271 if( $opts['hideanons'] && $opts['hideliu'] ){
272 # Check if the user wants to show bots only
273 if( $opts['hidebots'] ){
274 $opts['hideanons'] = false;
277 $opts['hidebots'] = false;
282 $cutoff_unixtime = time() - ( $opts['days'] * 86400 );
283 $cutoff_unixtime = $cutoff_unixtime - ($cutoff_unixtime %
86400);
284 $cutoff = $dbr->timestamp( $cutoff_unixtime );
286 $fromValid = preg_match('/^[0-9]{14}$/', $opts['from']);
287 if( $fromValid && $opts['from'] > wfTimestamp(TS_MW
,$cutoff) ) {
288 $cutoff = $dbr->timestamp($opts['from']);
290 $opts->reset( 'from' );
293 $conds[] = 'rc_timestamp >= ' . $dbr->addQuotes( $cutoff );
296 $hidePatrol = $this->getUser()->useRCPatrol() && $opts['hidepatrolled'];
297 $hideLoggedInUsers = $opts['hideliu'] && !$forcebot;
298 $hideAnonymousUsers = $opts['hideanons'] && !$forcebot;
300 if( $opts['hideminor'] ) {
301 $conds['rc_minor'] = 0;
303 if( $opts['hidebots'] ) {
304 $conds['rc_bot'] = 0;
307 $conds['rc_patrolled'] = 0;
310 $conds['rc_bot'] = 1;
312 if( $hideLoggedInUsers ) {
313 $conds[] = 'rc_user = 0';
315 if( $hideAnonymousUsers ) {
316 $conds[] = 'rc_user != 0';
319 if( $opts['hidemyself'] ) {
320 if( $this->getUser()->getId() ) {
321 $conds[] = 'rc_user != ' . $dbr->addQuotes( $this->getUser()->getId() );
323 $conds[] = 'rc_user_text != ' . $dbr->addQuotes( $this->getUser()->getName() );
327 # Namespace filtering
328 if( $opts['namespace'] !== '' ) {
329 $namespaces[] = $opts['namespace'];
331 $inversionSuffix = $opts['invert'] ?
'!' : '';
333 if( $opts['associated'] ) {
334 # namespace association (bug 2429)
335 $namespaces[] = MWNamespace
::getAssociated( $opts['namespace'] );
338 $condition = $dbr->makeList(
339 array( 'rc_namespace' . $inversionSuffix
344 $conds[] = $condition;
353 * @param $conds Array
354 * @param $opts FormOptions
355 * @return database result or false (for Recentchangeslinked only)
357 public function doMainQuery( $conds, $opts ) {
358 $tables = array( 'recentchanges' );
359 $join_conds = array();
360 $query_options = array(
361 'USE INDEX' => array( 'recentchanges' => 'rc_timestamp' )
364 $uid = $this->getUser()->getId();
365 $dbr = wfGetDB( DB_SLAVE
);
366 $limit = $opts['limit'];
367 $namespace = $opts['namespace'];
368 $invert = $opts['invert'];
369 $associated = $opts['associated'];
371 $fields = array( $dbr->tableName( 'recentchanges' ) . '.*' ); // all rc columns
372 // JOIN on watchlist for users
374 $tables[] = 'watchlist';
375 $fields[] = 'wl_user';
376 $fields[] = 'wl_notificationtimestamp';
377 $join_conds['watchlist'] = array('LEFT JOIN',
378 "wl_user={$uid} AND wl_title=rc_title AND wl_namespace=rc_namespace");
380 if ( $this->getUser()->isAllowed( 'rollback' ) ) {
382 $fields[] = 'page_latest';
383 $join_conds['page'] = array('LEFT JOIN', 'rc_cur_id=page_id');
385 if ( !$this->including() ) {
387 // Doesn't work when transcluding. See bug 23293
388 ChangeTags
::modifyDisplayQuery(
389 $tables, $fields, $conds, $join_conds, $query_options,
394 if ( !wfRunHooks( 'SpecialRecentChangesQuery',
395 array( &$conds, &$tables, &$join_conds, $opts, &$query_options, &$fields ) ) )
400 // Don't use the new_namespace_time timestamp index if:
401 // (a) "All namespaces" selected
402 // (b) We want pages in more than one namespace (inverted/associated)
403 // (c) There is a tag to filter on (use tag index instead)
404 // (d) UNION + sort/limit is not an option for the DBMS
405 if( $namespace === ''
406 ||
( $invert ||
$associated )
407 ||
$opts['tagfilter'] != ''
408 ||
!$dbr->unionSupportsOrderAndLimit() )
410 $res = $dbr->select( $tables, $fields, $conds, __METHOD__
,
411 array( 'ORDER BY' => 'rc_timestamp DESC', 'LIMIT' => $limit ) +
414 // We have a new_namespace_time index! UNION over new=(0,1) and sort result set!
417 $sqlNew = $dbr->selectSQLText(
420 array( 'rc_new' => 1 ) +
$conds,
423 'ORDER BY' => 'rc_timestamp DESC',
425 'USE INDEX' => array( 'recentchanges' => 'new_name_timestamp' )
430 $sqlOld = $dbr->selectSQLText(
433 array( 'rc_new' => 0 ) +
$conds,
436 'ORDER BY' => 'rc_timestamp DESC',
438 'USE INDEX' => array( 'recentchanges' => 'new_name_timestamp' )
442 # Join the two fast queries, and sort the result set
443 $sql = $dbr->unionQueries( array( $sqlNew, $sqlOld ), false ) .
444 ' ORDER BY rc_timestamp DESC';
445 $sql = $dbr->limitResult( $sql, $limit, false );
446 $res = $dbr->query( $sql, __METHOD__
);
453 * Send output to $wgOut, only called if not used feeds
455 * @param $rows Array of database rows
456 * @param $opts FormOptions
458 public function webOutput( $rows, $opts ) {
459 global $wgOut, $wgRCShowWatchingUsers, $wgShowUpdatedMarker;
460 global $wgAllowCategorizedRecentChanges;
462 $limit = $opts['limit'];
464 if( !$this->including() ) {
465 // Output options box
466 $this->doHeader( $opts );
469 // And now for the content
470 $wgOut->setFeedAppendQuery( $this->getFeedQuery() );
472 if( $wgAllowCategorizedRecentChanges ) {
473 $this->filterByCategories( $rows, $opts );
476 $showWatcherCount = $wgRCShowWatchingUsers && $this->getUser()->getOption( 'shownumberswatching' );
477 $watcherCache = array();
479 $dbr = wfGetDB( DB_SLAVE
);
482 $list = ChangesList
::newFromUser( $this->getUser() );
484 $s = $list->beginRecentChangesList();
485 foreach( $rows as $obj ) {
489 $rc = RecentChange
::newFromRow( $obj );
490 $rc->counter
= $counter++
;
491 # Check if the page has been updated since the last visit
492 if( $wgShowUpdatedMarker && !empty( $obj->wl_notificationtimestamp
) ) {
493 $rc->notificationtimestamp
= ( $obj->rc_timestamp
>= $obj->wl_notificationtimestamp
);
495 $rc->notificationtimestamp
= false; // Default
497 # Check the number of users watching the page
498 $rc->numberofWatchingusers
= 0; // Default
499 if( $showWatcherCount && $obj->rc_namespace
>= 0 ) {
500 if( !isset( $watcherCache[$obj->rc_namespace
][$obj->rc_title
] ) ) {
501 $watcherCache[$obj->rc_namespace
][$obj->rc_title
] =
506 'wl_namespace' => $obj->rc_namespace
,
507 'wl_title' => $obj->rc_title
,
509 __METHOD__
. '-watchers'
512 $rc->numberofWatchingusers
= $watcherCache[$obj->rc_namespace
][$obj->rc_title
];
514 $s .= $list->recentChangesLine( $rc, !empty( $obj->wl_user
), $counter );
517 $s .= $list->endRecentChangesList();
518 $wgOut->addHTML( $s );
522 * Get the query string to append to feed link URLs.
523 * This is overridden by RCL to add the target parameter
525 public function getFeedQuery() {
530 * Return the text to be displayed above the changes
532 * @param $opts FormOptions
533 * @return String: XHTML
535 public function doHeader( $opts ) {
536 global $wgScript, $wgOut;
538 $this->setTopText( $wgOut, $opts );
540 $defaults = $opts->getAllValues();
541 $nondefaults = $opts->getChangedValues();
542 $opts->consumeValues( array(
543 'namespace', 'invert', 'associated', 'tagfilter',
544 'categories', 'categories_any'
548 $panel[] = $this->optionsPanel( $defaults, $nondefaults );
551 $extraOpts = $this->getExtraOptions( $opts );
552 $extraOptsCount = count( $extraOpts );
554 $submit = ' ' . Xml
::submitbutton( wfMsg( 'allpagessubmit' ) );
556 $out = Xml
::openElement( 'table', array( 'class' => 'mw-recentchanges-table' ) );
557 foreach( $extraOpts as $optionRow ) {
558 # Add submit button to the last row only
560 $addSubmit = $count === $extraOptsCount ?
$submit : '';
562 $out .= Xml
::openElement( 'tr' );
563 if( is_array( $optionRow ) ) {
564 $out .= Xml
::tags( 'td', array( 'class' => 'mw-label' ), $optionRow[0] );
565 $out .= Xml
::tags( 'td', array( 'class' => 'mw-input' ), $optionRow[1] . $addSubmit );
567 $out .= Xml
::tags( 'td', array( 'class' => 'mw-input', 'colspan' => 2 ), $optionRow . $addSubmit );
569 $out .= Xml
::closeElement( 'tr' );
571 $out .= Xml
::closeElement( 'table' );
573 $unconsumed = $opts->getUnconsumedValues();
574 foreach( $unconsumed as $key => $value ) {
575 $out .= Html
::hidden( $key, $value );
578 $t = $this->getTitle();
579 $out .= Html
::hidden( 'title', $t->getPrefixedText() );
580 $form = Xml
::tags( 'form', array( 'action' => $wgScript ), $out );
582 $panelString = implode( "\n", $panel );
585 Xml
::fieldset( wfMsg( 'recentchanges-legend' ), $panelString, array( 'class' => 'rcoptions' ) )
588 $this->setBottomText( $wgOut, $opts );
592 * Get options to be displayed in a form
594 * @param $opts FormOptions
597 function getExtraOptions( $opts ) {
598 $extraOpts = array();
599 $extraOpts['namespace'] = $this->namespaceFilterForm( $opts );
601 global $wgAllowCategorizedRecentChanges;
602 if( $wgAllowCategorizedRecentChanges ) {
603 $extraOpts['category'] = $this->categoryFilterForm( $opts );
606 $tagFilter = ChangeTags
::buildTagFilterSelector( $opts['tagfilter'] );
607 if ( count( $tagFilter ) ) {
608 $extraOpts['tagfilter'] = $tagFilter;
611 wfRunHooks( 'SpecialRecentChangesPanel', array( &$extraOpts, $opts ) );
616 * Send the text to be displayed above the options
618 * @param $out OutputPage
619 * @param $opts FormOptions
621 function setTopText( OutputPage
$out, FormOptions
$opts ) {
622 $out->addWikiText( wfMsgForContentNoTrans( 'recentchangestext' ) );
626 * Send the text to be displayed after the options, for use in
627 * Recentchangeslinked
629 * @param $out OutputPage
630 * @param $opts FormOptions
632 function setBottomText( OutputPage
$out, FormOptions
$opts ) {}
635 * Creates the choose namespace selection
637 * @todo Uses radio buttons (HASHAR)
638 * @param $opts FormOptions
641 protected function namespaceFilterForm( FormOptions
$opts ) {
642 $nsSelect = Xml
::namespaceSelector( $opts['namespace'], '' );
643 $nsLabel = Xml
::label( wfMsg( 'namespace' ), 'namespace' );
644 $invert = Xml
::checkLabel(
645 wfMsg( 'invert' ), 'invert', 'nsinvert',
647 array( 'title' => wfMsg( 'tooltip-invert' ) )
649 $associated = Xml
::checkLabel(
650 wfMsg( 'namespace_association' ), 'associated', 'nsassociated',
652 array( 'title' => wfMsg( 'tooltip-namespace_association' ) )
654 return array( $nsLabel, "$nsSelect $invert $associated" );
658 * Create a input to filter changes by categories
660 * @param $opts FormOptions
663 protected function categoryFilterForm( FormOptions
$opts ) {
664 list( $label, $input ) = Xml
::inputLabelSep( wfMsg( 'rc_categories' ),
665 'categories', 'mw-categories', false, $opts['categories'] );
667 $input .= ' ' . Xml
::checkLabel( wfMsg( 'rc_categories_any' ),
668 'categories_any', 'mw-categories_any', $opts['categories_any'] );
670 return array( $label, $input );
674 * Filter $rows by categories set in $opts
676 * @param $rows Array of database rows
677 * @param $opts FormOptions
679 function filterByCategories( &$rows, FormOptions
$opts ) {
680 $categories = array_map( 'trim', explode( '|' , $opts['categories'] ) );
682 if( !count( $categories ) ) {
688 foreach( $categories as $cat ) {
700 foreach( $rows as $k => $r ) {
701 $nt = Title
::makeTitle( $r->rc_namespace
, $r->rc_title
);
702 $id = $nt->getArticleID();
704 continue; # Page might have been deleted...
706 if( !in_array( $id, $articles ) ) {
709 if( !isset( $a2r[$id] ) ) {
717 if( !count( $articles ) ||
!count( $cats ) ) {
722 $c = new Categoryfinder
;
723 $c->seed( $articles, $cats, $opts['categories_any'] ?
'OR' : 'AND' );
728 foreach( $match as $id ) {
729 foreach( $a2r[$id] as $rev ) {
731 $newrows[$k] = $rowsarr[$k];
738 * Makes change an option link which carries all the other options
740 * @param $title Title
741 * @param $override Array: options to override
742 * @param $options Array: current options
743 * @param $active Boolean: whether to show the link in bold
745 function makeOptionsLink( $title, $override, $options, $active = false ) {
746 $params = $override +
$options;
748 return $this->getSkin()->link(
750 '<strong>' . htmlspecialchars( $title ) . '</strong>',
751 array(), $params, array( 'known' ) );
753 return $this->getSkin()->link(
754 $this->getTitle(), htmlspecialchars( $title ), array(),
755 $params, array( 'known' ) );
760 * Creates the options panel.
762 * @param $defaults Array
763 * @param $nondefaults Array
765 function optionsPanel( $defaults, $nondefaults ) {
766 global $wgLang, $wgRCLinkLimits, $wgRCLinkDays;
768 $options = $nondefaults +
$defaults;
771 if( !wfEmptyMsg( 'rclegend' ) ) {
772 $note .= '<div class="mw-rclegend">' .
773 wfMsgExt( 'rclegend', array( 'parseinline' ) ) . "</div>\n";
775 if( $options['from'] ) {
776 $note .= wfMsgExt( 'rcnotefrom', array( 'parseinline' ),
777 $wgLang->formatNum( $options['limit'] ),
778 $wgLang->timeanddate( $options['from'], true ),
779 $wgLang->date( $options['from'], true ),
780 $wgLang->time( $options['from'], true ) ) . '<br />';
783 # Sort data for display and make sure it's unique after we've added user data.
784 $wgRCLinkLimits[] = $options['limit'];
785 $wgRCLinkDays[] = $options['days'];
786 sort( $wgRCLinkLimits );
787 sort( $wgRCLinkDays );
788 $wgRCLinkLimits = array_unique( $wgRCLinkLimits );
789 $wgRCLinkDays = array_unique( $wgRCLinkDays );
792 foreach( $wgRCLinkLimits as $value ) {
793 $cl[] = $this->makeOptionsLink( $wgLang->formatNum( $value ),
794 array( 'limit' => $value ), $nondefaults, $value == $options['limit'] );
796 $cl = $wgLang->pipeList( $cl );
798 // day links, reset 'from' to none
799 foreach( $wgRCLinkDays as $value ) {
800 $dl[] = $this->makeOptionsLink( $wgLang->formatNum( $value ),
801 array( 'days' => $value, 'from' => '' ), $nondefaults, $value == $options['days'] );
803 $dl = $wgLang->pipeList( $dl );
807 $showhide = array( wfMsg( 'show' ), wfMsg( 'hide' ) );
809 'hideminor' => 'rcshowhideminor',
810 'hidebots' => 'rcshowhidebots',
811 'hideanons' => 'rcshowhideanons',
812 'hideliu' => 'rcshowhideliu',
813 'hidepatrolled' => 'rcshowhidepatr',
814 'hidemyself' => 'rcshowhidemine'
816 foreach ( $this->customFilters
as $key => $params ) {
817 $filters[$key] = $params['msg'];
819 // Disable some if needed
820 if ( !$this->getUser()->useRCPatrol() ) {
821 unset( $filters['hidepatrolled'] );
825 foreach ( $filters as $key => $msg ) {
826 $link = $this->makeOptionsLink( $showhide[1 - $options[$key]],
827 array( $key => 1-$options[$key] ), $nondefaults );
828 $links[] = wfMsgHtml( $msg, $link );
831 // show from this onward link
832 $timestamp = wfTimestampNow();
833 $now = $wgLang->timeanddate( $timestamp, true );
834 $tl = $this->makeOptionsLink(
835 $now, array( 'from' => $timestamp ), $nondefaults
838 $rclinks = wfMsgExt( 'rclinks', array( 'parseinline', 'replaceafter' ),
839 $cl, $dl, $wgLang->pipeList( $links ) );
840 $rclistfrom = wfMsgExt( 'rclistfrom', array( 'parseinline', 'replaceafter' ), $tl );
841 return "{$note}$rclinks<br />$rclistfrom";
845 * add javascript specific to the [[Special:RecentChanges]] page
847 function addRecentChangesJS() {
849 $wgOut->addModules( array(
850 'mediawiki.special.recentchanges',