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 ) {
71 global $wgRequest, $wgRCMaxAge;
73 $opts = $this->getDefaultOptions();
74 $opts->fetchValuesFromRequest( $wgRequest );
75 $opts->validateIntBounds( 'days', 1, $wgRCMaxAge / ( 3600 * 24 ) );
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 ) {
190 $opts['hidebots'] = true;
192 if( 'bots' === $bit ) {
193 $opts['hidebots'] = false;
195 if( 'hideminor' === $bit ) {
196 $opts['hideminor'] = true;
198 if( 'minor' === $bit ) {
199 $opts['hideminor'] = false;
201 if( 'hideliu' === $bit ) {
202 $opts['hideliu'] = true;
204 if( 'hidepatrolled' === $bit ) {
205 $opts['hidepatrolled'] = true;
207 if( 'hideanons' === $bit ) {
208 $opts['hideanons'] = true;
210 if( 'hidemyself' === $bit ) {
211 $opts['hidemyself'] = true;
214 if( is_numeric( $bit ) ) {
215 $opts['limit'] = $bit;
219 if( preg_match( '/^limit=(\d+)$/', $bit, $m ) ) {
220 $opts['limit'] = $m[1];
222 if( preg_match( '/^days=(\d+)$/', $bit, $m ) ) {
223 $opts['days'] = $m[1];
229 * Get last modified date, for client caching
230 * Don't use this if we are using the patrol feature, patrol changes don't
231 * update the timestamp
233 * @param $feedFormat String
234 * @return String or false
236 public function checkLastModified( $feedFormat ) {
237 $dbr = wfGetDB( DB_SLAVE
);
238 $lastmod = $dbr->selectField( 'recentchanges', 'MAX(rc_timestamp)', false, __METHOD__
);
239 if( $feedFormat ||
!$this->getUser()->useRCPatrol() ) {
240 if( $lastmod && $this->getOutput()->checkLastModified( $lastmod ) ) {
241 # Client cache fresh and headers sent, nothing more to do.
249 * Return an array of conditions depending of options set in $opts
251 * @param $opts FormOptions
254 public function buildMainQueryConds( FormOptions
$opts ) {
255 $dbr = wfGetDB( DB_SLAVE
);
258 # It makes no sense to hide both anons and logged-in users
259 # Where this occurs, force anons to be shown
261 if( $opts['hideanons'] && $opts['hideliu'] ){
262 # Check if the user wants to show bots only
263 if( $opts['hidebots'] ){
264 $opts['hideanons'] = false;
267 $opts['hidebots'] = false;
272 $cutoff_unixtime = time() - ( $opts['days'] * 86400 );
273 $cutoff_unixtime = $cutoff_unixtime - ($cutoff_unixtime %
86400);
274 $cutoff = $dbr->timestamp( $cutoff_unixtime );
276 $fromValid = preg_match('/^[0-9]{14}$/', $opts['from']);
277 if( $fromValid && $opts['from'] > wfTimestamp(TS_MW
,$cutoff) ) {
278 $cutoff = $dbr->timestamp($opts['from']);
280 $opts->reset( 'from' );
283 $conds[] = 'rc_timestamp >= ' . $dbr->addQuotes( $cutoff );
286 $hidePatrol = $this->getUser()->useRCPatrol() && $opts['hidepatrolled'];
287 $hideLoggedInUsers = $opts['hideliu'] && !$forcebot;
288 $hideAnonymousUsers = $opts['hideanons'] && !$forcebot;
290 if( $opts['hideminor'] ) {
291 $conds['rc_minor'] = 0;
293 if( $opts['hidebots'] ) {
294 $conds['rc_bot'] = 0;
297 $conds['rc_patrolled'] = 0;
300 $conds['rc_bot'] = 1;
302 if( $hideLoggedInUsers ) {
303 $conds[] = 'rc_user = 0';
305 if( $hideAnonymousUsers ) {
306 $conds[] = 'rc_user != 0';
309 if( $opts['hidemyself'] ) {
310 if( $this->getUser()->getId() ) {
311 $conds[] = 'rc_user != ' . $dbr->addQuotes( $this->getUser()->getId() );
313 $conds[] = 'rc_user_text != ' . $dbr->addQuotes( $this->getUser()->getName() );
317 # Namespace filtering
318 if( $opts['namespace'] !== '' ) {
319 $selectedNS = $dbr->addQuotes( $opts['namespace'] );
320 $operator = $opts['invert'] ?
'!=' : '=';
321 $boolean = $opts['invert'] ?
'AND' : 'OR';
323 # namespace association (bug 2429)
324 if( !$opts['associated'] ) {
325 $condition = "rc_namespace $operator $selectedNS";
327 # Also add the associated namespace
328 $associatedNS = $dbr->addQuotes(
329 MWNamespace
::getAssociated( $opts['namespace'] )
331 $condition = "(rc_namespace $operator $selectedNS "
333 . " rc_namespace $operator $associatedNS)";
336 $conds[] = $condition;
344 * @param $conds Array
345 * @param $opts FormOptions
346 * @return database result or false (for Recentchangeslinked only)
348 public function doMainQuery( $conds, $opts ) {
349 $tables = array( 'recentchanges' );
350 $join_conds = array();
351 $query_options = array(
352 'USE INDEX' => array( 'recentchanges' => 'rc_timestamp' )
355 $uid = $this->getUser()->getId();
356 $dbr = wfGetDB( DB_SLAVE
);
357 $limit = $opts['limit'];
358 $namespace = $opts['namespace'];
359 $invert = $opts['invert'];
361 $fields = array( $dbr->tableName( 'recentchanges' ) . '.*' ); // all rc columns
362 // JOIN on watchlist for users
364 $tables[] = 'watchlist';
365 $fields[] = 'wl_user';
366 $fields[] = 'wl_notificationtimestamp';
367 $join_conds['watchlist'] = array('LEFT JOIN',
368 "wl_user={$uid} AND wl_title=rc_title AND wl_namespace=rc_namespace");
370 if ( $this->getUser()->isAllowed( 'rollback' ) ) {
372 $fields[] = 'page_latest';
373 $join_conds['page'] = array('LEFT JOIN', 'rc_cur_id=page_id');
375 if ( !$this->including() ) {
377 // Doesn't work when transcluding. See bug 23293
378 ChangeTags
::modifyDisplayQuery(
379 $tables, $fields, $conds, $join_conds, $query_options,
384 if ( !wfRunHooks( 'SpecialRecentChangesQuery',
385 array( &$conds, &$tables, &$join_conds, $opts, &$query_options, &$fields ) ) )
390 // Don't use the new_namespace_time timestamp index if:
391 // (a) "All namespaces" selected
392 // (b) We want all pages NOT in a certain namespaces (inverted)
393 // (c) There is a tag to filter on (use tag index instead)
394 // (d) UNION + sort/limit is not an option for the DBMS
395 if( is_null( $namespace )
396 ||
( $invert && !is_null( $namespace ) )
397 ||
$opts['tagfilter'] != ''
398 ||
!$dbr->unionSupportsOrderAndLimit() )
400 $res = $dbr->select( $tables, $fields, $conds, __METHOD__
,
401 array( 'ORDER BY' => 'rc_timestamp DESC', 'LIMIT' => $limit ) +
404 // We have a new_namespace_time index! UNION over new=(0,1) and sort result set!
407 $sqlNew = $dbr->selectSQLText(
410 array( 'rc_new' => 1 ) +
$conds,
413 'ORDER BY' => 'rc_timestamp DESC',
415 'USE INDEX' => array( 'recentchanges' => 'rc_timestamp' )
420 $sqlOld = $dbr->selectSQLText(
423 array( 'rc_new' => 0 ) +
$conds,
426 'ORDER BY' => 'rc_timestamp DESC',
428 'USE INDEX' => array( 'recentchanges' => 'rc_timestamp' )
432 # Join the two fast queries, and sort the result set
433 $sql = $dbr->unionQueries( array( $sqlNew, $sqlOld ), false ) .
434 ' ORDER BY rc_timestamp DESC';
435 $sql = $dbr->limitResult( $sql, $limit, false );
436 $res = $dbr->query( $sql, __METHOD__
);
443 * Send output to $wgOut, only called if not used feeds
445 * @param $rows Array of database rows
446 * @param $opts FormOptions
448 public function webOutput( $rows, $opts ) {
449 global $wgOut, $wgRCShowWatchingUsers, $wgShowUpdatedMarker;
450 global $wgAllowCategorizedRecentChanges;
452 $limit = $opts['limit'];
454 if( !$this->including() ) {
455 // Output options box
456 $this->doHeader( $opts );
459 // And now for the content
460 $wgOut->setFeedAppendQuery( $this->getFeedQuery() );
462 if( $wgAllowCategorizedRecentChanges ) {
463 $this->filterByCategories( $rows, $opts );
466 $showWatcherCount = $wgRCShowWatchingUsers && $this->getUser()->getOption( 'shownumberswatching' );
467 $watcherCache = array();
469 $dbr = wfGetDB( DB_SLAVE
);
472 $list = ChangesList
::newFromUser( $this->getUser() );
474 $s = $list->beginRecentChangesList();
475 foreach( $rows as $obj ) {
479 $rc = RecentChange
::newFromRow( $obj );
480 $rc->counter
= $counter++
;
481 # Check if the page has been updated since the last visit
482 if( $wgShowUpdatedMarker && !empty( $obj->wl_notificationtimestamp
) ) {
483 $rc->notificationtimestamp
= ( $obj->rc_timestamp
>= $obj->wl_notificationtimestamp
);
485 $rc->notificationtimestamp
= false; // Default
487 # Check the number of users watching the page
488 $rc->numberofWatchingusers
= 0; // Default
489 if( $showWatcherCount && $obj->rc_namespace
>= 0 ) {
490 if( !isset( $watcherCache[$obj->rc_namespace
][$obj->rc_title
] ) ) {
491 $watcherCache[$obj->rc_namespace
][$obj->rc_title
] =
496 'wl_namespace' => $obj->rc_namespace
,
497 'wl_title' => $obj->rc_title
,
499 __METHOD__
. '-watchers'
502 $rc->numberofWatchingusers
= $watcherCache[$obj->rc_namespace
][$obj->rc_title
];
504 $s .= $list->recentChangesLine( $rc, !empty( $obj->wl_user
), $counter );
507 $s .= $list->endRecentChangesList();
508 $wgOut->addHTML( $s );
512 * Get the query string to append to feed link URLs.
513 * This is overridden by RCL to add the target parameter
515 public function getFeedQuery() {
520 * Return the text to be displayed above the changes
522 * @param $opts FormOptions
523 * @return String: XHTML
525 public function doHeader( $opts ) {
526 global $wgScript, $wgOut;
528 $this->setTopText( $wgOut, $opts );
530 $defaults = $opts->getAllValues();
531 $nondefaults = $opts->getChangedValues();
532 $opts->consumeValues( array(
533 'namespace', 'invert', 'associated', 'tagfilter',
534 'categories', 'categories_any'
538 $panel[] = $this->optionsPanel( $defaults, $nondefaults );
541 $extraOpts = $this->getExtraOptions( $opts );
542 $extraOptsCount = count( $extraOpts );
544 $submit = ' ' . Xml
::submitbutton( wfMsg( 'allpagessubmit' ) );
546 $out = Xml
::openElement( 'table', array( 'class' => 'mw-recentchanges-table' ) );
547 foreach( $extraOpts as $optionRow ) {
548 # Add submit button to the last row only
550 $addSubmit = $count === $extraOptsCount ?
$submit : '';
552 $out .= Xml
::openElement( 'tr' );
553 if( is_array( $optionRow ) ) {
554 $out .= Xml
::tags( 'td', array( 'class' => 'mw-label' ), $optionRow[0] );
555 $out .= Xml
::tags( 'td', array( 'class' => 'mw-input' ), $optionRow[1] . $addSubmit );
557 $out .= Xml
::tags( 'td', array( 'class' => 'mw-input', 'colspan' => 2 ), $optionRow . $addSubmit );
559 $out .= Xml
::closeElement( 'tr' );
561 $out .= Xml
::closeElement( 'table' );
563 $unconsumed = $opts->getUnconsumedValues();
564 foreach( $unconsumed as $key => $value ) {
565 $out .= Html
::hidden( $key, $value );
568 $t = $this->getTitle();
569 $out .= Html
::hidden( 'title', $t->getPrefixedText() );
570 $form = Xml
::tags( 'form', array( 'action' => $wgScript ), $out );
572 $panelString = implode( "\n", $panel );
575 Xml
::fieldset( wfMsg( 'recentchanges-legend' ), $panelString, array( 'class' => 'rcoptions' ) )
578 $this->setBottomText( $wgOut, $opts );
582 * Get options to be displayed in a form
584 * @param $opts FormOptions
587 function getExtraOptions( $opts ) {
588 $extraOpts = array();
589 $extraOpts['namespace'] = $this->namespaceFilterForm( $opts );
591 global $wgAllowCategorizedRecentChanges;
592 if( $wgAllowCategorizedRecentChanges ) {
593 $extraOpts['category'] = $this->categoryFilterForm( $opts );
596 $tagFilter = ChangeTags
::buildTagFilterSelector( $opts['tagfilter'] );
597 if ( count( $tagFilter ) ) {
598 $extraOpts['tagfilter'] = $tagFilter;
601 wfRunHooks( 'SpecialRecentChangesPanel', array( &$extraOpts, $opts ) );
606 * Send the text to be displayed above the options
608 * @param $out OutputPage
609 * @param $opts FormOptions
611 function setTopText( OutputPage
$out, FormOptions
$opts ) {
612 $out->addWikiText( wfMsgForContentNoTrans( 'recentchangestext' ) );
616 * Send the text to be displayed after the options, for use in
617 * Recentchangeslinked
619 * @param $out OutputPage
620 * @param $opts FormOptions
622 function setBottomText( OutputPage
$out, FormOptions
$opts ) {}
625 * Creates the choose namespace selection
627 * @todo Uses radio buttons (HASHAR)
628 * @param $opts FormOptions
631 protected function namespaceFilterForm( FormOptions
$opts ) {
632 $nsSelect = Xml
::namespaceSelector( $opts['namespace'], '' );
633 $nsLabel = Xml
::label( wfMsg( 'namespace' ), 'namespace' );
634 $invert = Xml
::checkLabel( wfMsg( 'invert' ), 'invert', 'nsinvert', $opts['invert'] );
635 $associated = Xml
::checkLabel(
636 wfMsg( 'namespace_association' ), 'associated', 'nsassociated',
639 return array( $nsLabel, "$nsSelect $invert $associated" );
643 * Create a input to filter changes by categories
645 * @param $opts FormOptions
648 protected function categoryFilterForm( FormOptions
$opts ) {
649 list( $label, $input ) = Xml
::inputLabelSep( wfMsg( 'rc_categories' ),
650 'categories', 'mw-categories', false, $opts['categories'] );
652 $input .= ' ' . Xml
::checkLabel( wfMsg( 'rc_categories_any' ),
653 'categories_any', 'mw-categories_any', $opts['categories_any'] );
655 return array( $label, $input );
659 * Filter $rows by categories set in $opts
661 * @param $rows Array of database rows
662 * @param $opts FormOptions
664 function filterByCategories( &$rows, FormOptions
$opts ) {
665 $categories = array_map( 'trim', explode( '|' , $opts['categories'] ) );
667 if( !count( $categories ) ) {
673 foreach( $categories as $cat ) {
685 foreach( $rows as $k => $r ) {
686 $nt = Title
::makeTitle( $r->rc_namespace
, $r->rc_title
);
687 $id = $nt->getArticleID();
689 continue; # Page might have been deleted...
691 if( !in_array( $id, $articles ) ) {
694 if( !isset( $a2r[$id] ) ) {
702 if( !count( $articles ) ||
!count( $cats ) ) {
707 $c = new Categoryfinder
;
708 $c->seed( $articles, $cats, $opts['categories_any'] ?
'OR' : 'AND' );
713 foreach( $match as $id ) {
714 foreach( $a2r[$id] as $rev ) {
716 $newrows[$k] = $rowsarr[$k];
723 * Makes change an option link which carries all the other options
725 * @param $title Title
726 * @param $override Array: options to override
727 * @param $options Array: current options
728 * @param $active Boolean: whether to show the link in bold
730 function makeOptionsLink( $title, $override, $options, $active = false ) {
731 $params = $override +
$options;
733 return $this->getSkin()->link(
735 '<strong>' . htmlspecialchars( $title ) . '</strong>',
736 array(), $params, array( 'known' ) );
738 return $this->getSkin()->link(
739 $this->getTitle(), htmlspecialchars( $title ), array(),
740 $params, array( 'known' ) );
745 * Creates the options panel.
747 * @param $defaults Array
748 * @param $nondefaults Array
750 function optionsPanel( $defaults, $nondefaults ) {
751 global $wgLang, $wgRCLinkLimits, $wgRCLinkDays;
753 $options = $nondefaults +
$defaults;
756 if( !wfEmptyMsg( 'rclegend' ) ) {
757 $note .= '<div class="mw-rclegend">' .
758 wfMsgExt( 'rclegend', array( 'parseinline' ) ) . "</div>\n";
760 if( $options['from'] ) {
761 $note .= wfMsgExt( 'rcnotefrom', array( 'parseinline' ),
762 $wgLang->formatNum( $options['limit'] ),
763 $wgLang->timeanddate( $options['from'], true ),
764 $wgLang->date( $options['from'], true ),
765 $wgLang->time( $options['from'], true ) ) . '<br />';
768 # Sort data for display and make sure it's unique after we've added user data.
769 $wgRCLinkLimits[] = $options['limit'];
770 $wgRCLinkDays[] = $options['days'];
771 sort( $wgRCLinkLimits );
772 sort( $wgRCLinkDays );
773 $wgRCLinkLimits = array_unique( $wgRCLinkLimits );
774 $wgRCLinkDays = array_unique( $wgRCLinkDays );
777 foreach( $wgRCLinkLimits as $value ) {
778 $cl[] = $this->makeOptionsLink( $wgLang->formatNum( $value ),
779 array( 'limit' => $value ), $nondefaults, $value == $options['limit'] );
781 $cl = $wgLang->pipeList( $cl );
783 // day links, reset 'from' to none
784 foreach( $wgRCLinkDays as $value ) {
785 $dl[] = $this->makeOptionsLink( $wgLang->formatNum( $value ),
786 array( 'days' => $value, 'from' => '' ), $nondefaults, $value == $options['days'] );
788 $dl = $wgLang->pipeList( $dl );
792 $showhide = array( wfMsg( 'show' ), wfMsg( 'hide' ) );
793 $minorLink = $this->makeOptionsLink( $showhide[1 - $options['hideminor']],
794 array( 'hideminor' => 1-$options['hideminor'] ), $nondefaults );
795 $botLink = $this->makeOptionsLink( $showhide[1 - $options['hidebots']],
796 array( 'hidebots' => 1-$options['hidebots'] ), $nondefaults );
797 $anonsLink = $this->makeOptionsLink( $showhide[ 1 - $options['hideanons'] ],
798 array( 'hideanons' => 1 - $options['hideanons'] ), $nondefaults );
799 $liuLink = $this->makeOptionsLink( $showhide[1 - $options['hideliu']],
800 array( 'hideliu' => 1-$options['hideliu'] ), $nondefaults );
801 $patrLink = $this->makeOptionsLink( $showhide[1 - $options['hidepatrolled']],
802 array( 'hidepatrolled' => 1-$options['hidepatrolled'] ), $nondefaults );
803 $myselfLink = $this->makeOptionsLink( $showhide[1 - $options['hidemyself']],
804 array( 'hidemyself' => 1-$options['hidemyself'] ), $nondefaults );
806 $links[] = wfMsgHtml( 'rcshowhideminor', $minorLink );
807 $links[] = wfMsgHtml( 'rcshowhidebots', $botLink );
808 $links[] = wfMsgHtml( 'rcshowhideanons', $anonsLink );
809 $links[] = wfMsgHtml( 'rcshowhideliu', $liuLink );
810 if( $this->getUser()->useRCPatrol() ) {
811 $links[] = wfMsgHtml( 'rcshowhidepatr', $patrLink );
813 $links[] = wfMsgHtml( 'rcshowhidemine', $myselfLink );
814 $hl = $wgLang->pipeList( $links );
816 // show from this onward link
817 $now = $wgLang->timeanddate( wfTimestampNow(), true );
818 $tl = $this->makeOptionsLink(
819 $now, array( 'from' => wfTimestampNow() ), $nondefaults
822 $rclinks = wfMsgExt( 'rclinks', array( 'parseinline', 'replaceafter' ),
824 $rclistfrom = wfMsgExt( 'rclistfrom', array( 'parseinline', 'replaceafter' ), $tl );
825 return "{$note}$rclinks<br />$rclistfrom";