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;
32 public function __construct( $name = 'Recentchanges' ) {
33 parent
::__construct( $name );
37 * Get a FormOptions object containing the default options
41 public function getDefaultOptions() {
42 $opts = new FormOptions();
44 $opts->add( 'days', (int)$this->getUser()->getOption( 'rcdays' ) );
45 $opts->add( 'limit', (int)$this->getUser()->getOption( 'rclimit' ) );
46 $opts->add( 'from', '' );
48 $opts->add( 'hideminor', $this->getUser()->getBoolOption( 'hideminor' ) );
49 $opts->add( 'hidebots', true );
50 $opts->add( 'hideanons', false );
51 $opts->add( 'hideliu', false );
52 $opts->add( 'hidepatrolled', $this->getUser()->getBoolOption( 'hidepatrolled' ) );
53 $opts->add( 'hidemyself', false );
55 $opts->add( 'namespace', '', FormOptions
::INTNULL
);
56 $opts->add( 'invert', false );
57 $opts->add( 'associated', false );
59 $opts->add( 'categories', '' );
60 $opts->add( 'categories_any', false );
61 $opts->add( 'tagfilter', '' );
66 * Create a FormOptions object with options as specified by the user
70 public function setup( $parameters ) {
73 $opts = $this->getDefaultOptions();
74 $opts->fetchValuesFromRequest( $wgRequest );
76 // Give precedence to subpage syntax
77 if( $parameters !== null ) {
78 $this->parseParameters( $parameters, $opts );
81 $opts->validateIntBounds( 'limit', 0, 5000 );
86 * Create a FormOptions object specific for feed requests and return it
90 public function feedSetup() {
91 global $wgFeedLimit, $wgRequest;
92 $opts = $this->getDefaultOptions();
93 # Feed is cached on limit,hideminor,namespace; other params would randomly not work
94 $opts->fetchValuesFromRequest( $wgRequest, array( 'limit', 'hideminor', 'namespace' ) );
95 $opts->validateIntBounds( 'limit', 0, $wgFeedLimit );
100 * Get the current FormOptions for this request
102 public function getOptions() {
103 if ( $this->rcOptions
=== null ) {
105 $feedFormat = $wgRequest->getVal( 'feed' );
106 $this->rcOptions
= $feedFormat ?
$this->feedSetup() : $this->setup( $this->rcSubpage
);
108 return $this->rcOptions
;
113 * Main execution point
115 * @param $subpage String
117 public function execute( $subpage ) {
118 global $wgRequest, $wgOut;
119 $this->rcSubpage
= $subpage;
120 $feedFormat = $wgRequest->getVal( 'feed' );
122 # 10 seconds server-side caching max
123 $wgOut->setSquidMaxage( 10 );
124 # Check if the client has a cached version
125 $lastmod = $this->checkLastModified( $feedFormat );
126 if( $lastmod === false ) {
130 $opts = $this->getOptions();
132 $this->outputHeader();
134 // Fetch results, prepare a batch link existence check query
135 $conds = $this->buildMainQueryConds( $opts );
136 $rows = $this->doMainQuery( $conds, $opts );
137 if( $rows === false ){
138 if( !$this->including() ) {
139 $this->doHeader( $opts );
145 $batch = new LinkBatch
;
146 foreach( $rows as $row ) {
147 $batch->add( NS_USER
, $row->rc_user_text
);
148 $batch->add( NS_USER_TALK
, $row->rc_user_text
);
149 $batch->add( $row->rc_namespace
, $row->rc_title
);
154 list( $changesFeed, $formatter ) = $this->getFeedObject( $feedFormat );
155 $changesFeed->execute( $formatter, $rows, $lastmod, $opts );
157 $this->webOutput( $rows, $opts );
164 * Return an array with a ChangesFeed object and ChannelFeed object
168 public function getFeedObject( $feedFormat ){
169 $changesFeed = new ChangesFeed( $feedFormat, 'rcfeed' );
170 $formatter = $changesFeed->getFeedObject(
171 wfMsgForContent( 'recentchanges' ),
172 wfMsgForContent( 'recentchanges-feed-description' ),
173 $this->getTitle()->getFullUrl()
175 return array( $changesFeed, $formatter );
179 * Process $par and put options found if $opts
180 * Mainly used when including the page
183 * @param $opts FormOptions
185 public function parseParameters( $par, FormOptions
$opts ) {
186 $bits = preg_split( '/\s*,\s*/', trim( $par ) );
187 foreach( $bits as $bit ) {
188 if( 'hidebots' === $bit ) $opts['hidebots'] = true;
189 if( 'bots' === $bit ) $opts['hidebots'] = false;
190 if( 'hideminor' === $bit ) $opts['hideminor'] = true;
191 if( 'minor' === $bit ) $opts['hideminor'] = false;
192 if( 'hideliu' === $bit ) $opts['hideliu'] = true;
193 if( 'hidepatrolled' === $bit ) $opts['hidepatrolled'] = true;
194 if( 'hideanons' === $bit ) $opts['hideanons'] = true;
195 if( 'hidemyself' === $bit ) $opts['hidemyself'] = true;
197 if( is_numeric( $bit ) ) $opts['limit'] = $bit;
200 if( preg_match( '/^limit=(\d+)$/', $bit, $m ) ) $opts['limit'] = $m[1];
201 if( preg_match( '/^days=(\d+)$/', $bit, $m ) ) $opts['days'] = $m[1];
206 * Get last modified date, for client caching
207 * Don't use this if we are using the patrol feature, patrol changes don't
208 * update the timestamp
210 * @param $feedFormat String
211 * @return String or false
213 public function checkLastModified( $feedFormat ) {
214 $dbr = wfGetDB( DB_SLAVE
);
215 $lastmod = $dbr->selectField( 'recentchanges', 'MAX(rc_timestamp)', false, __METHOD__
);
216 if( $feedFormat ||
!$this->getUser()->useRCPatrol() ) {
217 if( $lastmod && $this->getOutput()->checkLastModified( $lastmod ) ) {
218 # Client cache fresh and headers sent, nothing more to do.
226 * Return an array of conditions depending of options set in $opts
228 * @param $opts FormOptions
231 public function buildMainQueryConds( FormOptions
$opts ) {
232 $dbr = wfGetDB( DB_SLAVE
);
235 # It makes no sense to hide both anons and logged-in users
236 # Where this occurs, force anons to be shown
238 if( $opts['hideanons'] && $opts['hideliu'] ){
239 # Check if the user wants to show bots only
240 if( $opts['hidebots'] ){
241 $opts['hideanons'] = false;
244 $opts['hidebots'] = false;
249 $cutoff_unixtime = time() - ( $opts['days'] * 86400 );
250 $cutoff_unixtime = $cutoff_unixtime - ($cutoff_unixtime %
86400);
251 $cutoff = $dbr->timestamp( $cutoff_unixtime );
253 $fromValid = preg_match('/^[0-9]{14}$/', $opts['from']);
254 if( $fromValid && $opts['from'] > wfTimestamp(TS_MW
,$cutoff) ) {
255 $cutoff = $dbr->timestamp($opts['from']);
257 $opts->reset( 'from' );
260 $conds[] = 'rc_timestamp >= ' . $dbr->addQuotes( $cutoff );
263 $hidePatrol = $this->getUser()->useRCPatrol() && $opts['hidepatrolled'];
264 $hideLoggedInUsers = $opts['hideliu'] && !$forcebot;
265 $hideAnonymousUsers = $opts['hideanons'] && !$forcebot;
267 if( $opts['hideminor'] ) $conds['rc_minor'] = 0;
268 if( $opts['hidebots'] ) $conds['rc_bot'] = 0;
269 if( $hidePatrol ) $conds['rc_patrolled'] = 0;
270 if( $forcebot ) $conds['rc_bot'] = 1;
271 if( $hideLoggedInUsers ) $conds[] = 'rc_user = 0';
272 if( $hideAnonymousUsers ) $conds[] = 'rc_user != 0';
274 if( $opts['hidemyself'] ) {
275 if( $this->getUser()->getId() ) {
276 $conds[] = 'rc_user != ' . $dbr->addQuotes( $this->getUser()->getId() );
278 $conds[] = 'rc_user_text != ' . $dbr->addQuotes( $this->getUser()->getName() );
282 # Namespace filtering
283 if( $opts['namespace'] !== '' ) {
284 $selectedNS = $dbr->addQuotes( $opts['namespace'] );
285 $operator = $opts['invert'] ?
'!=' : '=';
286 $boolean = $opts['invert'] ?
'AND' : 'OR';
288 # namespace association (bug 2429)
289 if( !$opts['associated'] ) {
290 $condition = "rc_namespace $operator $selectedNS";
292 # Also add the associated namespace
293 $associatedNS = $dbr->addQuotes(
294 MWNamespace
::getAssociated( $opts['namespace'] )
296 $condition = "(rc_namespace $operator $selectedNS "
298 . " rc_namespace $operator $associatedNS)";
301 $conds[] = $condition;
309 * @param $conds Array
310 * @param $opts FormOptions
311 * @return database result or false (for Recentchangeslinked only)
313 public function doMainQuery( $conds, $opts ) {
314 $tables = array( 'recentchanges' );
315 $join_conds = array();
316 $query_options = array( 'USE INDEX' => array('recentchanges' => 'rc_timestamp') );
318 $uid = $this->getUser()->getId();
319 $dbr = wfGetDB( DB_SLAVE
);
320 $limit = $opts['limit'];
321 $namespace = $opts['namespace'];
323 $invert = $opts['invert'];
325 // JOIN on watchlist for users
327 $tables[] = 'watchlist';
328 $join_conds['watchlist'] = array('LEFT JOIN',
329 "wl_user={$uid} AND wl_title=rc_title AND wl_namespace=rc_namespace");
331 if ($this->getUser()->isAllowed("rollback")) {
333 $join_conds['page'] = array('LEFT JOIN', 'rc_cur_id=page_id');
335 if ( !$this->including() ) {
337 // Doesn't work when transcluding. See bug 23293
339 // Fields are * in this case, so let the function modify an empty array to keep it happy.
340 ChangeTags
::modifyDisplayQuery(
341 $tables, $fields, $conds, $join_conds, $query_options, $opts['tagfilter']
345 if ( !wfRunHooks( 'SpecialRecentChangesQuery', array( &$conds, &$tables, &$join_conds, $opts, &$query_options, &$select ) ) )
348 // Don't use the new_namespace_time timestamp index if:
349 // (a) "All namespaces" selected
350 // (b) We want all pages NOT in a certain namespaces (inverted)
351 // (c) There is a tag to filter on (use tag index instead)
352 // (d) UNION + sort/limit is not an option for the DBMS
353 if( is_null( $namespace )
354 ||
( $invert && !is_null( $namespace ) )
355 ||
$opts['tagfilter'] != ''
356 ||
!$dbr->unionSupportsOrderAndLimit() )
358 $res = $dbr->select( $tables, '*', $conds, __METHOD__
,
359 array( 'ORDER BY' => 'rc_timestamp DESC', 'LIMIT' => $limit ) +
362 // We have a new_namespace_time index! UNION over new=(0,1) and sort result set!
365 $sqlNew = $dbr->selectSQLText( $tables, $select,
366 array( 'rc_new' => 1 ) +
$conds,
368 array( 'ORDER BY' => 'rc_timestamp DESC', 'LIMIT' => $limit,
369 'USE INDEX' => array('recentchanges' => 'rc_timestamp') ),
372 $sqlOld = $dbr->selectSQLText( $tables, '*',
373 array( 'rc_new' => 0 ) +
$conds,
375 array( 'ORDER BY' => 'rc_timestamp DESC', 'LIMIT' => $limit,
376 'USE INDEX' => array('recentchanges' => 'rc_timestamp') ),
378 # Join the two fast queries, and sort the result set
379 $sql = $dbr->unionQueries(array($sqlNew, $sqlOld), false).' ORDER BY rc_timestamp DESC';
380 $sql = $dbr->limitResult($sql, $limit, false);
381 $res = $dbr->query( $sql, __METHOD__
);
388 * Send output to $wgOut, only called if not used feeds
390 * @param $rows Array of database rows
391 * @param $opts FormOptions
393 public function webOutput( $rows, $opts ) {
394 global $wgOut, $wgRCShowWatchingUsers, $wgShowUpdatedMarker;
395 global $wgAllowCategorizedRecentChanges;
397 $limit = $opts['limit'];
399 if( !$this->including() ) {
400 // Output options box
401 $this->doHeader( $opts );
404 // And now for the content
405 $wgOut->setFeedAppendQuery( $this->getFeedQuery() );
407 if( $wgAllowCategorizedRecentChanges ) {
408 $this->filterByCategories( $rows, $opts );
411 $showWatcherCount = $wgRCShowWatchingUsers && $this->getUser()->getOption( 'shownumberswatching' );
412 $watcherCache = array();
414 $dbr = wfGetDB( DB_SLAVE
);
417 $list = ChangesList
::newFromUser( $this->getUser() );
419 $s = $list->beginRecentChangesList();
420 foreach( $rows as $obj ) {
421 if( $limit == 0 ) break;
422 $rc = RecentChange
::newFromRow( $obj );
423 $rc->counter
= $counter++
;
424 # Check if the page has been updated since the last visit
425 if( $wgShowUpdatedMarker && !empty($obj->wl_notificationtimestamp
) ) {
426 $rc->notificationtimestamp
= ($obj->rc_timestamp
>= $obj->wl_notificationtimestamp
);
428 $rc->notificationtimestamp
= false; // Default
430 # Check the number of users watching the page
431 $rc->numberofWatchingusers
= 0; // Default
432 if( $showWatcherCount && $obj->rc_namespace
>= 0 ) {
433 if( !isset($watcherCache[$obj->rc_namespace
][$obj->rc_title
]) ) {
434 $watcherCache[$obj->rc_namespace
][$obj->rc_title
] =
435 $dbr->selectField( 'watchlist',
438 'wl_namespace' => $obj->rc_namespace
,
439 'wl_title' => $obj->rc_title
,
441 __METHOD__
. '-watchers' );
443 $rc->numberofWatchingusers
= $watcherCache[$obj->rc_namespace
][$obj->rc_title
];
445 $s .= $list->recentChangesLine( $rc, !empty( $obj->wl_user
), $counter );
448 $s .= $list->endRecentChangesList();
449 $wgOut->addHTML( $s );
453 * Get the query string to append to feed link URLs.
454 * This is overridden by RCL to add the target parameter
456 public function getFeedQuery() {
461 * Return the text to be displayed above the changes
463 * @param $opts FormOptions
464 * @return String: XHTML
466 public function doHeader( $opts ) {
467 global $wgScript, $wgOut;
469 $this->setTopText( $wgOut, $opts );
471 $defaults = $opts->getAllValues();
472 $nondefaults = $opts->getChangedValues();
473 $opts->consumeValues( array( 'namespace', 'invert', 'associated', 'tagfilter',
474 'categories', 'categories_any' ) );
477 $panel[] = $this->optionsPanel( $defaults, $nondefaults );
480 $extraOpts = $this->getExtraOptions( $opts );
481 $extraOptsCount = count( $extraOpts );
483 $submit = ' ' . Xml
::submitbutton( wfMsg( 'allpagessubmit' ) );
485 $out = Xml
::openElement( 'table', array( 'class' => 'mw-recentchanges-table' ) );
486 foreach( $extraOpts as $optionRow ) {
487 # Add submit button to the last row only
489 $addSubmit = $count === $extraOptsCount ?
$submit : '';
491 $out .= Xml
::openElement( 'tr' );
492 if( is_array( $optionRow ) ) {
493 $out .= Xml
::tags( 'td', array( 'class' => 'mw-label' ), $optionRow[0] );
494 $out .= Xml
::tags( 'td', array( 'class' => 'mw-input' ), $optionRow[1] . $addSubmit );
496 $out .= Xml
::tags( 'td', array( 'class' => 'mw-input', 'colspan' => 2 ), $optionRow . $addSubmit );
498 $out .= Xml
::closeElement( 'tr' );
500 $out .= Xml
::closeElement( 'table' );
502 $unconsumed = $opts->getUnconsumedValues();
503 foreach( $unconsumed as $key => $value ) {
504 $out .= Html
::hidden( $key, $value );
507 $t = $this->getTitle();
508 $out .= Html
::hidden( 'title', $t->getPrefixedText() );
509 $form = Xml
::tags( 'form', array( 'action' => $wgScript ), $out );
511 $panelString = implode( "\n", $panel );
514 Xml
::fieldset( wfMsg( 'recentchanges-legend' ), $panelString, array( 'class' => 'rcoptions' ) )
517 $this->setBottomText( $wgOut, $opts );
521 * Get options to be displayed in a form
523 * @param $opts FormOptions
526 function getExtraOptions( $opts ){
527 $extraOpts = array();
528 $extraOpts['namespace'] = $this->namespaceFilterForm( $opts );
530 global $wgAllowCategorizedRecentChanges;
531 if( $wgAllowCategorizedRecentChanges ) {
532 $extraOpts['category'] = $this->categoryFilterForm( $opts );
535 $tagFilter = ChangeTags
::buildTagFilterSelector( $opts['tagfilter'] );
536 if ( count($tagFilter) )
537 $extraOpts['tagfilter'] = $tagFilter;
539 wfRunHooks( 'SpecialRecentChangesPanel', array( &$extraOpts, $opts ) );
544 * Send the text to be displayed above the options
546 * @param $out OutputPage
547 * @param $opts FormOptions
549 function setTopText( OutputPage
$out, FormOptions
$opts ){
550 $message = wfMessage( 'recentchangestext' )->inContentLanguage();
551 if ( !$message->isDisabled() ) {
552 $out->addWikiText( $message->plain() );
557 * Send the text to be displayed after the options, for use in
558 * Recentchangeslinked
560 * @param $out OutputPage
561 * @param $opts FormOptions
563 function setBottomText( OutputPage
$out, FormOptions
$opts ){}
566 * Creates the choose namespace selection
568 * @todo Uses radio buttons (HASHAR)
569 * @param $opts FormOptions
572 protected function namespaceFilterForm( FormOptions
$opts ) {
573 $nsSelect = Xml
::namespaceSelector( $opts['namespace'], '' );
574 $nsLabel = Xml
::label( wfMsg('namespace'), 'namespace' );
575 $invert = Xml
::checkLabel( wfMsg('invert'), 'invert', 'nsinvert', $opts['invert'] );
576 $associated = Xml
::checkLabel( wfMsg('namespace_association'), 'associated', 'nsassociated', $opts['associated'] );
577 return array( $nsLabel, "$nsSelect $invert $associated" );
581 * Create a input to filter changes by categories
583 * @param $opts FormOptions
586 protected function categoryFilterForm( FormOptions
$opts ) {
587 list( $label, $input ) = Xml
::inputLabelSep( wfMsg('rc_categories'),
588 'categories', 'mw-categories', false, $opts['categories'] );
590 $input .= ' ' . Xml
::checkLabel( wfMsg('rc_categories_any'),
591 'categories_any', 'mw-categories_any', $opts['categories_any'] );
593 return array( $label, $input );
597 * Filter $rows by categories set in $opts
599 * @param $rows Array of database rows
600 * @param $opts FormOptions
602 function filterByCategories( &$rows, FormOptions
$opts ) {
603 $categories = array_map( 'trim', explode( '|' , $opts['categories'] ) );
605 if( !count( $categories ) ) {
611 foreach( $categories as $cat ) {
613 if( $cat == '' ) continue;
621 foreach( $rows AS $k => $r ) {
622 $nt = Title
::makeTitle( $r->rc_namespace
, $r->rc_title
);
623 $id = $nt->getArticleID();
624 if( $id == 0 ) continue; # Page might have been deleted...
625 if( !in_array( $id, $articles ) ) {
628 if( !isset( $a2r[$id] ) ) {
636 if( !count( $articles ) ||
!count( $cats ) )
640 $c = new Categoryfinder
;
641 $c->seed( $articles, $cats, $opts['categories_any'] ?
"OR" : "AND" ) ;
646 foreach( $match AS $id ) {
647 foreach( $a2r[$id] AS $rev ) {
649 $newrows[$k] = $rowsarr[$k];
656 * Makes change an option link which carries all the other options
658 * @param $title Title
659 * @param $override Array: options to override
660 * @param $options Array: current options
661 * @param $active Boolean: whether to show the link in bold
663 function makeOptionsLink( $title, $override, $options, $active = false ) {
664 $params = $override +
$options;
666 return $this->getSkin()->link( $this->getTitle(), '<strong>' . htmlspecialchars( $title ) . '</strong>',
667 array(), $params, array( 'known' ) );
669 return $this->getSkin()->link( $this->getTitle(), htmlspecialchars( $title ), array() , $params, array( 'known' ) );
674 * Creates the options panel.
676 * @param $defaults Array
677 * @param $nondefaults Array
679 function optionsPanel( $defaults, $nondefaults ) {
680 global $wgLang, $wgRCLinkLimits, $wgRCLinkDays;
682 $options = $nondefaults +
$defaults;
685 if( !wfEmptyMsg( 'rclegend' ) ) {
686 $note .= '<div class="mw-rclegend">' . wfMsgExt( 'rclegend', array('parseinline') ) . "</div>\n";
688 if( $options['from'] ) {
689 $note .= wfMsgExt( 'rcnotefrom', array( 'parseinline' ),
690 $wgLang->formatNum( $options['limit'] ),
691 $wgLang->timeanddate( $options['from'], true ),
692 $wgLang->date( $options['from'], true ),
693 $wgLang->time( $options['from'], true ) ) . '<br />';
696 # Sort data for display and make sure it's unique after we've added user data.
697 $wgRCLinkLimits[] = $options['limit'];
698 $wgRCLinkDays[] = $options['days'];
699 sort( $wgRCLinkLimits );
700 sort( $wgRCLinkDays );
701 $wgRCLinkLimits = array_unique( $wgRCLinkLimits );
702 $wgRCLinkDays = array_unique( $wgRCLinkDays );
705 foreach( $wgRCLinkLimits as $value ) {
706 $cl[] = $this->makeOptionsLink( $wgLang->formatNum( $value ),
707 array( 'limit' => $value ), $nondefaults, $value == $options['limit'] ) ;
709 $cl = $wgLang->pipeList( $cl );
711 // day links, reset 'from' to none
712 foreach( $wgRCLinkDays as $value ) {
713 $dl[] = $this->makeOptionsLink( $wgLang->formatNum( $value ),
714 array( 'days' => $value, 'from' => '' ), $nondefaults, $value == $options['days'] ) ;
716 $dl = $wgLang->pipeList( $dl );
720 $showhide = array( wfMsg( 'show' ), wfMsg( 'hide' ) );
721 $minorLink = $this->makeOptionsLink( $showhide[1-$options['hideminor']],
722 array( 'hideminor' => 1-$options['hideminor'] ), $nondefaults);
723 $botLink = $this->makeOptionsLink( $showhide[1-$options['hidebots']],
724 array( 'hidebots' => 1-$options['hidebots'] ), $nondefaults);
725 $anonsLink = $this->makeOptionsLink( $showhide[ 1 - $options['hideanons'] ],
726 array( 'hideanons' => 1 - $options['hideanons'] ), $nondefaults );
727 $liuLink = $this->makeOptionsLink( $showhide[1-$options['hideliu']],
728 array( 'hideliu' => 1-$options['hideliu'] ), $nondefaults);
729 $patrLink = $this->makeOptionsLink( $showhide[1-$options['hidepatrolled']],
730 array( 'hidepatrolled' => 1-$options['hidepatrolled'] ), $nondefaults);
731 $myselfLink = $this->makeOptionsLink( $showhide[1-$options['hidemyself']],
732 array( 'hidemyself' => 1-$options['hidemyself'] ), $nondefaults);
734 $links[] = wfMsgHtml( 'rcshowhideminor', $minorLink );
735 $links[] = wfMsgHtml( 'rcshowhidebots', $botLink );
736 $links[] = wfMsgHtml( 'rcshowhideanons', $anonsLink );
737 $links[] = wfMsgHtml( 'rcshowhideliu', $liuLink );
738 if( $this->getUser()->useRCPatrol() )
739 $links[] = wfMsgHtml( 'rcshowhidepatr', $patrLink );
740 $links[] = wfMsgHtml( 'rcshowhidemine', $myselfLink );
741 $hl = $wgLang->pipeList( $links );
743 // show from this onward link
744 $now = $wgLang->timeanddate( wfTimestampNow(), true );
745 $tl = $this->makeOptionsLink( $now, array( 'from' => wfTimestampNow() ), $nondefaults );
747 $rclinks = wfMsgExt( 'rclinks', array( 'parseinline', 'replaceafter' ),
749 $rclistfrom = wfMsgExt( 'rclistfrom', array( 'parseinline', 'replaceafter' ), $tl );
750 return "{$note}$rclinks<br />$rclistfrom";