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 ) {
114 if ( $this->including() ) {
118 $isFeed = (bool)$wgRequest->getVal( 'feed' );
120 $this->rcOptions
= $isFeed ?
$this->feedSetup() : $this->setup( $this->rcSubpage
);
122 return $this->rcOptions
;
127 * Main execution point
129 * @param $subpage String
131 public function execute( $subpage ) {
132 global $wgRequest, $wgOut;
133 $this->rcSubpage
= $subpage;
134 $feedFormat = $this->including() ?
null : $wgRequest->getVal( 'feed' );
136 # 10 seconds server-side caching max
137 $wgOut->setSquidMaxage( 10 );
138 # Check if the client has a cached version
139 $lastmod = $this->checkLastModified( $feedFormat );
140 if( $lastmod === false ) {
144 $opts = $this->getOptions();
146 $this->outputHeader();
147 $this->addRecentChangesJS();
149 // Fetch results, prepare a batch link existence check query
150 $conds = $this->buildMainQueryConds( $opts );
151 $rows = $this->doMainQuery( $conds, $opts );
152 if( $rows === false ){
153 if( !$this->including() ) {
154 $this->doHeader( $opts );
160 $batch = new LinkBatch
;
161 foreach( $rows as $row ) {
162 $batch->add( NS_USER
, $row->rc_user_text
);
163 $batch->add( NS_USER_TALK
, $row->rc_user_text
);
164 $batch->add( $row->rc_namespace
, $row->rc_title
);
169 list( $changesFeed, $formatter ) = $this->getFeedObject( $feedFormat );
170 $changesFeed->execute( $formatter, $rows, $lastmod, $opts );
172 $this->webOutput( $rows, $opts );
179 * Return an array with a ChangesFeed object and ChannelFeed object
183 public function getFeedObject( $feedFormat ){
184 $changesFeed = new ChangesFeed( $feedFormat, 'rcfeed' );
185 $formatter = $changesFeed->getFeedObject(
186 wfMsgForContent( 'recentchanges' ),
187 wfMsgForContent( 'recentchanges-feed-description' ),
188 $this->getTitle()->getFullURL()
190 return array( $changesFeed, $formatter );
194 * Process $par and put options found if $opts
195 * Mainly used when including the page
198 * @param $opts FormOptions
200 public function parseParameters( $par, FormOptions
$opts ) {
201 $bits = preg_split( '/\s*,\s*/', trim( $par ) );
202 foreach( $bits as $bit ) {
203 if( 'hidebots' === $bit ) {
204 $opts['hidebots'] = true;
206 if( 'bots' === $bit ) {
207 $opts['hidebots'] = false;
209 if( 'hideminor' === $bit ) {
210 $opts['hideminor'] = true;
212 if( 'minor' === $bit ) {
213 $opts['hideminor'] = false;
215 if( 'hideliu' === $bit ) {
216 $opts['hideliu'] = true;
218 if( 'hidepatrolled' === $bit ) {
219 $opts['hidepatrolled'] = true;
221 if( 'hideanons' === $bit ) {
222 $opts['hideanons'] = true;
224 if( 'hidemyself' === $bit ) {
225 $opts['hidemyself'] = true;
228 if( is_numeric( $bit ) ) {
229 $opts['limit'] = $bit;
233 if( preg_match( '/^limit=(\d+)$/', $bit, $m ) ) {
234 $opts['limit'] = $m[1];
236 if( preg_match( '/^days=(\d+)$/', $bit, $m ) ) {
237 $opts['days'] = $m[1];
243 * Get last modified date, for client caching
244 * Don't use this if we are using the patrol feature, patrol changes don't
245 * update the timestamp
247 * @param $feedFormat String
248 * @return String or false
250 public function checkLastModified( $feedFormat ) {
251 $dbr = wfGetDB( DB_SLAVE
);
252 $lastmod = $dbr->selectField( 'recentchanges', 'MAX(rc_timestamp)', false, __METHOD__
);
253 if( $feedFormat ||
!$this->getUser()->useRCPatrol() ) {
254 if( $lastmod && $this->getOutput()->checkLastModified( $lastmod ) ) {
255 # Client cache fresh and headers sent, nothing more to do.
263 * Return an array of conditions depending of options set in $opts
265 * @param $opts FormOptions
268 public function buildMainQueryConds( FormOptions
$opts ) {
269 $dbr = wfGetDB( DB_SLAVE
);
272 # It makes no sense to hide both anons and logged-in users
273 # Where this occurs, force anons to be shown
275 if( $opts['hideanons'] && $opts['hideliu'] ){
276 # Check if the user wants to show bots only
277 if( $opts['hidebots'] ){
278 $opts['hideanons'] = false;
281 $opts['hidebots'] = false;
286 $cutoff_unixtime = time() - ( $opts['days'] * 86400 );
287 $cutoff_unixtime = $cutoff_unixtime - ($cutoff_unixtime %
86400);
288 $cutoff = $dbr->timestamp( $cutoff_unixtime );
290 $fromValid = preg_match('/^[0-9]{14}$/', $opts['from']);
291 if( $fromValid && $opts['from'] > wfTimestamp(TS_MW
,$cutoff) ) {
292 $cutoff = $dbr->timestamp($opts['from']);
294 $opts->reset( 'from' );
297 $conds[] = 'rc_timestamp >= ' . $dbr->addQuotes( $cutoff );
299 $hidePatrol = $this->getUser()->useRCPatrol() && $opts['hidepatrolled'];
300 $hideLoggedInUsers = $opts['hideliu'] && !$forcebot;
301 $hideAnonymousUsers = $opts['hideanons'] && !$forcebot;
303 if( $opts['hideminor'] ) {
304 $conds['rc_minor'] = 0;
306 if( $opts['hidebots'] ) {
307 $conds['rc_bot'] = 0;
310 $conds['rc_patrolled'] = 0;
313 $conds['rc_bot'] = 1;
315 if( $hideLoggedInUsers ) {
316 $conds[] = 'rc_user = 0';
318 if( $hideAnonymousUsers ) {
319 $conds[] = 'rc_user != 0';
322 if( $opts['hidemyself'] ) {
323 if( $this->getUser()->getId() ) {
324 $conds[] = 'rc_user != ' . $dbr->addQuotes( $this->getUser()->getId() );
326 $conds[] = 'rc_user_text != ' . $dbr->addQuotes( $this->getUser()->getName() );
330 # Namespace filtering
331 if( $opts['namespace'] !== '' ) {
332 $namespaces[] = $opts['namespace'];
334 $inversionSuffix = $opts['invert'] ?
'!' : '';
336 if( $opts['associated'] ) {
337 # namespace association (bug 2429)
338 $namespaces[] = MWNamespace
::getAssociated( $opts['namespace'] );
341 $condition = $dbr->makeList(
342 array( 'rc_namespace' . $inversionSuffix
347 $conds[] = $condition;
356 * @param $conds Array
357 * @param $opts FormOptions
358 * @return database result or false (for Recentchangeslinked only)
360 public function doMainQuery( $conds, $opts ) {
361 $tables = array( 'recentchanges' );
362 $join_conds = array();
363 $query_options = array(
364 'USE INDEX' => array( 'recentchanges' => 'rc_timestamp' )
367 $uid = $this->getUser()->getId();
368 $dbr = wfGetDB( DB_SLAVE
);
369 $limit = $opts['limit'];
370 $namespace = $opts['namespace'];
371 $invert = $opts['invert'];
372 $associated = $opts['associated'];
374 $fields = array( $dbr->tableName( 'recentchanges' ) . '.*' ); // all rc columns
375 // JOIN on watchlist for users
377 $tables[] = 'watchlist';
378 $fields[] = 'wl_user';
379 $fields[] = 'wl_notificationtimestamp';
380 $join_conds['watchlist'] = array('LEFT JOIN',
381 "wl_user={$uid} AND wl_title=rc_title AND wl_namespace=rc_namespace");
383 if ( $this->getUser()->isAllowed( 'rollback' ) ) {
385 $fields[] = 'page_latest';
386 $join_conds['page'] = array('LEFT JOIN', 'rc_cur_id=page_id');
388 if ( !$this->including() ) {
390 // Doesn't work when transcluding. See bug 23293
391 ChangeTags
::modifyDisplayQuery(
392 $tables, $fields, $conds, $join_conds, $query_options,
397 if ( !wfRunHooks( 'SpecialRecentChangesQuery',
398 array( &$conds, &$tables, &$join_conds, $opts, &$query_options, &$fields ) ) )
403 // Don't use the new_namespace_time timestamp index if:
404 // (a) "All namespaces" selected
405 // (b) We want pages in more than one namespace (inverted/associated)
406 // (c) There is a tag to filter on (use tag index instead)
407 // (d) UNION + sort/limit is not an option for the DBMS
408 if( $namespace === ''
409 ||
( $invert ||
$associated )
410 ||
$opts['tagfilter'] != ''
411 ||
!$dbr->unionSupportsOrderAndLimit() )
413 $res = $dbr->select( $tables, $fields, $conds, __METHOD__
,
414 array( 'ORDER BY' => 'rc_timestamp DESC', 'LIMIT' => $limit ) +
417 // We have a new_namespace_time index! UNION over new=(0,1) and sort result set!
420 $sqlNew = $dbr->selectSQLText(
423 array( 'rc_new' => 1 ) +
$conds,
426 'ORDER BY' => 'rc_timestamp DESC',
428 'USE INDEX' => array( 'recentchanges' => 'new_name_timestamp' )
433 $sqlOld = $dbr->selectSQLText(
436 array( 'rc_new' => 0 ) +
$conds,
439 'ORDER BY' => 'rc_timestamp DESC',
441 'USE INDEX' => array( 'recentchanges' => 'new_name_timestamp' )
445 # Join the two fast queries, and sort the result set
446 $sql = $dbr->unionQueries( array( $sqlNew, $sqlOld ), false ) .
447 ' ORDER BY rc_timestamp DESC';
448 $sql = $dbr->limitResult( $sql, $limit, false );
449 $res = $dbr->query( $sql, __METHOD__
);
456 * Send output to $wgOut, only called if not used feeds
458 * @param $rows Array of database rows
459 * @param $opts FormOptions
461 public function webOutput( $rows, $opts ) {
462 global $wgOut, $wgRCShowWatchingUsers, $wgShowUpdatedMarker;
463 global $wgAllowCategorizedRecentChanges;
465 $limit = $opts['limit'];
467 if( !$this->including() ) {
468 // Output options box
469 $this->doHeader( $opts );
472 // And now for the content
473 $wgOut->setFeedAppendQuery( $this->getFeedQuery() );
475 if( $wgAllowCategorizedRecentChanges ) {
476 $this->filterByCategories( $rows, $opts );
479 $showWatcherCount = $wgRCShowWatchingUsers && $this->getUser()->getOption( 'shownumberswatching' );
480 $watcherCache = array();
482 $dbr = wfGetDB( DB_SLAVE
);
485 $list = ChangesList
::newFromUser( $this->getUser() );
487 $s = $list->beginRecentChangesList();
488 foreach( $rows as $obj ) {
492 $rc = RecentChange
::newFromRow( $obj );
493 $rc->counter
= $counter++
;
494 # Check if the page has been updated since the last visit
495 if( $wgShowUpdatedMarker && !empty( $obj->wl_notificationtimestamp
) ) {
496 $rc->notificationtimestamp
= ( $obj->rc_timestamp
>= $obj->wl_notificationtimestamp
);
498 $rc->notificationtimestamp
= false; // Default
500 # Check the number of users watching the page
501 $rc->numberofWatchingusers
= 0; // Default
502 if( $showWatcherCount && $obj->rc_namespace
>= 0 ) {
503 if( !isset( $watcherCache[$obj->rc_namespace
][$obj->rc_title
] ) ) {
504 $watcherCache[$obj->rc_namespace
][$obj->rc_title
] =
509 'wl_namespace' => $obj->rc_namespace
,
510 'wl_title' => $obj->rc_title
,
512 __METHOD__
. '-watchers'
515 $rc->numberofWatchingusers
= $watcherCache[$obj->rc_namespace
][$obj->rc_title
];
517 $s .= $list->recentChangesLine( $rc, !empty( $obj->wl_user
), $counter );
520 $s .= $list->endRecentChangesList();
521 $wgOut->addHTML( $s );
525 * Get the query string to append to feed link URLs.
526 * This is overridden by RCL to add the target parameter
528 public function getFeedQuery() {
533 * Return the text to be displayed above the changes
535 * @param $opts FormOptions
536 * @return String: XHTML
538 public function doHeader( $opts ) {
539 global $wgScript, $wgOut;
541 $this->setTopText( $wgOut, $opts );
543 $defaults = $opts->getAllValues();
544 $nondefaults = $opts->getChangedValues();
545 $opts->consumeValues( array(
546 'namespace', 'invert', 'associated', 'tagfilter',
547 'categories', 'categories_any'
551 $panel[] = $this->optionsPanel( $defaults, $nondefaults );
554 $extraOpts = $this->getExtraOptions( $opts );
555 $extraOptsCount = count( $extraOpts );
557 $submit = ' ' . Xml
::submitbutton( wfMsg( 'allpagessubmit' ) );
559 $out = Xml
::openElement( 'table', array( 'class' => 'mw-recentchanges-table' ) );
560 foreach( $extraOpts as $optionRow ) {
561 # Add submit button to the last row only
563 $addSubmit = $count === $extraOptsCount ?
$submit : '';
565 $out .= Xml
::openElement( 'tr' );
566 if( is_array( $optionRow ) ) {
567 $out .= Xml
::tags( 'td', array( 'class' => 'mw-label' ), $optionRow[0] );
568 $out .= Xml
::tags( 'td', array( 'class' => 'mw-input' ), $optionRow[1] . $addSubmit );
570 $out .= Xml
::tags( 'td', array( 'class' => 'mw-input', 'colspan' => 2 ), $optionRow . $addSubmit );
572 $out .= Xml
::closeElement( 'tr' );
574 $out .= Xml
::closeElement( 'table' );
576 $unconsumed = $opts->getUnconsumedValues();
577 foreach( $unconsumed as $key => $value ) {
578 $out .= Html
::hidden( $key, $value );
581 $t = $this->getTitle();
582 $out .= Html
::hidden( 'title', $t->getPrefixedText() );
583 $form = Xml
::tags( 'form', array( 'action' => $wgScript ), $out );
585 $panelString = implode( "\n", $panel );
588 Xml
::fieldset( wfMsg( 'recentchanges-legend' ), $panelString, array( 'class' => 'rcoptions' ) )
591 $this->setBottomText( $wgOut, $opts );
595 * Get options to be displayed in a form
597 * @param $opts FormOptions
600 function getExtraOptions( $opts ) {
601 $extraOpts = array();
602 $extraOpts['namespace'] = $this->namespaceFilterForm( $opts );
604 global $wgAllowCategorizedRecentChanges;
605 if( $wgAllowCategorizedRecentChanges ) {
606 $extraOpts['category'] = $this->categoryFilterForm( $opts );
609 $tagFilter = ChangeTags
::buildTagFilterSelector( $opts['tagfilter'] );
610 if ( count( $tagFilter ) ) {
611 $extraOpts['tagfilter'] = $tagFilter;
614 wfRunHooks( 'SpecialRecentChangesPanel', array( &$extraOpts, $opts ) );
619 * Send the text to be displayed above the options
621 * @param $out OutputPage
622 * @param $opts FormOptions
624 function setTopText( OutputPage
$out, FormOptions
$opts ) {
625 $out->addWikiText( wfMsgForContentNoTrans( 'recentchangestext' ) );
629 * Send the text to be displayed after the options, for use in
630 * Recentchangeslinked
632 * @param $out OutputPage
633 * @param $opts FormOptions
635 function setBottomText( OutputPage
$out, FormOptions
$opts ) {}
638 * Creates the choose namespace selection
640 * @todo Uses radio buttons (HASHAR)
641 * @param $opts FormOptions
644 protected function namespaceFilterForm( FormOptions
$opts ) {
645 $nsSelect = Xml
::namespaceSelector( $opts['namespace'], '' );
646 $nsLabel = Xml
::label( wfMsg( 'namespace' ), 'namespace' );
647 $invert = Xml
::checkLabel(
648 wfMsg( 'invert' ), 'invert', 'nsinvert',
650 array( 'title' => wfMsg( 'tooltip-invert' ) )
652 $associated = Xml
::checkLabel(
653 wfMsg( 'namespace_association' ), 'associated', 'nsassociated',
655 array( 'title' => wfMsg( 'tooltip-namespace_association' ) )
657 return array( $nsLabel, "$nsSelect $invert $associated" );
661 * Create a input to filter changes by categories
663 * @param $opts FormOptions
666 protected function categoryFilterForm( FormOptions
$opts ) {
667 list( $label, $input ) = Xml
::inputLabelSep( wfMsg( 'rc_categories' ),
668 'categories', 'mw-categories', false, $opts['categories'] );
670 $input .= ' ' . Xml
::checkLabel( wfMsg( 'rc_categories_any' ),
671 'categories_any', 'mw-categories_any', $opts['categories_any'] );
673 return array( $label, $input );
677 * Filter $rows by categories set in $opts
679 * @param $rows Array of database rows
680 * @param $opts FormOptions
682 function filterByCategories( &$rows, FormOptions
$opts ) {
683 $categories = array_map( 'trim', explode( '|' , $opts['categories'] ) );
685 if( !count( $categories ) ) {
691 foreach( $categories as $cat ) {
703 foreach( $rows as $k => $r ) {
704 $nt = Title
::makeTitle( $r->rc_namespace
, $r->rc_title
);
705 $id = $nt->getArticleID();
707 continue; # Page might have been deleted...
709 if( !in_array( $id, $articles ) ) {
712 if( !isset( $a2r[$id] ) ) {
720 if( !count( $articles ) ||
!count( $cats ) ) {
725 $c = new Categoryfinder
;
726 $c->seed( $articles, $cats, $opts['categories_any'] ?
'OR' : 'AND' );
731 foreach( $match as $id ) {
732 foreach( $a2r[$id] as $rev ) {
734 $newrows[$k] = $rowsarr[$k];
741 * Makes change an option link which carries all the other options
743 * @param $title Title
744 * @param $override Array: options to override
745 * @param $options Array: current options
746 * @param $active Boolean: whether to show the link in bold
748 function makeOptionsLink( $title, $override, $options, $active = false ) {
749 $params = $override +
$options;
751 return $this->getSkin()->link(
753 '<strong>' . htmlspecialchars( $title ) . '</strong>',
754 array(), $params, array( 'known' ) );
756 return $this->getSkin()->link(
757 $this->getTitle(), htmlspecialchars( $title ), array(),
758 $params, array( 'known' ) );
763 * Creates the options panel.
765 * @param $defaults Array
766 * @param $nondefaults Array
768 function optionsPanel( $defaults, $nondefaults ) {
769 global $wgLang, $wgRCLinkLimits, $wgRCLinkDays;
771 $options = $nondefaults +
$defaults;
774 if( !wfEmptyMsg( 'rclegend' ) ) {
775 $note .= '<div class="mw-rclegend">' .
776 wfMsgExt( 'rclegend', array( 'parseinline' ) ) . "</div>\n";
778 if( $options['from'] ) {
779 $note .= wfMsgExt( 'rcnotefrom', array( 'parseinline' ),
780 $wgLang->formatNum( $options['limit'] ),
781 $wgLang->timeanddate( $options['from'], true ),
782 $wgLang->date( $options['from'], true ),
783 $wgLang->time( $options['from'], true ) ) . '<br />';
786 # Sort data for display and make sure it's unique after we've added user data.
787 $wgRCLinkLimits[] = $options['limit'];
788 $wgRCLinkDays[] = $options['days'];
789 sort( $wgRCLinkLimits );
790 sort( $wgRCLinkDays );
791 $wgRCLinkLimits = array_unique( $wgRCLinkLimits );
792 $wgRCLinkDays = array_unique( $wgRCLinkDays );
795 foreach( $wgRCLinkLimits as $value ) {
796 $cl[] = $this->makeOptionsLink( $wgLang->formatNum( $value ),
797 array( 'limit' => $value ), $nondefaults, $value == $options['limit'] );
799 $cl = $wgLang->pipeList( $cl );
801 // day links, reset 'from' to none
802 foreach( $wgRCLinkDays as $value ) {
803 $dl[] = $this->makeOptionsLink( $wgLang->formatNum( $value ),
804 array( 'days' => $value, 'from' => '' ), $nondefaults, $value == $options['days'] );
806 $dl = $wgLang->pipeList( $dl );
810 $showhide = array( wfMsg( 'show' ), wfMsg( 'hide' ) );
812 'hideminor' => 'rcshowhideminor',
813 'hidebots' => 'rcshowhidebots',
814 'hideanons' => 'rcshowhideanons',
815 'hideliu' => 'rcshowhideliu',
816 'hidepatrolled' => 'rcshowhidepatr',
817 'hidemyself' => 'rcshowhidemine'
819 foreach ( $this->customFilters
as $key => $params ) {
820 $filters[$key] = $params['msg'];
822 // Disable some if needed
823 if ( !$this->getUser()->useRCPatrol() ) {
824 unset( $filters['hidepatrolled'] );
828 foreach ( $filters as $key => $msg ) {
829 $link = $this->makeOptionsLink( $showhide[1 - $options[$key]],
830 array( $key => 1-$options[$key] ), $nondefaults );
831 $links[] = wfMsgHtml( $msg, $link );
834 // show from this onward link
835 $timestamp = wfTimestampNow();
836 $now = $wgLang->timeanddate( $timestamp, true );
837 $tl = $this->makeOptionsLink(
838 $now, array( 'from' => $timestamp ), $nondefaults
841 $rclinks = wfMsgExt( 'rclinks', array( 'parseinline', 'replaceafter' ),
842 $cl, $dl, $wgLang->pipeList( $links ) );
843 $rclistfrom = wfMsgExt( 'rclistfrom', array( 'parseinline', 'replaceafter' ), $tl );
844 return "{$note}$rclinks<br />$rclistfrom";
848 * add javascript specific to the [[Special:RecentChanges]] page
850 function addRecentChangesJS() {
852 $wgOut->addModules( array(
853 'mediawiki.special.recentchanges',