643e79a37e32b7702b457df0e8408cfe177c0b33
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License along
15 * with this program; if not, write to the Free Software Foundation, Inc.,
16 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
17 * http://www.gnu.org/copyleft/gpl.html
21 * Implements Special:Recentchanges
22 * @ingroup SpecialPage
24 class SpecialRecentChanges
extends SpecialPage
{
25 var $rcOptions, $rcSubpage;
27 public function __construct() {
28 parent
::__construct( 'Recentchanges' );
29 $this->includable( true );
33 * Get a FormOptions object containing the default options
37 public function getDefaultOptions() {
39 $opts = new FormOptions();
41 $opts->add( 'days', (int)$wgUser->getOption( 'rcdays' ) );
42 $opts->add( 'limit', (int)$wgUser->getOption( 'rclimit' ) );
43 $opts->add( 'from', '' );
45 $opts->add( 'hideminor', $wgUser->getBoolOption( 'hideminor' ) );
46 $opts->add( 'hidebots', true );
47 $opts->add( 'hideanons', false );
48 $opts->add( 'hideliu', false );
49 $opts->add( 'hidepatrolled', $wgUser->getBoolOption( 'hidepatrolled' ) );
50 $opts->add( 'hidemyself', false );
52 $opts->add( 'namespace', '', FormOptions
::INTNULL
);
53 $opts->add( 'invert', false );
55 $opts->add( 'categories', '' );
56 $opts->add( 'categories_any', false );
57 $opts->add( 'tagfilter', '' );
62 * Create a FormOptions object with options as specified by the user
66 public function setup( $parameters ) {
69 $opts = $this->getDefaultOptions();
70 $opts->fetchValuesFromRequest( $wgRequest );
72 // Give precedence to subpage syntax
73 if( $parameters !== null ) {
74 $this->parseParameters( $parameters, $opts );
77 $opts->validateIntBounds( 'limit', 0, 5000 );
82 * Create a FormOptions object specific for feed requests and return it
86 public function feedSetup() {
87 global $wgFeedLimit, $wgRequest;
88 $opts = $this->getDefaultOptions();
89 # Feed is cached on limit,hideminor,namespace; other params would randomly not work
90 $opts->fetchValuesFromRequest( $wgRequest, array( 'limit', 'hideminor', 'namespace' ) );
91 $opts->validateIntBounds( 'limit', 0, $wgFeedLimit );
96 * Get the current FormOptions for this request
98 public function getOptions() {
99 if ( $this->rcOptions
=== null ) {
101 $feedFormat = $wgRequest->getVal( 'feed' );
102 $this->rcOptions
= $feedFormat ?
$this->feedSetup() : $this->setup( $this->rcSubpage
);
104 return $this->rcOptions
;
109 * Main execution point
111 * @param $subpage String
113 public function execute( $subpage ) {
114 global $wgRequest, $wgOut;
115 $this->rcSubpage
= $subpage;
116 $feedFormat = $wgRequest->getVal( 'feed' );
118 # 10 seconds server-side caching max
119 $wgOut->setSquidMaxage( 10 );
120 # Check if the client has a cached version
121 $lastmod = $this->checkLastModified( $feedFormat );
122 if( $lastmod === false ) {
126 $opts = $this->getOptions();
128 $this->outputHeader();
130 // Fetch results, prepare a batch link existence check query
131 $conds = $this->buildMainQueryConds( $opts );
132 $rows = $this->doMainQuery( $conds, $opts );
133 if( $rows === false ){
134 if( !$this->including() ) {
135 $this->doHeader( $opts );
141 $batch = new LinkBatch
;
142 foreach( $rows as $row ) {
143 $batch->add( NS_USER
, $row->rc_user_text
);
144 $batch->add( NS_USER_TALK
, $row->rc_user_text
);
145 $batch->add( $row->rc_namespace
, $row->rc_title
);
150 list( $changesFeed, $formatter ) = $this->getFeedObject( $feedFormat );
151 $changesFeed->execute( $formatter, $rows, $lastmod, $opts );
153 $this->webOutput( $rows, $opts );
160 * Return an array with a ChangesFeed object and ChannelFeed object
164 public function getFeedObject( $feedFormat ){
165 $changesFeed = new ChangesFeed( $feedFormat, 'rcfeed' );
166 $formatter = $changesFeed->getFeedObject(
167 wfMsgForContent( 'recentchanges' ),
168 wfMsgForContent( 'recentchanges-feed-description' )
170 return array( $changesFeed, $formatter );
174 * Process $par and put options found if $opts
175 * Mainly used when including the page
178 * @param $opts FormOptions
180 public function parseParameters( $par, FormOptions
$opts ) {
181 $bits = preg_split( '/\s*,\s*/', trim( $par ) );
182 foreach( $bits as $bit ) {
183 if( 'hidebots' === $bit ) $opts['hidebots'] = true;
184 if( 'bots' === $bit ) $opts['hidebots'] = false;
185 if( 'hideminor' === $bit ) $opts['hideminor'] = true;
186 if( 'minor' === $bit ) $opts['hideminor'] = false;
187 if( 'hideliu' === $bit ) $opts['hideliu'] = true;
188 if( 'hidepatrolled' === $bit ) $opts['hidepatrolled'] = true;
189 if( 'hideanons' === $bit ) $opts['hideanons'] = true;
190 if( 'hidemyself' === $bit ) $opts['hidemyself'] = true;
192 if( is_numeric( $bit ) ) $opts['limit'] = $bit;
195 if( preg_match( '/^limit=(\d+)$/', $bit, $m ) ) $opts['limit'] = $m[1];
196 if( preg_match( '/^days=(\d+)$/', $bit, $m ) ) $opts['days'] = $m[1];
201 * Get last modified date, for client caching
202 * Don't use this if we are using the patrol feature, patrol changes don't
203 * update the timestamp
205 * @param $feedFormat String
206 * @return String or false
208 public function checkLastModified( $feedFormat ) {
209 global $wgUseRCPatrol, $wgOut;
210 $dbr = wfGetDB( DB_SLAVE
);
211 $lastmod = $dbr->selectField( 'recentchanges', 'MAX(rc_timestamp)', false, __METHOD__
);
212 if( $feedFormat ||
!$wgUseRCPatrol ) {
213 if( $lastmod && $wgOut->checkLastModified( $lastmod ) ) {
214 # Client cache fresh and headers sent, nothing more to do.
222 * Return an array of conditions depending of options set in $opts
224 * @param $opts FormOptions
227 public function buildMainQueryConds( FormOptions
$opts ) {
230 $dbr = wfGetDB( DB_SLAVE
);
233 # It makes no sense to hide both anons and logged-in users
234 # Where this occurs, force anons to be shown
236 if( $opts['hideanons'] && $opts['hideliu'] ){
237 # Check if the user wants to show bots only
238 if( $opts['hidebots'] ){
239 $opts['hideanons'] = false;
242 $opts['hidebots'] = false;
247 $cutoff_unixtime = time() - ( $opts['days'] * 86400 );
248 $cutoff_unixtime = $cutoff_unixtime - ($cutoff_unixtime %
86400);
249 $cutoff = $dbr->timestamp( $cutoff_unixtime );
251 $fromValid = preg_match('/^[0-9]{14}$/', $opts['from']);
252 if( $fromValid && $opts['from'] > wfTimestamp(TS_MW
,$cutoff) ) {
253 $cutoff = $dbr->timestamp($opts['from']);
255 $opts->reset( 'from' );
258 $conds[] = 'rc_timestamp >= ' . $dbr->addQuotes( $cutoff );
261 $hidePatrol = $wgUser->useRCPatrol() && $opts['hidepatrolled'];
262 $hideLoggedInUsers = $opts['hideliu'] && !$forcebot;
263 $hideAnonymousUsers = $opts['hideanons'] && !$forcebot;
265 if( $opts['hideminor'] ) $conds['rc_minor'] = 0;
266 if( $opts['hidebots'] ) $conds['rc_bot'] = 0;
267 if( $hidePatrol ) $conds['rc_patrolled'] = 0;
268 if( $forcebot ) $conds['rc_bot'] = 1;
269 if( $hideLoggedInUsers ) $conds[] = 'rc_user = 0';
270 if( $hideAnonymousUsers ) $conds[] = 'rc_user != 0';
272 if( $opts['hidemyself'] ) {
273 if( $wgUser->getId() ) {
274 $conds[] = 'rc_user != ' . $dbr->addQuotes( $wgUser->getId() );
276 $conds[] = 'rc_user_text != ' . $dbr->addQuotes( $wgUser->getName() );
280 # Namespace filtering
281 if( $opts['namespace'] !== '' ) {
282 if( !$opts['invert'] ) {
283 $conds[] = 'rc_namespace = ' . $dbr->addQuotes( $opts['namespace'] );
285 $conds[] = 'rc_namespace != ' . $dbr->addQuotes( $opts['namespace'] );
295 * @param $conds Array
296 * @param $opts FormOptions
297 * @return database result or false (for Recentchangeslinked only)
299 public function doMainQuery( $conds, $opts ) {
302 $tables = array( 'recentchanges' );
303 $join_conds = array();
304 $query_options = array( 'USE INDEX' => array('recentchanges' => 'rc_timestamp') );
306 $uid = $wgUser->getId();
307 $dbr = wfGetDB( DB_SLAVE
);
308 $limit = $opts['limit'];
309 $namespace = $opts['namespace'];
310 $invert = $opts['invert'];
312 // JOIN on watchlist for users
314 $tables[] = 'watchlist';
315 $join_conds['watchlist'] = array('LEFT JOIN',
316 "wl_user={$uid} AND wl_title=rc_title AND wl_namespace=rc_namespace");
318 if ($wgUser->isAllowed("rollback")) {
320 $join_conds['page'] = array('LEFT JOIN', 'rc_cur_id=page_id');
324 // Fields are * in this case, so let the function modify an empty array to keep it happy.
325 ChangeTags
::modifyDisplayQuery(
326 $tables, $fields, $conds, $join_conds, $query_options, $opts['tagfilter']
329 if ( !wfRunHooks( 'SpecialRecentChangesQuery', array( &$conds, &$tables, &$join_conds, $opts, &$query_options ) ) )
332 // Don't use the new_namespace_time timestamp index if:
333 // (a) "All namespaces" selected
334 // (b) We want all pages NOT in a certain namespaces (inverted)
335 // (c) There is a tag to filter on (use tag index instead)
336 // (d) UNION + sort/limit is not an option for the DBMS
337 if( is_null($namespace)
339 ||
$opts['tagfilter'] != ''
340 ||
!$dbr->unionSupportsOrderAndLimit() )
342 $res = $dbr->select( $tables, '*', $conds, __METHOD__
,
343 array( 'ORDER BY' => 'rc_timestamp DESC', 'LIMIT' => $limit ) +
346 // We have a new_namespace_time index! UNION over new=(0,1) and sort result set!
349 $sqlNew = $dbr->selectSQLText( $tables, '*',
350 array( 'rc_new' => 1 ) +
$conds,
352 array( 'ORDER BY' => 'rc_timestamp DESC', 'LIMIT' => $limit,
353 'USE INDEX' => array('recentchanges' => 'rc_timestamp') ),
356 $sqlOld = $dbr->selectSQLText( $tables, '*',
357 array( 'rc_new' => 0 ) +
$conds,
359 array( 'ORDER BY' => 'rc_timestamp DESC', 'LIMIT' => $limit,
360 'USE INDEX' => array('recentchanges' => 'rc_timestamp') ),
362 # Join the two fast queries, and sort the result set
363 $sql = $dbr->unionQueries(array($sqlNew, $sqlOld), false).' ORDER BY rc_timestamp DESC';
364 $sql = $dbr->limitResult($sql, $limit, false);
365 $res = $dbr->query( $sql, __METHOD__
);
372 * Send output to $wgOut, only called if not used feeds
374 * @param $rows Array of database rows
375 * @param $opts FormOptions
377 public function webOutput( $rows, $opts ) {
378 global $wgOut, $wgUser, $wgRCShowWatchingUsers, $wgShowUpdatedMarker;
379 global $wgAllowCategorizedRecentChanges;
381 $limit = $opts['limit'];
383 if( !$this->including() ) {
384 // Output options box
385 $this->doHeader( $opts );
388 // And now for the content
389 $wgOut->setFeedAppendQuery( $this->getFeedQuery() );
391 if( $wgAllowCategorizedRecentChanges ) {
392 $this->filterByCategories( $rows, $opts );
395 $showWatcherCount = $wgRCShowWatchingUsers && $wgUser->getOption( 'shownumberswatching' );
396 $watcherCache = array();
398 $dbr = wfGetDB( DB_SLAVE
);
401 $list = ChangesList
::newFromUser( $wgUser );
403 $s = $list->beginRecentChangesList();
404 foreach( $rows as $obj ) {
405 if( $limit == 0 ) break;
406 $rc = RecentChange
::newFromRow( $obj );
407 $rc->counter
= $counter++
;
408 # Check if the page has been updated since the last visit
409 if( $wgShowUpdatedMarker && !empty($obj->wl_notificationtimestamp
) ) {
410 $rc->notificationtimestamp
= ($obj->rc_timestamp
>= $obj->wl_notificationtimestamp
);
412 $rc->notificationtimestamp
= false; // Default
414 # Check the number of users watching the page
415 $rc->numberofWatchingusers
= 0; // Default
416 if( $showWatcherCount && $obj->rc_namespace
>= 0 ) {
417 if( !isset($watcherCache[$obj->rc_namespace
][$obj->rc_title
]) ) {
418 $watcherCache[$obj->rc_namespace
][$obj->rc_title
] =
419 $dbr->selectField( 'watchlist',
422 'wl_namespace' => $obj->rc_namespace
,
423 'wl_title' => $obj->rc_title
,
425 __METHOD__
. '-watchers' );
427 $rc->numberofWatchingusers
= $watcherCache[$obj->rc_namespace
][$obj->rc_title
];
429 $s .= $list->recentChangesLine( $rc, !empty( $obj->wl_user
), $counter );
432 $s .= $list->endRecentChangesList();
433 $wgOut->addHTML( $s );
437 * Get the query string to append to feed link URLs.
438 * This is overridden by RCL to add the target parameter
440 public function getFeedQuery() {
445 * Return the text to be displayed above the changes
447 * @param $opts FormOptions
448 * @return String: XHTML
450 public function doHeader( $opts ) {
451 global $wgScript, $wgOut;
453 $this->setTopText( $wgOut, $opts );
455 $defaults = $opts->getAllValues();
456 $nondefaults = $opts->getChangedValues();
457 $opts->consumeValues( array( 'namespace', 'invert', 'tagfilter',
458 'categories', 'categories_any' ) );
461 $panel[] = $this->optionsPanel( $defaults, $nondefaults );
464 $extraOpts = $this->getExtraOptions( $opts );
465 $extraOptsCount = count( $extraOpts );
467 $submit = ' ' . Xml
::submitbutton( wfMsg( 'allpagessubmit' ) );
469 $out = Xml
::openElement( 'table', array( 'class' => 'mw-recentchanges-table' ) );
470 foreach( $extraOpts as $optionRow ) {
471 # Add submit button to the last row only
473 $addSubmit = $count === $extraOptsCount ?
$submit : '';
475 $out .= Xml
::openElement( 'tr' );
476 if( is_array( $optionRow ) ) {
477 $out .= Xml
::tags( 'td', array( 'class' => 'mw-label' ), $optionRow[0] );
478 $out .= Xml
::tags( 'td', array( 'class' => 'mw-input' ), $optionRow[1] . $addSubmit );
480 $out .= Xml
::tags( 'td', array( 'class' => 'mw-input', 'colspan' => 2 ), $optionRow . $addSubmit );
482 $out .= Xml
::closeElement( 'tr' );
484 $out .= Xml
::closeElement( 'table' );
486 $unconsumed = $opts->getUnconsumedValues();
487 foreach( $unconsumed as $key => $value ) {
488 $out .= Xml
::hidden( $key, $value );
491 $t = $this->getTitle();
492 $out .= Xml
::hidden( 'title', $t->getPrefixedText() );
493 $form = Xml
::tags( 'form', array( 'action' => $wgScript ), $out );
495 $panelString = implode( "\n", $panel );
498 Xml
::fieldset( wfMsg( 'recentchanges-legend' ), $panelString, array( 'class' => 'rcoptions' ) )
501 $wgOut->addHTML( ChangesList
::flagLegend() );
503 $this->setBottomText( $wgOut, $opts );
507 * Get options to be displayed in a form
509 * @param $opts FormOptions
512 function getExtraOptions( $opts ){
513 $extraOpts = array();
514 $extraOpts['namespace'] = $this->namespaceFilterForm( $opts );
516 global $wgAllowCategorizedRecentChanges;
517 if( $wgAllowCategorizedRecentChanges ) {
518 $extraOpts['category'] = $this->categoryFilterForm( $opts );
521 $tagFilter = ChangeTags
::buildTagFilterSelector( $opts['tagfilter'] );
522 if ( count($tagFilter) )
523 $extraOpts['tagfilter'] = $tagFilter;
525 wfRunHooks( 'SpecialRecentChangesPanel', array( &$extraOpts, $opts ) );
530 * Send the text to be displayed above the options
532 * @param $out OutputPage
533 * @param $opts FormOptions
535 function setTopText( OutputPage
$out, FormOptions
$opts ){
536 $out->addWikiText( wfMsgForContentNoTrans( 'recentchangestext' ) );
540 * Send the text to be displayed after the options, for use in
541 * Recentchangeslinked
543 * @param $out OutputPage
544 * @param $opts FormOptions
546 function setBottomText( OutputPage
$out, FormOptions
$opts ){}
549 * Creates the choose namespace selection
551 * @param $opts FormOptions
554 protected function namespaceFilterForm( FormOptions
$opts ) {
555 $nsSelect = Xml
::namespaceSelector( $opts['namespace'], '' );
556 $nsLabel = Xml
::label( wfMsg('namespace'), 'namespace' );
557 $invert = Xml
::checkLabel( wfMsg('invert'), 'invert', 'nsinvert', $opts['invert'] );
558 return array( $nsLabel, "$nsSelect $invert" );
562 * Create a input to filter changes by categories
564 * @param $opts FormOptions
567 protected function categoryFilterForm( FormOptions
$opts ) {
568 list( $label, $input ) = Xml
::inputLabelSep( wfMsg('rc_categories'),
569 'categories', 'mw-categories', false, $opts['categories'] );
571 $input .= ' ' . Xml
::checkLabel( wfMsg('rc_categories_any'),
572 'categories_any', 'mw-categories_any', $opts['categories_any'] );
574 return array( $label, $input );
578 * Filter $rows by categories set in $opts
580 * @param $rows Array of database rows
581 * @param $opts FormOptions
583 function filterByCategories( &$rows, FormOptions
$opts ) {
584 $categories = array_map( 'trim', explode( '|' , $opts['categories'] ) );
586 if( !count( $categories ) ) {
592 foreach( $categories as $cat ) {
594 if( $cat == '' ) continue;
602 foreach( $rows AS $k => $r ) {
603 $nt = Title
::makeTitle( $r->rc_namespace
, $r->rc_title
);
604 $id = $nt->getArticleID();
605 if( $id == 0 ) continue; # Page might have been deleted...
606 if( !in_array( $id, $articles ) ) {
609 if( !isset( $a2r[$id] ) ) {
617 if( !count( $articles ) ||
!count( $cats ) )
621 $c = new Categoryfinder
;
622 $c->seed( $articles, $cats, $opts['categories_any'] ?
"OR" : "AND" ) ;
627 foreach( $match AS $id ) {
628 foreach( $a2r[$id] AS $rev ) {
630 $newrows[$k] = $rowsarr[$k];
637 * Makes change an option link which carries all the other options
639 * @param $title Title
640 * @param $override Array: options to override
641 * @param $options Array: current options
642 * @param $active Boolean: whether to show the link in bold
644 function makeOptionsLink( $title, $override, $options, $active = false ) {
646 $sk = $wgUser->getSkin();
647 $params = $override +
$options;
649 return $sk->link( $this->getTitle(), '<strong>' . htmlspecialchars( $title ) . '</strong>',
650 array(), $params, array( 'known' ) );
652 return $sk->link( $this->getTitle(), htmlspecialchars( $title ), array() , $params, array( 'known' ) );
657 * Creates the options panel.
659 * @param $defaults Array
660 * @param $nondefaults Array
662 function optionsPanel( $defaults, $nondefaults ) {
663 global $wgLang, $wgUser, $wgRCLinkLimits, $wgRCLinkDays;
665 $options = $nondefaults +
$defaults;
668 if( !wfEmptyMsg( 'rclegend', wfMsg('rclegend') ) ) {
669 $note .= '<div class="mw-rclegend">' . wfMsgExt( 'rclegend', array('parseinline') ) . "</div>\n";
671 if( $options['from'] ) {
672 $note .= wfMsgExt( 'rcnotefrom', array( 'parseinline' ),
673 $wgLang->formatNum( $options['limit'] ),
674 $wgLang->timeanddate( $options['from'], true ),
675 $wgLang->date( $options['from'], true ),
676 $wgLang->time( $options['from'], true ) ) . '<br />';
679 # Sort data for display and make sure it's unique after we've added user data.
680 $wgRCLinkLimits[] = $options['limit'];
681 $wgRCLinkDays[] = $options['days'];
682 sort( $wgRCLinkLimits );
683 sort( $wgRCLinkDays );
684 $wgRCLinkLimits = array_unique( $wgRCLinkLimits );
685 $wgRCLinkDays = array_unique( $wgRCLinkDays );
688 foreach( $wgRCLinkLimits as $value ) {
689 $cl[] = $this->makeOptionsLink( $wgLang->formatNum( $value ),
690 array( 'limit' => $value ), $nondefaults, $value == $options['limit'] ) ;
692 $cl = $wgLang->pipeList( $cl );
694 // day links, reset 'from' to none
695 foreach( $wgRCLinkDays as $value ) {
696 $dl[] = $this->makeOptionsLink( $wgLang->formatNum( $value ),
697 array( 'days' => $value, 'from' => '' ), $nondefaults, $value == $options['days'] ) ;
699 $dl = $wgLang->pipeList( $dl );
703 $showhide = array( wfMsg( 'show' ), wfMsg( 'hide' ) );
704 $minorLink = $this->makeOptionsLink( $showhide[1-$options['hideminor']],
705 array( 'hideminor' => 1-$options['hideminor'] ), $nondefaults);
706 $botLink = $this->makeOptionsLink( $showhide[1-$options['hidebots']],
707 array( 'hidebots' => 1-$options['hidebots'] ), $nondefaults);
708 $anonsLink = $this->makeOptionsLink( $showhide[ 1 - $options['hideanons'] ],
709 array( 'hideanons' => 1 - $options['hideanons'] ), $nondefaults );
710 $liuLink = $this->makeOptionsLink( $showhide[1-$options['hideliu']],
711 array( 'hideliu' => 1-$options['hideliu'] ), $nondefaults);
712 $patrLink = $this->makeOptionsLink( $showhide[1-$options['hidepatrolled']],
713 array( 'hidepatrolled' => 1-$options['hidepatrolled'] ), $nondefaults);
714 $myselfLink = $this->makeOptionsLink( $showhide[1-$options['hidemyself']],
715 array( 'hidemyself' => 1-$options['hidemyself'] ), $nondefaults);
717 $links[] = wfMsgHtml( 'rcshowhideminor', $minorLink );
718 $links[] = wfMsgHtml( 'rcshowhidebots', $botLink );
719 $links[] = wfMsgHtml( 'rcshowhideanons', $anonsLink );
720 $links[] = wfMsgHtml( 'rcshowhideliu', $liuLink );
721 if( $wgUser->useRCPatrol() )
722 $links[] = wfMsgHtml( 'rcshowhidepatr', $patrLink );
723 $links[] = wfMsgHtml( 'rcshowhidemine', $myselfLink );
724 $hl = $wgLang->pipeList( $links );
726 // show from this onward link
727 $now = $wgLang->timeanddate( wfTimestampNow(), true );
728 $tl = $this->makeOptionsLink( $now, array( 'from' => wfTimestampNow() ), $nondefaults );
730 $rclinks = wfMsgExt( 'rclinks', array( 'parseinline', 'replaceafter' ),
732 $rclistfrom = wfMsgExt( 'rclistfrom', array( 'parseinline', 'replaceafter' ), $tl );
733 return "{$note}$rclinks<br />$rclistfrom";