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() {
43 $opts = new FormOptions();
45 $opts->add( 'days', (int)$wgUser->getOption( 'rcdays' ) );
46 $opts->add( 'limit', (int)$wgUser->getOption( 'rclimit' ) );
47 $opts->add( 'from', '' );
49 $opts->add( 'hideminor', $wgUser->getBoolOption( 'hideminor' ) );
50 $opts->add( 'hidebots', true );
51 $opts->add( 'hideanons', false );
52 $opts->add( 'hideliu', false );
53 $opts->add( 'hidepatrolled', $wgUser->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
71 public function setup( $parameters ) {
74 $opts = $this->getDefaultOptions();
75 $opts->fetchValuesFromRequest( $wgRequest );
77 // Give precedence to subpage syntax
78 if( $parameters !== null ) {
79 $this->parseParameters( $parameters, $opts );
82 $opts->validateIntBounds( 'limit', 0, 5000 );
87 * Create a FormOptions object specific for feed requests and return it
91 public function feedSetup() {
92 global $wgFeedLimit, $wgRequest;
93 $opts = $this->getDefaultOptions();
94 # Feed is cached on limit,hideminor,namespace; other params would randomly not work
95 $opts->fetchValuesFromRequest( $wgRequest, array( 'limit', 'hideminor', 'namespace' ) );
96 $opts->validateIntBounds( 'limit', 0, $wgFeedLimit );
101 * Get the current FormOptions for this request
103 public function getOptions() {
104 if ( $this->rcOptions
=== null ) {
106 $feedFormat = $wgRequest->getVal( 'feed' );
107 $this->rcOptions
= $feedFormat ?
$this->feedSetup() : $this->setup( $this->rcSubpage
);
109 return $this->rcOptions
;
114 * Main execution point
116 * @param $subpage String
118 public function execute( $subpage ) {
119 global $wgRequest, $wgOut;
120 $this->rcSubpage
= $subpage;
121 $feedFormat = $wgRequest->getVal( 'feed' );
123 # 10 seconds server-side caching max
124 $wgOut->setSquidMaxage( 10 );
125 # Check if the client has a cached version
126 $lastmod = $this->checkLastModified( $feedFormat );
127 if( $lastmod === false ) {
131 $opts = $this->getOptions();
133 $this->outputHeader();
135 // Fetch results, prepare a batch link existence check query
136 $conds = $this->buildMainQueryConds( $opts );
137 $rows = $this->doMainQuery( $conds, $opts );
138 if( $rows === false ){
139 if( !$this->including() ) {
140 $this->doHeader( $opts );
146 $batch = new LinkBatch
;
147 foreach( $rows as $row ) {
148 $batch->add( NS_USER
, $row->rc_user_text
);
149 $batch->add( NS_USER_TALK
, $row->rc_user_text
);
150 $batch->add( $row->rc_namespace
, $row->rc_title
);
155 list( $changesFeed, $formatter ) = $this->getFeedObject( $feedFormat );
156 $changesFeed->execute( $formatter, $rows, $lastmod, $opts );
158 $this->webOutput( $rows, $opts );
165 * Return an array with a ChangesFeed object and ChannelFeed object
169 public function getFeedObject( $feedFormat ){
170 $changesFeed = new ChangesFeed( $feedFormat, 'rcfeed' );
171 $formatter = $changesFeed->getFeedObject(
172 wfMsgForContent( 'recentchanges' ),
173 wfMsgForContent( 'recentchanges-feed-description' ),
174 $this->getTitle()->getFullUrl()
176 return array( $changesFeed, $formatter );
180 * Process $par and put options found if $opts
181 * Mainly used when including the page
184 * @param $opts FormOptions
186 public function parseParameters( $par, FormOptions
$opts ) {
187 $bits = preg_split( '/\s*,\s*/', trim( $par ) );
188 foreach( $bits as $bit ) {
189 if( 'hidebots' === $bit ) $opts['hidebots'] = true;
190 if( 'bots' === $bit ) $opts['hidebots'] = false;
191 if( 'hideminor' === $bit ) $opts['hideminor'] = true;
192 if( 'minor' === $bit ) $opts['hideminor'] = false;
193 if( 'hideliu' === $bit ) $opts['hideliu'] = true;
194 if( 'hidepatrolled' === $bit ) $opts['hidepatrolled'] = true;
195 if( 'hideanons' === $bit ) $opts['hideanons'] = true;
196 if( 'hidemyself' === $bit ) $opts['hidemyself'] = true;
198 if( is_numeric( $bit ) ) $opts['limit'] = $bit;
201 if( preg_match( '/^limit=(\d+)$/', $bit, $m ) ) $opts['limit'] = $m[1];
202 if( preg_match( '/^days=(\d+)$/', $bit, $m ) ) $opts['days'] = $m[1];
207 * Get last modified date, for client caching
208 * Don't use this if we are using the patrol feature, patrol changes don't
209 * update the timestamp
211 * @param $feedFormat String
212 * @return String or false
214 public function checkLastModified( $feedFormat ) {
215 global $wgOut, $wgUser;
216 $dbr = wfGetDB( DB_SLAVE
);
217 $lastmod = $dbr->selectField( 'recentchanges', 'MAX(rc_timestamp)', false, __METHOD__
);
218 if( $feedFormat ||
!$wgUser->useRCPatrol() ) {
219 if( $lastmod && $wgOut->checkLastModified( $lastmod ) ) {
220 # Client cache fresh and headers sent, nothing more to do.
228 * Return an array of conditions depending of options set in $opts
230 * @param $opts FormOptions
233 public function buildMainQueryConds( FormOptions
$opts ) {
236 $dbr = wfGetDB( DB_SLAVE
);
239 # It makes no sense to hide both anons and logged-in users
240 # Where this occurs, force anons to be shown
242 if( $opts['hideanons'] && $opts['hideliu'] ){
243 # Check if the user wants to show bots only
244 if( $opts['hidebots'] ){
245 $opts['hideanons'] = false;
248 $opts['hidebots'] = false;
253 $cutoff_unixtime = time() - ( $opts['days'] * 86400 );
254 $cutoff_unixtime = $cutoff_unixtime - ($cutoff_unixtime %
86400);
255 $cutoff = $dbr->timestamp( $cutoff_unixtime );
257 $fromValid = preg_match('/^[0-9]{14}$/', $opts['from']);
258 if( $fromValid && $opts['from'] > wfTimestamp(TS_MW
,$cutoff) ) {
259 $cutoff = $dbr->timestamp($opts['from']);
261 $opts->reset( 'from' );
264 $conds[] = 'rc_timestamp >= ' . $dbr->addQuotes( $cutoff );
267 $hidePatrol = $wgUser->useRCPatrol() && $opts['hidepatrolled'];
268 $hideLoggedInUsers = $opts['hideliu'] && !$forcebot;
269 $hideAnonymousUsers = $opts['hideanons'] && !$forcebot;
271 if( $opts['hideminor'] ) $conds['rc_minor'] = 0;
272 if( $opts['hidebots'] ) $conds['rc_bot'] = 0;
273 if( $hidePatrol ) $conds['rc_patrolled'] = 0;
274 if( $forcebot ) $conds['rc_bot'] = 1;
275 if( $hideLoggedInUsers ) $conds[] = 'rc_user = 0';
276 if( $hideAnonymousUsers ) $conds[] = 'rc_user != 0';
278 if( $opts['hidemyself'] ) {
279 if( $wgUser->getId() ) {
280 $conds[] = 'rc_user != ' . $dbr->addQuotes( $wgUser->getId() );
282 $conds[] = 'rc_user_text != ' . $dbr->addQuotes( $wgUser->getName() );
286 # Namespace filtering
287 if( $opts['namespace'] !== '' ) {
288 $selectedNS = $dbr->addQuotes( $opts['namespace'] );
289 $operator = $opts['invert'] ?
'!=' : '=';
290 $boolean = $opts['invert'] ?
'AND' : 'OR';
292 # namespace association (bug 2429)
293 if( !$opts['associated'] ) {
294 $condition = "rc_namespace $operator $selectedNS";
296 # Also add the associated namespace
297 $associatedNS = $dbr->addQuotes(
298 MWNamespace
::getAssociated( $opts['namespace'] )
300 $condition = "(rc_namespace $operator $selectedNS "
302 . " rc_namespace $operator $associatedNS)";
305 $conds[] = $condition;
313 * @param $conds Array
314 * @param $opts FormOptions
315 * @return database result or false (for Recentchangeslinked only)
317 public function doMainQuery( $conds, $opts ) {
320 $tables = array( 'recentchanges' );
321 $join_conds = array();
322 $query_options = array( 'USE INDEX' => array('recentchanges' => 'rc_timestamp') );
324 $uid = $wgUser->getId();
325 $dbr = wfGetDB( DB_SLAVE
);
326 $limit = $opts['limit'];
327 $namespace = $opts['namespace'];
329 $invert = $opts['invert'];
331 // JOIN on watchlist for users
333 $tables[] = 'watchlist';
334 $join_conds['watchlist'] = array('LEFT JOIN',
335 "wl_user={$uid} AND wl_title=rc_title AND wl_namespace=rc_namespace");
337 if ($wgUser->isAllowed("rollback")) {
339 $join_conds['page'] = array('LEFT JOIN', 'rc_cur_id=page_id');
341 if ( !$this->including() ) {
343 // Doesn't work when transcluding. See bug 23293
345 // Fields are * in this case, so let the function modify an empty array to keep it happy.
346 ChangeTags
::modifyDisplayQuery(
347 $tables, $fields, $conds, $join_conds, $query_options, $opts['tagfilter']
351 if ( !wfRunHooks( 'SpecialRecentChangesQuery', array( &$conds, &$tables, &$join_conds, $opts, &$query_options, &$select ) ) )
354 // Don't use the new_namespace_time timestamp index if:
355 // (a) "All namespaces" selected
356 // (b) We want all pages NOT in a certain namespaces (inverted)
357 // (c) There is a tag to filter on (use tag index instead)
358 // (d) UNION + sort/limit is not an option for the DBMS
359 if( is_null( $namespace )
360 ||
( $invert && !is_null( $namespace ) )
361 ||
$opts['tagfilter'] != ''
362 ||
!$dbr->unionSupportsOrderAndLimit() )
364 $res = $dbr->select( $tables, '*', $conds, __METHOD__
,
365 array( 'ORDER BY' => 'rc_timestamp DESC', 'LIMIT' => $limit ) +
368 // We have a new_namespace_time index! UNION over new=(0,1) and sort result set!
371 $sqlNew = $dbr->selectSQLText( $tables, $select,
372 array( 'rc_new' => 1 ) +
$conds,
374 array( 'ORDER BY' => 'rc_timestamp DESC', 'LIMIT' => $limit,
375 'USE INDEX' => array('recentchanges' => 'rc_timestamp') ),
378 $sqlOld = $dbr->selectSQLText( $tables, '*',
379 array( 'rc_new' => 0 ) +
$conds,
381 array( 'ORDER BY' => 'rc_timestamp DESC', 'LIMIT' => $limit,
382 'USE INDEX' => array('recentchanges' => 'rc_timestamp') ),
384 # Join the two fast queries, and sort the result set
385 $sql = $dbr->unionQueries(array($sqlNew, $sqlOld), false).' ORDER BY rc_timestamp DESC';
386 $sql = $dbr->limitResult($sql, $limit, false);
387 $res = $dbr->query( $sql, __METHOD__
);
394 * Send output to $wgOut, only called if not used feeds
396 * @param $rows Array of database rows
397 * @param $opts FormOptions
399 public function webOutput( $rows, $opts ) {
400 global $wgOut, $wgUser, $wgRCShowWatchingUsers, $wgShowUpdatedMarker;
401 global $wgAllowCategorizedRecentChanges;
403 $limit = $opts['limit'];
405 if( !$this->including() ) {
406 // Output options box
407 $this->doHeader( $opts );
410 // And now for the content
411 $wgOut->setFeedAppendQuery( $this->getFeedQuery() );
413 if( $wgAllowCategorizedRecentChanges ) {
414 $this->filterByCategories( $rows, $opts );
417 $showWatcherCount = $wgRCShowWatchingUsers && $wgUser->getOption( 'shownumberswatching' );
418 $watcherCache = array();
420 $dbr = wfGetDB( DB_SLAVE
);
423 $list = ChangesList
::newFromUser( $wgUser );
425 $s = $list->beginRecentChangesList();
426 foreach( $rows as $obj ) {
427 if( $limit == 0 ) break;
428 $rc = RecentChange
::newFromRow( $obj );
429 $rc->counter
= $counter++
;
430 # Check if the page has been updated since the last visit
431 if( $wgShowUpdatedMarker && !empty($obj->wl_notificationtimestamp
) ) {
432 $rc->notificationtimestamp
= ($obj->rc_timestamp
>= $obj->wl_notificationtimestamp
);
434 $rc->notificationtimestamp
= false; // Default
436 # Check the number of users watching the page
437 $rc->numberofWatchingusers
= 0; // Default
438 if( $showWatcherCount && $obj->rc_namespace
>= 0 ) {
439 if( !isset($watcherCache[$obj->rc_namespace
][$obj->rc_title
]) ) {
440 $watcherCache[$obj->rc_namespace
][$obj->rc_title
] =
441 $dbr->selectField( 'watchlist',
444 'wl_namespace' => $obj->rc_namespace
,
445 'wl_title' => $obj->rc_title
,
447 __METHOD__
. '-watchers' );
449 $rc->numberofWatchingusers
= $watcherCache[$obj->rc_namespace
][$obj->rc_title
];
451 $s .= $list->recentChangesLine( $rc, !empty( $obj->wl_user
), $counter );
454 $s .= $list->endRecentChangesList();
455 $wgOut->addHTML( $s );
459 * Get the query string to append to feed link URLs.
460 * This is overridden by RCL to add the target parameter
462 public function getFeedQuery() {
467 * Return the text to be displayed above the changes
469 * @param $opts FormOptions
470 * @return String: XHTML
472 public function doHeader( $opts ) {
473 global $wgScript, $wgOut;
475 $this->setTopText( $wgOut, $opts );
477 $defaults = $opts->getAllValues();
478 $nondefaults = $opts->getChangedValues();
479 $opts->consumeValues( array( 'namespace', 'invert', 'associated', 'tagfilter',
480 'categories', 'categories_any' ) );
483 $panel[] = $this->optionsPanel( $defaults, $nondefaults );
486 $extraOpts = $this->getExtraOptions( $opts );
487 $extraOptsCount = count( $extraOpts );
489 $submit = ' ' . Xml
::submitbutton( wfMsg( 'allpagessubmit' ) );
491 $out = Xml
::openElement( 'table', array( 'class' => 'mw-recentchanges-table' ) );
492 foreach( $extraOpts as $optionRow ) {
493 # Add submit button to the last row only
495 $addSubmit = $count === $extraOptsCount ?
$submit : '';
497 $out .= Xml
::openElement( 'tr' );
498 if( is_array( $optionRow ) ) {
499 $out .= Xml
::tags( 'td', array( 'class' => 'mw-label' ), $optionRow[0] );
500 $out .= Xml
::tags( 'td', array( 'class' => 'mw-input' ), $optionRow[1] . $addSubmit );
502 $out .= Xml
::tags( 'td', array( 'class' => 'mw-input', 'colspan' => 2 ), $optionRow . $addSubmit );
504 $out .= Xml
::closeElement( 'tr' );
506 $out .= Xml
::closeElement( 'table' );
508 $unconsumed = $opts->getUnconsumedValues();
509 foreach( $unconsumed as $key => $value ) {
510 $out .= Html
::hidden( $key, $value );
513 $t = $this->getTitle();
514 $out .= Html
::hidden( 'title', $t->getPrefixedText() );
515 $form = Xml
::tags( 'form', array( 'action' => $wgScript ), $out );
517 $panelString = implode( "\n", $panel );
520 Xml
::fieldset( wfMsg( 'recentchanges-legend' ), $panelString, array( 'class' => 'rcoptions' ) )
523 $this->setBottomText( $wgOut, $opts );
527 * Get options to be displayed in a form
529 * @param $opts FormOptions
532 function getExtraOptions( $opts ){
533 $extraOpts = array();
534 $extraOpts['namespace'] = $this->namespaceFilterForm( $opts );
536 global $wgAllowCategorizedRecentChanges;
537 if( $wgAllowCategorizedRecentChanges ) {
538 $extraOpts['category'] = $this->categoryFilterForm( $opts );
541 $tagFilter = ChangeTags
::buildTagFilterSelector( $opts['tagfilter'] );
542 if ( count($tagFilter) )
543 $extraOpts['tagfilter'] = $tagFilter;
545 wfRunHooks( 'SpecialRecentChangesPanel', array( &$extraOpts, $opts ) );
550 * Send the text to be displayed above the options
552 * @param $out OutputPage
553 * @param $opts FormOptions
555 function setTopText( OutputPage
$out, FormOptions
$opts ){
556 $out->addWikiText( wfMsgForContentNoTrans( 'recentchangestext' ) );
560 * Send the text to be displayed after the options, for use in
561 * Recentchangeslinked
563 * @param $out OutputPage
564 * @param $opts FormOptions
566 function setBottomText( OutputPage
$out, FormOptions
$opts ){}
569 * Creates the choose namespace selection
571 * @todo Uses radio buttons (HASHAR)
572 * @param $opts FormOptions
575 protected function namespaceFilterForm( FormOptions
$opts ) {
576 $nsSelect = Xml
::namespaceSelector( $opts['namespace'], '' );
577 $nsLabel = Xml
::label( wfMsg('namespace'), 'namespace' );
578 $invert = Xml
::checkLabel( wfMsg('invert'), 'invert', 'nsinvert', $opts['invert'] );
579 $associated = Xml
::checkLabel( wfMsg('namespace_association'), 'associated', 'nsassociated', $opts['associated'] );
580 return array( $nsLabel, "$nsSelect $invert $associated" );
584 * Create a input to filter changes by categories
586 * @param $opts FormOptions
589 protected function categoryFilterForm( FormOptions
$opts ) {
590 list( $label, $input ) = Xml
::inputLabelSep( wfMsg('rc_categories'),
591 'categories', 'mw-categories', false, $opts['categories'] );
593 $input .= ' ' . Xml
::checkLabel( wfMsg('rc_categories_any'),
594 'categories_any', 'mw-categories_any', $opts['categories_any'] );
596 return array( $label, $input );
600 * Filter $rows by categories set in $opts
602 * @param $rows Array of database rows
603 * @param $opts FormOptions
605 function filterByCategories( &$rows, FormOptions
$opts ) {
606 $categories = array_map( 'trim', explode( '|' , $opts['categories'] ) );
608 if( !count( $categories ) ) {
614 foreach( $categories as $cat ) {
616 if( $cat == '' ) continue;
624 foreach( $rows AS $k => $r ) {
625 $nt = Title
::makeTitle( $r->rc_namespace
, $r->rc_title
);
626 $id = $nt->getArticleID();
627 if( $id == 0 ) continue; # Page might have been deleted...
628 if( !in_array( $id, $articles ) ) {
631 if( !isset( $a2r[$id] ) ) {
639 if( !count( $articles ) ||
!count( $cats ) )
643 $c = new Categoryfinder
;
644 $c->seed( $articles, $cats, $opts['categories_any'] ?
"OR" : "AND" ) ;
649 foreach( $match AS $id ) {
650 foreach( $a2r[$id] AS $rev ) {
652 $newrows[$k] = $rowsarr[$k];
659 * Makes change an option link which carries all the other options
661 * @param $title Title
662 * @param $override Array: options to override
663 * @param $options Array: current options
664 * @param $active Boolean: whether to show the link in bold
666 function makeOptionsLink( $title, $override, $options, $active = false ) {
668 $sk = $wgUser->getSkin();
669 $params = $override +
$options;
671 return $sk->link( $this->getTitle(), '<strong>' . htmlspecialchars( $title ) . '</strong>',
672 array(), $params, array( 'known' ) );
674 return $sk->link( $this->getTitle(), htmlspecialchars( $title ), array() , $params, array( 'known' ) );
679 * Creates the options panel.
681 * @param $defaults Array
682 * @param $nondefaults Array
684 function optionsPanel( $defaults, $nondefaults ) {
685 global $wgLang, $wgUser, $wgRCLinkLimits, $wgRCLinkDays;
687 $options = $nondefaults +
$defaults;
690 if( !wfEmptyMsg( 'rclegend' ) ) {
691 $note .= '<div class="mw-rclegend">' . wfMsgExt( 'rclegend', array('parseinline') ) . "</div>\n";
693 if( $options['from'] ) {
694 $note .= wfMsgExt( 'rcnotefrom', array( 'parseinline' ),
695 $wgLang->formatNum( $options['limit'] ),
696 $wgLang->timeanddate( $options['from'], true ),
697 $wgLang->date( $options['from'], true ),
698 $wgLang->time( $options['from'], true ) ) . '<br />';
701 # Sort data for display and make sure it's unique after we've added user data.
702 $wgRCLinkLimits[] = $options['limit'];
703 $wgRCLinkDays[] = $options['days'];
704 sort( $wgRCLinkLimits );
705 sort( $wgRCLinkDays );
706 $wgRCLinkLimits = array_unique( $wgRCLinkLimits );
707 $wgRCLinkDays = array_unique( $wgRCLinkDays );
710 foreach( $wgRCLinkLimits as $value ) {
711 $cl[] = $this->makeOptionsLink( $wgLang->formatNum( $value ),
712 array( 'limit' => $value ), $nondefaults, $value == $options['limit'] ) ;
714 $cl = $wgLang->pipeList( $cl );
716 // day links, reset 'from' to none
717 foreach( $wgRCLinkDays as $value ) {
718 $dl[] = $this->makeOptionsLink( $wgLang->formatNum( $value ),
719 array( 'days' => $value, 'from' => '' ), $nondefaults, $value == $options['days'] ) ;
721 $dl = $wgLang->pipeList( $dl );
725 $showhide = array( wfMsg( 'show' ), wfMsg( 'hide' ) );
726 $minorLink = $this->makeOptionsLink( $showhide[1-$options['hideminor']],
727 array( 'hideminor' => 1-$options['hideminor'] ), $nondefaults);
728 $botLink = $this->makeOptionsLink( $showhide[1-$options['hidebots']],
729 array( 'hidebots' => 1-$options['hidebots'] ), $nondefaults);
730 $anonsLink = $this->makeOptionsLink( $showhide[ 1 - $options['hideanons'] ],
731 array( 'hideanons' => 1 - $options['hideanons'] ), $nondefaults );
732 $liuLink = $this->makeOptionsLink( $showhide[1-$options['hideliu']],
733 array( 'hideliu' => 1-$options['hideliu'] ), $nondefaults);
734 $patrLink = $this->makeOptionsLink( $showhide[1-$options['hidepatrolled']],
735 array( 'hidepatrolled' => 1-$options['hidepatrolled'] ), $nondefaults);
736 $myselfLink = $this->makeOptionsLink( $showhide[1-$options['hidemyself']],
737 array( 'hidemyself' => 1-$options['hidemyself'] ), $nondefaults);
739 $links[] = wfMsgHtml( 'rcshowhideminor', $minorLink );
740 $links[] = wfMsgHtml( 'rcshowhidebots', $botLink );
741 $links[] = wfMsgHtml( 'rcshowhideanons', $anonsLink );
742 $links[] = wfMsgHtml( 'rcshowhideliu', $liuLink );
743 if( $wgUser->useRCPatrol() )
744 $links[] = wfMsgHtml( 'rcshowhidepatr', $patrLink );
745 $links[] = wfMsgHtml( 'rcshowhidemine', $myselfLink );
746 $hl = $wgLang->pipeList( $links );
748 // show from this onward link
749 $now = $wgLang->timeanddate( wfTimestampNow(), true );
750 $tl = $this->makeOptionsLink( $now, array( 'from' => wfTimestampNow() ), $nondefaults );
752 $rclinks = wfMsgExt( 'rclinks', array( 'parseinline', 'replaceafter' ),
754 $rclistfrom = wfMsgExt( 'rclistfrom', array( 'parseinline', 'replaceafter' ), $tl );
755 return "{$note}$rclinks<br />$rclistfrom";