* (bug 7405) Make Linker methods static. Patch by Dan Li.
[lhc/web/wiklou.git] / includes / ChangesList.php
1 <?php
2 /**
3 * @package MediaWiki
4 * Contain class to show various lists of change:
5 * - what's link here
6 * - related changes
7 * - recent changes
8 */
9
10 /**
11 * @todo document
12 * @package MediaWiki
13 */
14 class RCCacheEntry extends RecentChange
15 {
16 var $secureName, $link;
17 var $curlink , $difflink, $lastlink , $usertalklink , $versionlink ;
18 var $userlink, $timestamp, $watched;
19
20 function newFromParent( $rc )
21 {
22 $rc2 = new RCCacheEntry;
23 $rc2->mAttribs = $rc->mAttribs;
24 $rc2->mExtra = $rc->mExtra;
25 return $rc2;
26 }
27 } ;
28
29 /**
30 * @package MediaWiki
31 */
32 class ChangesList {
33 # Called by history lists and recent changes
34 #
35
36 /** @todo document */
37 function ChangesList() {
38 $this->preCacheMessages();
39 }
40
41 /**
42 * Fetch an appropriate changes list class for the specified user
43 * Some users might want to use an enhanced list format, for instance
44 *
45 * @param $user User to fetch the list class for
46 * @return ChangesList derivative
47 */
48 function newFromUser( &$user ) {
49 $list = NULL;
50 if( wfRunHooks( 'FetchChangesList', array( &$user, &$list ) ) ) {
51 return $user->getOption( 'usenewrc' ) ? new EnhancedChangesList() : new OldChangesList();
52 } else {
53 return $list;
54 }
55 }
56
57 /**
58 * As we use the same small set of messages in various methods and that
59 * they are called often, we call them once and save them in $this->message
60 */
61 function preCacheMessages() {
62 // Precache various messages
63 if( !isset( $this->message ) ) {
64 foreach( explode(' ', 'cur diff hist minoreditletter newpageletter last '.
65 'blocklink changes history boteditletter' ) as $msg ) {
66 $this->message[$msg] = wfMsgExt( $msg, array( 'escape') );
67 }
68 }
69 }
70
71
72 /**
73 * Returns the appropriate flags for new page, minor change and patrolling
74 */
75 function recentChangesFlags( $new, $minor, $patrolled, $nothing = '&nbsp;', $bot = false ) {
76 $f = $new ? '<span class="newpage">' . $this->message['newpageletter'] . '</span>'
77 : $nothing;
78 $f .= $minor ? '<span class="minor">' . $this->message['minoreditletter'] . '</span>'
79 : $nothing;
80 $f .= $bot ? '<span class="bot">' . $this->message['boteditletter'] . '</span>' : $nothing;
81 $f .= $patrolled ? '<span class="unpatrolled">!</span>' : $nothing;
82 return $f;
83 }
84
85 /**
86 * Returns text for the start of the tabular part of RC
87 */
88 function beginRecentChangesList() {
89 $this->rc_cache = array();
90 $this->rcMoveIndex = 0;
91 $this->rcCacheIndex = 0;
92 $this->lastdate = '';
93 $this->rclistOpen = false;
94 return '';
95 }
96
97 /**
98 * Returns text for the end of RC
99 */
100 function endRecentChangesList() {
101 if( $this->rclistOpen ) {
102 return "</ul>\n";
103 } else {
104 return '';
105 }
106 }
107
108
109 function insertMove( &$s, $rc ) {
110 # Diff
111 $s .= '(' . $this->message['diff'] . ') (';
112 # Hist
113 $s .= Linker::makeKnownLinkObj( $rc->getMovedToTitle(), $this->message['hist'], 'action=history' ) .
114 ') . . ';
115
116 # "[[x]] moved to [[y]]"
117 $msg = ( $rc->mAttribs['rc_type'] == RC_MOVE ) ? '1movedto2' : '1movedto2_redir';
118 $s .= wfMsg( $msg, Linker::makeKnownLinkObj( $rc->getTitle(), '', 'redirect=no' ),
119 Linker::makeKnownLinkObj( $rc->getMovedToTitle(), '' ) );
120 }
121
122 function insertDateHeader(&$s, $rc_timestamp) {
123 global $wgLang;
124
125 # Make date header if necessary
126 $date = $wgLang->date( $rc_timestamp, true, true );
127 $s = '';
128 if( $date != $this->lastdate ) {
129 if( '' != $this->lastdate ) {
130 $s .= "</ul>\n";
131 }
132 $s .= '<h4>'.$date."</h4>\n<ul class=\"special\">";
133 $this->lastdate = $date;
134 $this->rclistOpen = true;
135 }
136 }
137
138 function insertLog(&$s, $title, $logtype) {
139 $logname = LogPage::logName( $logtype );
140 $s .= '(' . Linker::makeKnownLinkObj($title, $logname ) . ')';
141 }
142
143
144 function insertDiffHist(&$s, &$rc, $unpatrolled) {
145 # Diff link
146 if( $rc->mAttribs['rc_type'] == RC_NEW || $rc->mAttribs['rc_type'] == RC_LOG ) {
147 $diffLink = $this->message['diff'];
148 } else {
149 $rcidparam = $unpatrolled
150 ? array( 'rcid' => $rc->mAttribs['rc_id'] )
151 : array();
152 $diffLink = Linker::makeKnownLinkObj( $rc->getTitle(), $this->message['diff'],
153 wfArrayToCGI( array(
154 'curid' => $rc->mAttribs['rc_cur_id'],
155 'diff' => $rc->mAttribs['rc_this_oldid'],
156 'oldid' => $rc->mAttribs['rc_last_oldid'] ),
157 $rcidparam ),
158 '', '', ' tabindex="'.$rc->counter.'"');
159 }
160 $s .= '('.$diffLink.') (';
161
162 # History link
163 $s .= Linker::makeKnownLinkObj( $rc->getTitle(), $this->message['hist'],
164 wfArrayToCGI( array(
165 'curid' => $rc->mAttribs['rc_cur_id'],
166 'action' => 'history' ) ) );
167 $s .= ') . . ';
168 }
169
170 function insertArticleLink(&$s, &$rc, $unpatrolled, $watched) {
171 # Article link
172 # If it's a new article, there is no diff link, but if it hasn't been
173 # patrolled yet, we need to give users a way to do so
174 $params = ( $unpatrolled && $rc->mAttribs['rc_type'] == RC_NEW )
175 ? 'rcid='.$rc->mAttribs['rc_id']
176 : '';
177 $articlelink = ' '. Linker::makeKnownLinkObj( $rc->getTitle(), '', $params );
178 if($watched) $articlelink = '<strong>'.$articlelink.'</strong>';
179 global $wgContLang;
180 $articlelink .= $wgContLang->getDirMark();
181
182 $s .= ' '.$articlelink;
183 }
184
185 function insertTimestamp(&$s, &$rc) {
186 global $wgLang;
187 # Timestamp
188 $s .= '; ' . $wgLang->time( $rc->mAttribs['rc_timestamp'], true, true ) . ' . . ';
189 }
190
191 /** Insert links to user page, user talk page and eventually a blocking link */
192 function insertUserRelatedLinks(&$s, &$rc) {
193 $s .= Linker::userLink( $rc->mAttribs['rc_user'], $rc->mAttribs['rc_user_text'] );
194 $s .= Linker::userToolLinks( $rc->mAttribs['rc_user'], $rc->mAttribs['rc_user_text'] );
195 }
196
197 /** insert a formatted comment */
198 function insertComment(&$s, &$rc) {
199 # Add comment
200 if( $rc->mAttribs['rc_type'] != RC_MOVE && $rc->mAttribs['rc_type'] != RC_MOVE_OVER_REDIRECT ) {
201 $s .= Linker::commentBlock( $rc->mAttribs['rc_comment'], $rc->getTitle() );
202 }
203 }
204
205 /**
206 * Check whether to enable recent changes patrol features
207 * @return bool
208 */
209 function usePatrol() {
210 global $wgUseRCPatrol, $wgUser;
211 return( $wgUseRCPatrol && $wgUser->isAllowed( 'patrol' ) );
212 }
213
214
215 }
216
217
218 /**
219 * Generate a list of changes using the good old system (no javascript)
220 */
221 class OldChangesList extends ChangesList {
222 /**
223 * Format a line using the old system (aka without any javascript).
224 */
225 function recentChangesLine( &$rc, $watched = false ) {
226 global $wgContLang;
227
228 $fname = 'ChangesList::recentChangesLineOld';
229 wfProfileIn( $fname );
230
231
232 # Extract DB fields into local scope
233 extract( $rc->mAttribs );
234 $curIdEq = 'curid=' . $rc_cur_id;
235
236 # Should patrol-related stuff be shown?
237 $unpatrolled = $this->usePatrol() && $rc_patrolled == 0;
238
239 $this->insertDateHeader($s,$rc_timestamp);
240
241 $s .= '<li>';
242
243 // moved pages
244 if( $rc_type == RC_MOVE || $rc_type == RC_MOVE_OVER_REDIRECT ) {
245 $this->insertMove( $s, $rc );
246 // log entries
247 } elseif ( $rc_namespace == NS_SPECIAL ) {
248 list( $specialName, $specialSubpage ) = SpecialPage::resolveAliasWithSubpage( $rc_title );
249 if ( $specialName == 'Log' ) {
250 $this->insertLog( $s, $rc->getTitle(), $specialSubpage );
251 } else {
252 wfDebug( "Unexpected special page in recentchanges\n" );
253 }
254 // all other stuff
255 } else {
256 wfProfileIn($fname.'-page');
257
258 $this->insertDiffHist($s, $rc, $unpatrolled);
259
260 # M, N, b and ! (minor, new, bot and unpatrolled)
261 $s .= ' ' . $this->recentChangesFlags( $rc_type == RC_NEW, $rc_minor, $unpatrolled, '', $rc_bot );
262 $this->insertArticleLink($s, $rc, $unpatrolled, $watched);
263
264 wfProfileOut($fname.'-page');
265 }
266
267 wfProfileIn( $fname.'-rest' );
268
269 $this->insertTimestamp($s,$rc);
270 $this->insertUserRelatedLinks($s,$rc);
271 $this->insertComment($s, $rc);
272
273 if($rc->numberofWatchingusers > 0) {
274 $s .= ' ' . wfMsg('number_of_watching_users_RCview', $wgContLang->formatNum($rc->numberofWatchingusers));
275 }
276
277 $s .= "</li>\n";
278
279 wfProfileOut( $fname.'-rest' );
280
281 wfProfileOut( $fname );
282 return $s;
283 }
284 }
285
286
287 /**
288 * Generate a list of changes using an Enhanced system (use javascript).
289 */
290 class EnhancedChangesList extends ChangesList {
291 /**
292 * Format a line for enhanced recentchange (aka with javascript and block of lines).
293 */
294 function recentChangesLine( &$baseRC, $watched = false ) {
295 global $wgLang, $wgContLang;
296
297 # Create a specialised object
298 $rc = RCCacheEntry::newFromParent( $baseRC );
299
300 # Extract fields from DB into the function scope (rc_xxxx variables)
301 extract( $rc->mAttribs );
302 $curIdEq = 'curid=' . $rc_cur_id;
303
304 # If it's a new day, add the headline and flush the cache
305 $date = $wgLang->date( $rc_timestamp, true);
306 $ret = '';
307 if( $date != $this->lastdate ) {
308 # Process current cache
309 $ret = $this->recentChangesBlock();
310 $this->rc_cache = array();
311 $ret .= "<h4>{$date}</h4>\n";
312 $this->lastdate = $date;
313 }
314
315 # Should patrol-related stuff be shown?
316 if( $this->usePatrol() ) {
317 $rc->unpatrolled = !$rc_patrolled;
318 } else {
319 $rc->unpatrolled = false;
320 }
321
322 # Make article link
323 if( $rc_type == RC_MOVE || $rc_type == RC_MOVE_OVER_REDIRECT ) {
324 $msg = ( $rc_type == RC_MOVE ) ? "1movedto2" : "1movedto2_redir";
325 $clink = wfMsg( $msg, Linker::makeKnownLinkObj( $rc->getTitle(), '', 'redirect=no' ),
326 Linker::makeKnownLinkObj( $rc->getMovedToTitle(), '' ) );
327 } elseif( $rc_namespace == NS_SPECIAL ) {
328 list( $specialName, $logtype ) = SpecialPage::resolveAliasWithSubpage( $rc_title );
329 if ( $specialName == 'Log' ) {
330 # Log updates, etc
331 $logname = LogPage::logName( $logtype );
332 $clink = '(' . Linker::makeKnownLinkObj( $rc->getTitle(), $logname ) . ')';
333 } else {
334 wfDebug( "Unexpected special page in recentchanges\n" );
335 $clink = '';
336 }
337 } elseif( $rc->unpatrolled && $rc_type == RC_NEW ) {
338 # Unpatrolled new page, give rc_id in query
339 $clink = Linker::makeKnownLinkObj( $rc->getTitle(), '', "rcid={$rc_id}" );
340 } else {
341 $clink = Linker::makeKnownLinkObj( $rc->getTitle(), '' );
342 }
343
344 $time = $wgContLang->time( $rc_timestamp, true, true );
345 $rc->watched = $watched;
346 $rc->link = $clink;
347 $rc->timestamp = $time;
348 $rc->numberofWatchingusers = $baseRC->numberofWatchingusers;
349
350 # Make "cur" and "diff" links
351 if( $rc->unpatrolled ) {
352 $rcIdQuery = "&rcid={$rc_id}";
353 } else {
354 $rcIdQuery = '';
355 }
356 $querycur = $curIdEq."&diff=0&oldid=$rc_this_oldid";
357 $querydiff = $curIdEq."&diff=$rc_this_oldid&oldid=$rc_last_oldid$rcIdQuery";
358 $aprops = ' tabindex="'.$baseRC->counter.'"';
359 $curLink = Linker::makeKnownLinkObj( $rc->getTitle(), $this->message['cur'], $querycur, '' ,'', $aprops );
360 if( $rc_type == RC_NEW || $rc_type == RC_LOG || $rc_type == RC_MOVE || $rc_type == RC_MOVE_OVER_REDIRECT ) {
361 if( $rc_type != RC_NEW ) {
362 $curLink = $this->message['cur'];
363 }
364 $diffLink = $this->message['diff'];
365 } else {
366 $diffLink = Linker::makeKnownLinkObj( $rc->getTitle(), $this->message['diff'], $querydiff, '' ,'', $aprops );
367 }
368
369 # Make "last" link
370 if( $rc_last_oldid == 0 || $rc_type == RC_LOG || $rc_type == RC_MOVE || $rc_type == RC_MOVE_OVER_REDIRECT ) {
371 $lastLink = $this->message['last'];
372 } else {
373 $lastLink = Linker::makeKnownLinkObj( $rc->getTitle(), $this->message['last'],
374 $curIdEq.'&diff='.$rc_this_oldid.'&oldid='.$rc_last_oldid . $rcIdQuery );
375 }
376
377 $rc->userlink = Linker::userLink( $rc_user, $rc_user_text );
378
379 $rc->lastlink = $lastLink;
380 $rc->curlink = $curLink;
381 $rc->difflink = $diffLink;
382
383 $rc->usertalklink = Linker::userToolLinks( $rc_user, $rc_user_text );
384
385 # Put accumulated information into the cache, for later display
386 # Page moves go on their own line
387 $title = $rc->getTitle();
388 $secureName = $title->getPrefixedDBkey();
389 if( $rc_type == RC_MOVE || $rc_type == RC_MOVE_OVER_REDIRECT ) {
390 # Use an @ character to prevent collision with page names
391 $this->rc_cache['@@' . ($this->rcMoveIndex++)] = array($rc);
392 } else {
393 if( !isset ( $this->rc_cache[$secureName] ) ) {
394 $this->rc_cache[$secureName] = array();
395 }
396 array_push( $this->rc_cache[$secureName], $rc );
397 }
398 return $ret;
399 }
400
401 /**
402 * Enhanced RC group
403 */
404 function recentChangesBlockGroup( $block ) {
405 global $wgContLang;
406 $r = '';
407
408 # Collate list of users
409 $isnew = false;
410 $unpatrolled = false;
411 $userlinks = array();
412 foreach( $block as $rcObj ) {
413 $oldid = $rcObj->mAttribs['rc_last_oldid'];
414 $newid = $rcObj->mAttribs['rc_this_oldid'];
415 if( $rcObj->mAttribs['rc_new'] ) {
416 $isnew = true;
417 }
418 $u = $rcObj->userlink;
419 if( !isset( $userlinks[$u] ) ) {
420 $userlinks[$u] = 0;
421 }
422 if( $rcObj->unpatrolled ) {
423 $unpatrolled = true;
424 }
425 $bot = $rcObj->mAttribs['rc_bot'];
426 $userlinks[$u]++;
427 }
428
429 # Sort the list and convert to text
430 krsort( $userlinks );
431 asort( $userlinks );
432 $users = array();
433 foreach( $userlinks as $userlink => $count) {
434 $text = $userlink;
435 $text .= $wgContLang->getDirMark();
436 if( $count > 1 ) {
437 $text .= ' ('.$count.'&times;)';
438 }
439 array_push( $users, $text );
440 }
441
442 $users = ' <span class="changedby">['.implode('; ',$users).']</span>';
443
444 # Arrow
445 $rci = 'RCI'.$this->rcCacheIndex;
446 $rcl = 'RCL'.$this->rcCacheIndex;
447 $rcm = 'RCM'.$this->rcCacheIndex;
448 $toggleLink = "javascript:toggleVisibility('$rci','$rcm','$rcl')";
449 $tl = '<span id="'.$rcm.'"><a href="'.$toggleLink.'">' . $this->sideArrow() . '</a></span>';
450 $tl .= '<span id="'.$rcl.'" style="display:none"><a href="'.$toggleLink.'">' . $this->downArrow() . '</a></span>';
451 $r .= $tl;
452
453 # Main line
454 $r .= '<tt>';
455 $r .= $this->recentChangesFlags( $isnew, false, $unpatrolled, '&nbsp;', $bot );
456
457 # Timestamp
458 $r .= ' '.$block[0]->timestamp.' ';
459 $r .= '</tt>';
460
461 # Article link
462 $r .= $this->maybeWatchedLink( $block[0]->link, $block[0]->watched );
463 $r .= $wgContLang->getDirMark();
464
465 $curIdEq = 'curid=' . $block[0]->mAttribs['rc_cur_id'];
466 $currentRevision = $block[0]->mAttribs['rc_this_oldid'];
467 if( $block[0]->mAttribs['rc_type'] != RC_LOG ) {
468 # Changes
469 $r .= ' ('.count($block).' ';
470 if( $isnew ) {
471 $r .= $this->message['changes'];
472 } else {
473 $r .= Linker::makeKnownLinkObj( $block[0]->getTitle(),
474 $this->message['changes'], $curIdEq."&diff=$currentRevision&oldid=$oldid" );
475 }
476 $r .= '; ';
477
478 # History
479 $r .= Linker::makeKnownLinkObj( $block[0]->getTitle(),
480 $this->message['history'], $curIdEq.'&action=history' );
481 $r .= ')';
482 }
483
484 $r .= $users;
485
486 if($block[0]->numberofWatchingusers > 0) {
487 global $wgContLang;
488 $r .= wfMsg('number_of_watching_users_RCview', $wgContLang->formatNum($block[0]->numberofWatchingusers));
489 }
490 $r .= "<br />\n";
491
492 # Sub-entries
493 $r .= '<div id="'.$rci.'" style="display:none">';
494 foreach( $block as $rcObj ) {
495 # Get rc_xxxx variables
496 extract( $rcObj->mAttribs );
497
498 $r .= $this->spacerArrow();
499 $r .= '<tt>&nbsp; &nbsp; &nbsp; &nbsp;';
500 $r .= $this->recentChangesFlags( $rc_new, $rc_minor, $rcObj->unpatrolled, '&nbsp;', $rc_bot );
501 $r .= '&nbsp;</tt>';
502
503 $o = '';
504 if( $rc_this_oldid != 0 ) {
505 $o = 'oldid='.$rc_this_oldid;
506 }
507 if( $rc_type == RC_LOG ) {
508 $link = $rcObj->timestamp;
509 } else {
510 $link = Linker::makeKnownLinkObj( $rcObj->getTitle(), $rcObj->timestamp, $curIdEq.'&'.$o );
511 }
512 $link = '<tt>'.$link.'</tt>';
513
514 $r .= $link;
515 $r .= ' (';
516 $r .= $rcObj->curlink;
517 $r .= '; ';
518 $r .= $rcObj->lastlink;
519 $r .= ') . . '.$rcObj->userlink;
520 $r .= $rcObj->usertalklink;
521 $r .= Linker::commentBlock( $rc_comment, $rcObj->getTitle() );
522 $r .= "<br />\n";
523 }
524 $r .= "</div>\n";
525
526 $this->rcCacheIndex++;
527 return $r;
528 }
529
530 function maybeWatchedLink( $link, $watched=false ) {
531 if( $watched ) {
532 // FIXME: css style might be more appropriate
533 return '<strong>' . $link . '</strong>';
534 } else {
535 return $link;
536 }
537 }
538
539 /**
540 * Generate HTML for an arrow or placeholder graphic
541 * @param string $dir one of '', 'd', 'l', 'r'
542 * @param string $alt text
543 * @return string HTML <img> tag
544 * @access private
545 */
546 function arrow( $dir, $alt='' ) {
547 global $wgStylePath;
548 $encUrl = htmlspecialchars( $wgStylePath . '/common/images/Arr_' . $dir . '.png' );
549 $encAlt = htmlspecialchars( $alt );
550 return "<img src=\"$encUrl\" width=\"12\" height=\"12\" alt=\"$encAlt\" />";
551 }
552
553 /**
554 * Generate HTML for a right- or left-facing arrow,
555 * depending on language direction.
556 * @return string HTML <img> tag
557 * @access private
558 */
559 function sideArrow() {
560 global $wgContLang;
561 $dir = $wgContLang->isRTL() ? 'l' : 'r';
562 return $this->arrow( $dir, '+' );
563 }
564
565 /**
566 * Generate HTML for a down-facing arrow
567 * depending on language direction.
568 * @return string HTML <img> tag
569 * @access private
570 */
571 function downArrow() {
572 return $this->arrow( 'd', '-' );
573 }
574
575 /**
576 * Generate HTML for a spacer image
577 * @return string HTML <img> tag
578 * @access private
579 */
580 function spacerArrow() {
581 return $this->arrow( '', ' ' );
582 }
583
584 /**
585 * Enhanced RC ungrouped line.
586 * @return string a HTML formated line (generated using $r)
587 */
588 function recentChangesBlockLine( $rcObj ) {
589 global $wgContLang;
590
591 # Get rc_xxxx variables
592 extract( $rcObj->mAttribs );
593 $curIdEq = 'curid='.$rc_cur_id;
594
595 $r = '';
596
597 # Spacer image
598 $r .= $this->spacerArrow();
599
600 # Flag and Timestamp
601 $r .= '<tt>';
602
603 if( $rc_type == RC_MOVE || $rc_type == RC_MOVE_OVER_REDIRECT ) {
604 $r .= '&nbsp;&nbsp;&nbsp;';
605 } else {
606 $r .= $this->recentChangesFlags( $rc_type == RC_NEW, $rc_minor, $rcObj->unpatrolled, '&nbsp;', $rc_bot );
607 }
608 $r .= ' '.$rcObj->timestamp.' </tt>';
609
610 # Article link
611 $r .= $this->maybeWatchedLink( $rcObj->link, $rcObj->watched );
612
613 # Diff
614 $r .= ' ('. $rcObj->difflink .'; ';
615
616 # Hist
617 $r .= Linker::makeKnownLinkObj( $rcObj->getTitle(), wfMsg( 'hist' ), $curIdEq.'&action=history' );
618
619 # User/talk
620 $r .= ') . . '.$rcObj->userlink . $rcObj->usertalklink;
621
622 # Comment
623 if( $rc_type != RC_MOVE && $rc_type != RC_MOVE_OVER_REDIRECT ) {
624 $r .= Linker::commentBlock( $rc_comment, $rcObj->getTitle() );
625 }
626
627 if( $rcObj->numberofWatchingusers > 0 ) {
628 $r .= wfMsg('number_of_watching_users_RCview', $wgContLang->formatNum($rcObj->numberofWatchingusers));
629 }
630
631 $r .= "<br />\n";
632 return $r;
633 }
634
635 /**
636 * If enhanced RC is in use, this function takes the previously cached
637 * RC lines, arranges them, and outputs the HTML
638 */
639 function recentChangesBlock() {
640 if( count ( $this->rc_cache ) == 0 ) {
641 return '';
642 }
643 $blockOut = '';
644 foreach( $this->rc_cache as $secureName => $block ) {
645 if( count( $block ) < 2 ) {
646 $blockOut .= $this->recentChangesBlockLine( array_shift( $block ) );
647 } else {
648 $blockOut .= $this->recentChangesBlockGroup( $block );
649 }
650 }
651
652 return '<div>'.$blockOut.'</div>';
653 }
654
655 /**
656 * Returns text for the end of RC
657 * If enhanced RC is in use, returns pretty much all the text
658 */
659 function endRecentChangesList() {
660 return $this->recentChangesBlock() . parent::endRecentChangesList();
661 }
662
663 }
664 ?>