2 # Copyright (C) 2004 Brion Vibber <brion@pobox.com>, 2008 Aaron Schulz
3 # http://www.mediawiki.org/
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 const NO_ACTION_LINK
= 1;
27 function __construct( $skin, $out, $flags = 0 ) {
30 $this->flags
= $flags;
31 $this->preCacheMessages();
35 * As we use the same small set of messages in various methods and that
36 * they are called often, we call them once and save them in $this->message
38 private function preCacheMessages() {
39 // Precache various messages
40 if( !isset( $this->message
) ) {
41 $messages = 'revertmerge protect_change unblocklink revertmove undeletelink revdel-restore rev-delundel hist';
42 foreach( explode( ' ', $messages ) as $msg ) {
43 $this->message
[$msg] = wfMsgExt( $msg, array( 'escape') );
49 * Set page title and show header for this log type
52 public function showHeader( $type ) {
53 if( LogPage
::isLogType( $type ) ) {
54 $this->out
->setPageTitle( LogPage
::logName( $type ) );
55 $this->out
->addHTML( LogPage
::logHeader( $type ) );
60 * Show options for the log list
64 * @param $pattern String
65 * @param $year Integer: year
66 * @param $month Integer: month
67 * @param $filter Boolean
69 public function showOptions( $type = '', $user = '', $page = '', $pattern = '', $year = '',
70 $month = '', $filter = null )
72 global $wgScript, $wgMiserMode;
73 $action = htmlspecialchars( $wgScript );
74 $title = SpecialPage
::getTitleFor( 'Log' );
75 $special = htmlspecialchars( $title->getPrefixedDBkey() );
77 $this->out
->addHTML( "<form action=\"$action\" method=\"get\"><fieldset>" .
78 Xml
::element( 'legend', array(), wfMsg( 'log' ) ) .
79 Xml
::hidden( 'title', $special ) . "\n" .
80 $this->getTypeMenu( $type ) . "\n" .
81 $this->getUserInput( $user ) . "\n" .
82 $this->getTitleInput( $page ) . "\n" .
83 ( !$wgMiserMode ?
($this->getTitlePattern( $pattern )."\n") : "" ) .
84 "<p>" . $this->getDateMenu( $year, $month ) . "\n" .
85 ( $filter ?
"</p><p>".$this->getFilterLinks( $type, $filter )."\n" : "" ) .
86 Xml
::submitButton( wfMsg( 'allpagessubmit' ) ) . "</p>\n" .
91 private function getFilterLinks( $logType, $filter ) {
94 $messages = array( wfMsgHtml( 'show' ), wfMsgHtml( 'hide' ) );
95 // Option value -> message mapping
97 foreach( $filter as $type => $val ) {
98 $hideVal = 1 - intval($val);
99 $link = $this->skin
->makeKnownLinkObj( $wgTitle, $messages[$hideVal],
100 wfArrayToCGI( array( "hide_{$type}_log" => $hideVal ), $this->getDefaultQuery() )
102 $links[$type] = wfMsgHtml( "log-show-hide-{$type}", $link );
105 return implode( ' | ', $links );
108 private function getDefaultQuery() {
109 if ( !isset( $this->mDefaultQuery
) ) {
110 $this->mDefaultQuery
= $_GET;
111 unset( $this->mDefaultQuery
['title'] );
112 unset( $this->mDefaultQuery
['dir'] );
113 unset( $this->mDefaultQuery
['offset'] );
114 unset( $this->mDefaultQuery
['limit'] );
115 unset( $this->mDefaultQuery
['order'] );
116 unset( $this->mDefaultQuery
['month'] );
117 unset( $this->mDefaultQuery
['year'] );
119 return $this->mDefaultQuery
;
123 * @param $queryType String
124 * @return String: Formatted HTML
126 private function getTypeMenu( $queryType ) {
127 global $wgLogRestrictions, $wgUser;
129 $html = "<select name='type'>\n";
131 $validTypes = LogPage
::validTypes();
132 $typesByName = array(); // Temporary array
134 // First pass to load the log names
135 foreach( $validTypes as $type ) {
136 $text = LogPage
::logName( $type );
137 $typesByName[$text] = $type;
140 // Second pass to sort by name
143 // Third pass generates sorted XHTML content
144 foreach( $typesByName as $text => $type ) {
145 $selected = ($type == $queryType);
147 if ( isset($wgLogRestrictions[$type]) ) {
148 if ( $wgUser->isAllowed( $wgLogRestrictions[$type] ) ) {
149 $html .= Xml
::option( $text, $type, $selected ) . "\n";
152 $html .= Xml
::option( $text, $type, $selected ) . "\n";
156 $html .= '</select>';
161 * @param $user String
162 * @return String: Formatted HTML
164 private function getUserInput( $user ) {
165 return Xml
::inputLabel( wfMsg( 'specialloguserlabel' ), 'user', 'user', 15, $user );
169 * @param $title String
170 * @return String: Formatted HTML
172 private function getTitleInput( $title ) {
173 return Xml
::inputLabel( wfMsg( 'speciallogtitlelabel' ), 'page', 'page', 20, $title );
177 * @param $year Integer
178 * @param $month Integer
179 * @return string Formatted HTML
181 private function getDateMenu( $year, $month ) {
182 # Offset overrides year/month selection
183 if( $month && $month !== -1 ) {
184 $encMonth = intval( $month );
189 $encYear = intval( $year );
190 } else if( $encMonth ) {
191 $thisMonth = intval( gmdate( 'n' ) );
192 $thisYear = intval( gmdate( 'Y' ) );
193 if( intval($encMonth) > $thisMonth ) {
196 $encYear = $thisYear;
200 return Xml
::label( wfMsg( 'year' ), 'year' ) . ' '.
201 Xml
::input( 'year', 4, $encYear, array('id' => 'year', 'maxlength' => 4) ) .
203 Xml
::label( wfMsg( 'month' ), 'month' ) . ' '.
204 Xml
::monthSelector( $encMonth, -1 );
208 * @return boolean Checkbox
210 private function getTitlePattern( $pattern ) {
211 return '<span style="white-space: nowrap">' .
212 Xml
::checkLabel( wfMsg( 'log-title-wildcard' ), 'pattern', 'pattern', $pattern ) .
216 public function beginLogEventsList() {
220 public function endLogEventsList() {
225 * @param $row Row: a single row from the result set
226 * @return String: Formatted HTML list item
228 public function logLine( $row ) {
229 global $wgLang, $wgUser, $wgContLang;
231 $title = Title
::makeTitle( $row->log_namespace
, $row->log_title
);
232 $time = $wgLang->timeanddate( wfTimestamp(TS_MW
, $row->log_timestamp
), true );
234 if( self
::isDeleted($row,LogPage
::DELETED_USER
) ) {
235 $userLink = '<span class="history-deleted">' . wfMsgHtml( 'rev-deleted-user' ) . '</span>';
237 $userLink = $this->skin
->userLink( $row->log_user
, $row->user_name
) .
238 $this->skin
->userToolLinks( $row->log_user
, $row->user_name
, true, 0, $row->user_editcount
);
241 if( self
::isDeleted($row,LogPage
::DELETED_COMMENT
) ) {
242 $comment = '<span class="history-deleted">' . wfMsgHtml('rev-deleted-comment') . '</span>';
244 $comment = $wgContLang->getDirMark() . $this->skin
->commentBlock( $row->log_comment
);
246 // Extract extra parameters
247 $paramArray = LogPage
::extractParams( $row->log_params
);
249 // Some user can hide log items and have review links
250 if( $wgUser->isAllowed( 'deleterevision' ) ) {
251 $del = $this->getShowHideLinks( $row ) . ' ';
253 // Add review links and such...
254 if( ($this->flags
& self
::NO_ACTION_LINK
) ||
($row->log_deleted
& LogPage
::DELETED_ACTION
) ) {
255 // Action text is suppressed...
256 } else if( self
::typeAction($row,'move','move') && !empty($paramArray[0]) && $wgUser->isAllowed( 'move' ) ) {
257 $destTitle = Title
::newFromText( $paramArray[0] );
259 $revert = '(' . $this->skin
->makeKnownLinkObj( SpecialPage
::getTitleFor( 'Movepage' ),
260 $this->message
['revertmove'],
261 'wpOldTitle=' . urlencode( $destTitle->getPrefixedDBkey() ) .
262 '&wpNewTitle=' . urlencode( $title->getPrefixedDBkey() ) .
263 '&wpReason=' . urlencode( wfMsgForContent( 'revertmove' ) ) .
264 '&wpMovetalk=0' ) . ')';
266 // Show undelete link
267 } else if( self
::typeAction($row,array('delete','suppress'),'delete') && $wgUser->isAllowed( 'delete' ) ) {
268 $revert = '(' . $this->skin
->makeKnownLinkObj( SpecialPage
::getTitleFor( 'Undelete' ),
269 $this->message
['undeletelink'], 'target='. urlencode( $title->getPrefixedDBkey() ) ) . ')';
271 } else if( self
::typeAction($row,array('block','suppress'),'block') && $wgUser->isAllowed( 'block' ) ) {
272 $revert = '(' . $this->skin
->makeKnownLinkObj( SpecialPage
::getTitleFor( 'Ipblocklist' ),
273 $this->message
['unblocklink'],
274 'action=unblock&ip=' . urlencode( $row->log_title
) ) . ')';
275 // Show change protection link
276 } else if( self
::typeAction($row,'protect',array('modify','protect','unprotect')) ) {
277 $revert .= ' (' . $this->skin
->makeKnownLinkObj( $title, $this->message
['hist'],
278 'action=history&offset=' . urlencode($row->log_timestamp
) ) . ')';
279 if( $wgUser->isAllowed('protect') && $row->log_action
!= 'unprotect' ) {
280 $revert .= ' (' . $this->skin
->makeKnownLinkObj( $title, $this->message
['protect_change'],
281 'action=unprotect' ) . ')';
284 } else if ( self
::typeAction($row,'merge','merge') ) {
285 $merge = SpecialPage
::getTitleFor( 'Mergehistory' );
286 $revert = '(' . $this->skin
->makeKnownLinkObj( $merge, $this->message
['revertmerge'],
287 wfArrayToCGI( array('target' => $paramArray[0], 'dest' => $title->getPrefixedDBkey(),
288 'mergepoint' => $paramArray[1] ) ) ) . ')';
289 // If an edit was hidden from a page give a review link to the history
290 } else if( self
::typeAction($row,array('delete','suppress'),'revision') && $wgUser->isAllowed( 'deleterevision' ) ) {
291 if( count($paramArray) == 2 ) {
292 $revdel = SpecialPage
::getTitleFor( 'Revisiondelete' );
293 // Different revision types use different URL params...
294 $key = $paramArray[0];
295 // Link to each hidden object ID, $paramArray[1] is the url param
296 $Ids = explode( ',', $paramArray[1] );
298 foreach( $Ids as $n => $id ) {
299 $revParams .= '&' . urlencode($key) . '[]=' . urlencode($id);
301 $revert = '(' . $this->skin
->makeKnownLinkObj( $revdel, $this->message
['revdel-restore'],
302 'target=' . $title->getPrefixedUrl() . $revParams ) . ')';
304 // Hidden log items, give review link
305 } else if( self
::typeAction($row,array('delete','suppress'),'event') && $wgUser->isAllowed( 'deleterevision' ) ) {
306 if( count($paramArray) == 1 ) {
307 $revdel = SpecialPage
::getTitleFor( 'Revisiondelete' );
308 $Ids = explode( ',', $paramArray[0] );
309 // Link to each hidden object ID, $paramArray[1] is the url param
311 foreach( $Ids as $n => $id ) {
312 $logParams .= '&logid[]=' . intval($id);
314 $revert = '(' . $this->skin
->makeKnownLinkObj( $revdel, $this->message
['revdel-restore'],
315 'target=' . $title->getPrefixedUrl() . $logParams ) . ')';
317 // Self-created users
318 } else if( self
::typeAction($row,'newusers','create2') ) {
319 if( isset( $paramArray[0] ) ) {
320 $revert = $this->skin
->userToolLinks( $paramArray[0], $title->getDBkey(), true );
322 # Fall back to a blue contributions link
323 $revert = $this->skin
->userToolLinks( 1, $title->getDBkey() );
325 if( $time < '20080129000000' ) {
326 # Suppress $comment from old entries (before 2008-01-29), not needed and can contain incorrect links
329 // Do nothing. The implementation is handled by the hook modifiying the passed-by-ref parameters.
331 wfRunHooks( 'LogLine', array( $row->log_type
, $row->log_action
, $title, $paramArray,
332 &$comment, &$revert, $row->log_timestamp
) );
335 if( self
::isDeleted($row,LogPage
::DELETED_ACTION
) ) {
336 $action = '<span class="history-deleted">' . wfMsgHtml('rev-deleted-event') . '</span>';
338 $action = LogPage
::actionText( $row->log_type
, $row->log_action
, $title, $this->skin
, $paramArray, true );
341 return "<li>$del$time $userLink $action $comment $revert</li>\n";
348 private function getShowHideLinks( $row ) {
349 $revdel = SpecialPage
::getTitleFor( 'Revisiondelete' );
350 // If event was hidden from sysops
351 if( !self
::userCan( $row, LogPage
::DELETED_RESTRICTED
) ) {
352 $del = $this->message
['rev-delundel'];
353 } else if( $row->log_type
== 'suppress' ) {
354 // No one should be hiding from the oversight log
355 $del = $this->message
['rev-delundel'];
357 $target = SpecialPage
::getTitleFor( 'Log', $row->log_type
);
358 $del = $this->skin
->makeKnownLinkObj( $revdel, $this->message
['rev-delundel'],
359 'target=' . $target->getPrefixedUrl() . '&logid='.$row->log_id
);
360 // Bolden oversighted content
361 if( self
::isDeleted( $row, LogPage
::DELETED_RESTRICTED
) )
362 $del = "<strong>$del</strong>";
364 return "<tt>(<small>$del</small>)</tt>";
369 * @param $type Mixed: string/array
370 * @param $action Mixed: string/array
373 public static function typeAction( $row, $type, $action ) {
374 $match = is_array($type) ?
in_array($row->log_type
,$type) : $row->log_type
== $type;
376 $match = is_array($action) ?
in_array($row->log_action
,$action) : $row->log_action
== $action;
382 * Determine if the current user is allowed to view a particular
383 * field of this log row, if it's marked as deleted.
385 * @param $field Integer
388 public static function userCan( $row, $field ) {
389 if( ( $row->log_deleted
& $field ) == $field ) {
391 $permission = ( $row->log_deleted
& LogPage
::DELETED_RESTRICTED
) == LogPage
::DELETED_RESTRICTED
394 wfDebug( "Checking for $permission due to $field match on $row->log_deleted\n" );
395 return $wgUser->isAllowed( $permission );
403 * @param $field Integer: one of DELETED_* bitfield constants
406 public static function isDeleted( $row, $field ) {
407 return ($row->log_deleted
& $field) == $field;
411 * Quick function to show a short log extract
412 * @param $out OutputPage
413 * @param $type String
414 * @param $page String
415 * @param $user String
416 * @param $lim Integer
417 * @param $conds Array
419 public static function showLogExtract( $out, $type='', $page='', $user='', $lim=0, $conds=array() ) {
421 # Insert list of top 50 or so items
422 $loglist = new LogEventsList( $wgUser->getSkin(), $out, 0 );
423 $pager = new LogPager( $loglist, $type, $user, $page, '', $conds );
424 if( $lim > 0 ) $pager->mLimit
= $lim;
425 $logBody = $pager->getBody();
428 $loglist->beginLogEventsList() .
430 $loglist->endLogEventsList()
433 $out->addWikiMsg( 'logempty' );
435 return $pager->getNumRows();
439 * SQL clause to skip forbidden log types for this user
440 * @param $db Database
441 * @return mixed (string or false)
443 public static function getExcludeClause( $db ) {
444 global $wgLogRestrictions, $wgUser;
445 // Reset the array, clears extra "where" clauses when $par is used
446 $hiddenLogs = array();
447 // Don't show private logs to unprivileged users
448 foreach( $wgLogRestrictions as $logType => $right ) {
449 if( !$wgUser->isAllowed($right) ) {
450 $safeType = $db->strencode( $logType );
451 $hiddenLogs[] = $safeType;
454 if( count($hiddenLogs) == 1 ) {
455 return 'log_type != ' . $db->addQuotes( $hiddenLogs[0] );
456 } elseif( $hiddenLogs ) {
457 return 'log_type NOT IN (' . $db->makeList($hiddenLogs) . ')';
466 class LogPager
extends ReverseChronologicalPager
{
467 private $type = '', $user = '', $title = '', $pattern = '';
468 public $mLogEventsList;
472 * @param $list LogEventsList
473 * @param $type String
474 * @param $user String
475 * @param $title String
476 * @param $pattern String
477 * @param $conds Array
478 * @param $year Integer
479 * @param $month Integer
481 function __construct( $list, $type = '', $user = '', $title = '', $pattern = '',
482 $conds = array(), $year = false, $month = false )
484 parent
::__construct();
485 $this->mConds
= $conds;
487 $this->mLogEventsList
= $list;
489 $this->limitType( $type );
490 $this->limitUser( $user );
491 $this->limitTitle( $title, $pattern );
492 $this->getDateCond( $year, $month );
495 public function getDefaultQuery() {
496 $query = parent
::getDefaultQuery();
497 $query['type'] = $this->type
;
498 $query['month'] = $this->mMonth
;
499 $query['year'] = $this->mYear
;
503 public function getFilterParams() {
504 global $wgFilterLogTypes, $wgUser, $wgRequest;
509 foreach( $wgFilterLogTypes as $type => $default ) {
510 // Avoid silly filtering
511 if( $type !== 'patrol' ||
$wgUser->useNPPatrol() ) {
512 $hide = $wgRequest->getInt( "hide_{$type}_log", $default );
513 $filters[$type] = $hide;
515 $this->mConds
[] = 'log_type != ' . $this->mDb
->addQuotes( $type );
522 * Set the log reader to return only entries of the given type.
523 * Type restrictions enforced here
524 * @param $type String: A log type ('upload', 'delete', etc)
526 private function limitType( $type ) {
527 global $wgLogRestrictions, $wgUser;
528 // Don't even show header for private logs; don't recognize it...
529 if( isset($wgLogRestrictions[$type]) && !$wgUser->isAllowed($wgLogRestrictions[$type]) ) {
532 // Don't show private logs to unpriviledged users
533 $hideLogs = LogEventsList
::getExcludeClause( $this->mDb
);
534 if( $hideLogs !== false ) {
535 $this->mConds
[] = $hideLogs;
541 $this->mConds
['log_type'] = $type;
545 * Set the log reader to return only entries by the given user.
546 * @param $name String: (In)valid user name
548 private function limitUser( $name ) {
552 $usertitle = Title
::makeTitleSafe( NS_USER
, $name );
553 if( is_null($usertitle) ) {
556 /* Fetch userid at first, if known, provides awesome query plan afterwards */
557 $userid = User
::idFromName( $name );
559 /* It should be nicer to abort query at all,
560 but for now it won't pass anywhere behind the optimizer */
561 $this->mConds
[] = "NULL";
563 $this->mConds
['log_user'] = $userid;
564 $this->user
= $usertitle->getText();
569 * Set the log reader to return only entries affecting the given page.
570 * (For the block and rights logs, this is a user page.)
571 * @param $page String: Title name as text
572 * @param $pattern String
574 private function limitTitle( $page, $pattern ) {
577 $title = Title
::newFromText( $page );
578 if( strlen($page) == 0 ||
!$title instanceof Title
)
581 $this->title
= $title->getPrefixedText();
582 $ns = $title->getNamespace();
583 # Using the (log_namespace, log_title, log_timestamp) index with a
584 # range scan (LIKE) on the first two parts, instead of simple equality,
585 # makes it unusable for sorting. Sorted retrieval using another index
586 # would be possible, but then we might have to scan arbitrarily many
587 # nodes of that index. Therefore, we need to avoid this if $wgMiserMode
590 # This is not a problem with simple title matches, because then we can
591 # use the page_time index. That should have no more than a few hundred
592 # log entries for even the busiest pages, so it can be safely scanned
593 # in full to satisfy an impossible condition on user or similar.
594 if( $pattern && !$wgMiserMode ) {
595 # use escapeLike to avoid expensive search patterns like 't%st%'
596 $safetitle = $this->mDb
->escapeLike( $title->getDBkey() );
597 $this->mConds
['log_namespace'] = $ns;
598 $this->mConds
[] = "log_title LIKE '$safetitle%'";
599 $this->pattern
= $pattern;
601 $this->mConds
['log_namespace'] = $ns;
602 $this->mConds
['log_title'] = $title->getDBkey();
606 public function getQueryInfo() {
607 $this->mConds
[] = 'user_id = log_user';
608 # Don't use the wrong logging index
609 if( $this->title ||
$this->pattern ||
$this->user
) {
610 $index = array( 'USE INDEX' => array( 'logging' => array('page_time','user_time') ) );
611 } else if( $this->type
) {
612 $index = array( 'USE INDEX' => array( 'logging' => 'type_time' ) );
614 $index = array( 'USE INDEX' => array( 'logging' => 'times' ) );
617 'tables' => array( 'logging', 'user' ),
618 'fields' => array( 'log_type', 'log_action', 'log_user', 'log_namespace', 'log_title', 'log_params',
619 'log_comment', 'log_id', 'log_deleted', 'log_timestamp', 'user_name', 'user_editcount' ),
620 'conds' => $this->mConds
,
625 function getIndexField() {
626 return 'log_timestamp';
629 public function getStartBody() {
630 wfProfileIn( __METHOD__
);
631 # Do a link batch query
632 if( $this->getNumRows() > 0 ) {
634 while( $row = $this->mResult
->fetchObject() ) {
635 $lb->add( $row->log_namespace
, $row->log_title
);
636 $lb->addObj( Title
::makeTitleSafe( NS_USER
, $row->user_name
) );
637 $lb->addObj( Title
::makeTitleSafe( NS_USER_TALK
, $row->user_name
) );
640 $this->mResult
->seek( 0 );
642 wfProfileOut( __METHOD__
);
646 public function formatRow( $row ) {
647 return $this->mLogEventsList
->logLine( $row );
650 public function getType() {
654 public function getUser() {
658 public function getPage() {
662 public function getPattern() {
663 return $this->pattern
;
666 public function getYear() {
670 public function getMonth() {
671 return $this->mMonth
;
677 * @ingroup SpecialPage
682 * @param $request WebRequest: for internal use use a FauxRequest object to pass arbitrary parameters.
684 function __construct( $request ) {
685 global $wgUser, $wgOut;
687 $type = $request->getVal( 'type' );
688 $user = $request->getText( 'user' );
689 $title = $request->getText( 'page' );
690 $pattern = $request->getBool( 'pattern' );
691 $year = $request->getIntOrNull( 'year' );
692 $month = $request->getIntOrNull( 'month' );
693 # Don't let the user get stuck with a certain date
694 $skip = $request->getText( 'offset' ) ||
$request->getText( 'dir' ) == 'prev';
699 # Use new list class to output results
700 $loglist = new LogEventsList( $wgUser->getSkin(), $wgOut, 0 );
701 $this->pager
= new LogPager( $loglist, $type, $user, $title, $pattern, $year, $month );
705 * Is there at least one row?
708 public function hasRows() {
709 return isset($this->pager
) ?
($this->pager
->getNumRows() > 0) : false;
715 * @ingroup SpecialPage
718 const NO_ACTION_LINK
= 1;
726 * @param &$reader LogReader: where to get our data from
727 * @param $flags Integer: Bitwise combination of flags:
728 * LogEventsList::NO_ACTION_LINK Don't show restore/unblock/block links
730 function __construct( &$reader, $flags = 0 ) {
732 $this->reader
=& $reader;
733 $this->reader
->pager
->mLogEventsList
->flags
= $flags;
734 # Aliases for shorter code...
735 $this->pager
=& $this->reader
->pager
;
736 $this->list =& $this->reader
->pager
->mLogEventsList
;
740 * Take over the whole output page in $wgOut with the log display.
742 public function show() {
743 # Set title and add header
744 $this->list->showHeader( $pager->getType() );
746 $this->list->showOptions( $this->pager
->getType(), $this->pager
->getUser(), $this->pager
->getPage(),
747 $this->pager
->getPattern(), $this->pager
->getYear(), $this->pager
->getMonth() );
749 $logBody = $this->pager
->getBody();
752 $this->pager
->getNavigationBar() .
753 $this->list->beginLogEventsList() .
755 $this->list->endLogEventsList() .
756 $this->pager
->getNavigationBar()
759 $wgOut->addWikiMsg( 'logempty' );
764 * Output just the list of entries given by the linked LogReader,
765 * with extraneous UI elements. Use for displaying log fragments in
766 * another page (eg at Special:Undelete)
767 * @param $out OutputPage: where to send output
769 public function showList( &$out ) {
770 $logBody = $this->pager
->getBody();
773 $this->list->beginLogEventsList() .
775 $this->list->endLogEventsList()
778 $out->addWikiMsg( 'logempty' );