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
61 * @param string $type,
62 * @param string $user,
63 * @param string $page,
64 * @param string $pattern
69 public function showOptions( $type='', $user='', $page='', $pattern='', $y='', $m='', $filter=null ) {
70 global $wgScript, $wgMiserMode;
71 $action = htmlspecialchars( $wgScript );
72 $title = SpecialPage
::getTitleFor( 'Log' );
73 $special = htmlspecialchars( $title->getPrefixedDBkey() );
75 $this->out
->addHTML( "<form action=\"$action\" method=\"get\"><fieldset>" .
76 Xml
::element( 'legend', array(), wfMsg( 'log' ) ) .
77 Xml
::hidden( 'title', $special ) . "\n" .
78 $this->getTypeMenu( $type ) . "\n" .
79 $this->getUserInput( $user ) . "\n" .
80 $this->getTitleInput( $page ) . "\n" .
81 ( !$wgMiserMode ?
($this->getTitlePattern( $pattern )."\n") : "" ) .
82 "<p>" . $this->getDateMenu( $y, $m ) . "\n" .
83 ( !empty($filter) ?
"</p><p>".$this->getFilterLinks( $type, $filter )."\n" : "" ) .
84 Xml
::submitButton( wfMsg( 'allpagessubmit' ) ) . "</p>\n" .
89 private function getFilterLinks( $logtype, $filter ) {
92 $showhide = array( wfMsgHtml( 'show' ), wfMsgHtml( 'hide' ) );
93 // Option value -> message mapping
95 foreach( $filter as $type => $val ) {
96 $onoff = 1 - intval($val);
97 $link = $this->skin
->makeKnownLinkObj( $wgTitle, $showhide[$onoff],
98 wfArrayToCGI( array( "hide{$type}log" => $onoff ), $this->getDefaultQuery() )
100 $links[$type] = wfMsgHtml( "logshowhide-{$type}", $link );
103 return implode( ' | ', $links );
106 private function getDefaultQuery() {
107 if ( !isset( $this->mDefaultQuery
) ) {
108 $this->mDefaultQuery
= $_GET;
109 unset( $this->mDefaultQuery
['title'] );
110 unset( $this->mDefaultQuery
['dir'] );
111 unset( $this->mDefaultQuery
['offset'] );
112 unset( $this->mDefaultQuery
['limit'] );
113 unset( $this->mDefaultQuery
['order'] );
114 unset( $this->mDefaultQuery
['month'] );
115 unset( $this->mDefaultQuery
['year'] );
117 return $this->mDefaultQuery
;
121 * @return string Formatted HTML
122 * @param string $queryType
124 private function getTypeMenu( $queryType ) {
125 global $wgLogRestrictions, $wgUser;
127 $html = "<select name='type'>\n";
129 $validTypes = LogPage
::validTypes();
130 $m = array(); // Temporary array
132 // First pass to load the log names
133 foreach( $validTypes as $type ) {
134 $text = LogPage
::logName( $type );
138 // Second pass to sort by name
141 // Third pass generates sorted XHTML content
142 foreach( $m as $text => $type ) {
143 $selected = ($type == $queryType);
145 if ( isset($wgLogRestrictions[$type]) ) {
146 if ( $wgUser->isAllowed( $wgLogRestrictions[$type] ) ) {
147 $html .= Xml
::option( $text, $type, $selected ) . "\n";
150 $html .= Xml
::option( $text, $type, $selected ) . "\n";
154 $html .= '</select>';
159 * @return string Formatted HTML
160 * @param string $user
162 private function getUserInput( $user ) {
163 return Xml
::inputLabel( wfMsg( 'specialloguserlabel' ), 'user', 'user', 15, $user );
167 * @return string Formatted HTML
168 * @param string $title
170 private function getTitleInput( $title ) {
171 return Xml
::inputLabel( wfMsg( 'speciallogtitlelabel' ), 'page', 'page', 20, $title );
175 * @return string Formatted HTML
179 private function getDateMenu( $year, $month ) {
180 # Offset overrides year/month selection
181 if( $month && $month !== -1 ) {
182 $encMonth = intval( $month );
187 $encYear = intval( $year );
188 } else if( $encMonth ) {
189 $thisMonth = intval( gmdate( 'n' ) );
190 $thisYear = intval( gmdate( 'Y' ) );
191 if( intval($encMonth) > $thisMonth ) {
194 $encYear = $thisYear;
198 return Xml
::label( wfMsg( 'year' ), 'year' ) . ' '.
199 Xml
::input( 'year', 4, $encYear, array('id' => 'year', 'maxlength' => 4) ) .
201 Xml
::label( wfMsg( 'month' ), 'month' ) . ' '.
202 Xml
::monthSelector( $encMonth, -1 );
206 * @return boolean Checkbox
208 private function getTitlePattern( $pattern ) {
209 return '<span style="white-space: nowrap">' .
210 Xml
::checkLabel( wfMsg( 'log-title-wildcard' ), 'pattern', 'pattern', $pattern ) .
214 public function beginLogEventsList() {
218 public function endLogEventsList() {
223 * @param Row $row a single row from the result set
224 * @return string Formatted HTML list item
227 public function logLine( $row ) {
228 global $wgLang, $wgUser, $wgContLang;
230 $title = Title
::makeTitle( $row->log_namespace
, $row->log_title
);
231 $time = $wgLang->timeanddate( wfTimestamp(TS_MW
, $row->log_timestamp
), true );
233 if( self
::isDeleted($row,LogPage
::DELETED_USER
) ) {
234 $userLink = '<span class="history-deleted">' . wfMsgHtml( 'rev-deleted-user' ) . '</span>';
236 $userLink = $this->skin
->userLink( $row->log_user
, $row->user_name
) .
237 $this->skin
->userToolLinks( $row->log_user
, $row->user_name
, true, 0, $row->user_editcount
);
240 if( self
::isDeleted($row,LogPage
::DELETED_COMMENT
) ) {
241 $comment = '<span class="history-deleted">' . wfMsgHtml('rev-deleted-comment') . '</span>';
243 $comment = $wgContLang->getDirMark() . $this->skin
->commentBlock( $row->log_comment
);
245 // Extract extra parameters
246 $paramArray = LogPage
::extractParams( $row->log_params
);
248 // Some user can hide log items and have review links
249 if( $wgUser->isAllowed( 'deleterevision' ) ) {
250 $del = $this->showhideLinks( $row ) . ' ';
252 // Add review links and such...
253 if( ($this->flags
& self
::NO_ACTION_LINK
) ||
($row->log_deleted
& LogPage
::DELETED_ACTION
) ) {
254 // Action text is suppressed...
255 } else if( self
::typeAction($row,'move','move') && !empty($paramArray[0]) && $wgUser->isAllowed( 'move' ) ) {
256 $destTitle = Title
::newFromText( $paramArray[0] );
258 $revert = '(' . $this->skin
->makeKnownLinkObj( SpecialPage
::getTitleFor( 'Movepage' ),
259 $this->message
['revertmove'],
260 'wpOldTitle=' . urlencode( $destTitle->getPrefixedDBkey() ) .
261 '&wpNewTitle=' . urlencode( $title->getPrefixedDBkey() ) .
262 '&wpReason=' . urlencode( wfMsgForContent( 'revertmove' ) ) .
263 '&wpMovetalk=0' ) . ')';
265 // Show undelete link
266 } else if( self
::typeAction($row,array('delete','suppress'),'delete') && $wgUser->isAllowed( 'delete' ) ) {
267 $revert = '(' . $this->skin
->makeKnownLinkObj( SpecialPage
::getTitleFor( 'Undelete' ),
268 $this->message
['undeletelink'], 'target='. urlencode( $title->getPrefixedDBkey() ) ) . ')';
270 } else if( self
::typeAction($row,array('block','suppress'),'block') && $wgUser->isAllowed( 'block' ) ) {
271 $revert = '(' . $this->skin
->makeKnownLinkObj( SpecialPage
::getTitleFor( 'Ipblocklist' ),
272 $this->message
['unblocklink'],
273 'action=unblock&ip=' . urlencode( $row->log_title
) ) . ')';
274 // Show change protection link
275 } else if( self
::typeAction($row,'protect',array('modify','protect','unprotect')) ) {
276 $revert .= ' (' . $this->skin
->makeKnownLinkObj( $title, $this->message
['hist'],
277 'action=history&offset=' . urlencode($row->log_timestamp
) ) . ')';
278 if( $wgUser->isAllowed('protect') && $row->log_action
!= 'unprotect' ) {
279 $revert .= ' (' . $this->skin
->makeKnownLinkObj( $title, $this->message
['protect_change'],
280 'action=unprotect' ) . ')';
283 } else if ( self
::typeAction($row,'merge','merge') ) {
284 $merge = SpecialPage
::getTitleFor( 'Mergehistory' );
285 $revert = '(' . $this->skin
->makeKnownLinkObj( $merge, $this->message
['revertmerge'],
286 wfArrayToCGI( array('target' => $paramArray[0], 'dest' => $title->getPrefixedDBkey(),
287 'mergepoint' => $paramArray[1] ) ) ) . ')';
288 // If an edit was hidden from a page give a review link to the history
289 } else if( self
::typeAction($row,array('delete','suppress'),'revision') && $wgUser->isAllowed( 'deleterevision' ) ) {
290 if( count($paramArray) == 2 ) {
291 $revdel = SpecialPage
::getTitleFor( 'Revisiondelete' );
292 // Different revision types use different URL params...
293 $key = $paramArray[0];
294 // Link to each hidden object ID, $paramArray[1] is the url param
295 $Ids = explode( ',', $paramArray[1] );
297 foreach( $Ids as $n => $id ) {
298 $revParams .= '&' . urlencode($key) . '[]=' . urlencode($id);
300 $revert = '(' . $this->skin
->makeKnownLinkObj( $revdel, $this->message
['revdel-restore'],
301 'target=' . $title->getPrefixedUrl() . $revParams ) . ')';
303 // Hidden log items, give review link
304 } else if( self
::typeAction($row,array('delete','suppress'),'event') && $wgUser->isAllowed( 'deleterevision' ) ) {
305 if( count($paramArray) == 1 ) {
306 $revdel = SpecialPage
::getTitleFor( 'Revisiondelete' );
307 $Ids = explode( ',', $paramArray[0] );
308 // Link to each hidden object ID, $paramArray[1] is the url param
310 foreach( $Ids as $n => $id ) {
311 $logParams .= '&logid[]=' . intval($id);
313 $revert = '(' . $this->skin
->makeKnownLinkObj( $revdel, $this->message
['revdel-restore'],
314 'target=' . $title->getPrefixedUrl() . $logParams ) . ')';
316 // Self-created users
317 } else if( self
::typeAction($row,'newusers','create2') ) {
318 if( isset( $paramArray[0] ) ) {
319 $revert = $this->skin
->userToolLinks( $paramArray[0], $title->getDBkey(), true );
321 # Fall back to a blue contributions link
322 $revert = $this->skin
->userToolLinks( 1, $title->getDBkey() );
324 if( $time < '20080129000000' ) {
325 # Suppress $comment from old entries (before 2008-01-29), not needed and can contain incorrect links
328 // Do nothing. The implementation is handled by the hook modifiying the passed-by-ref parameters.
330 wfRunHooks( 'LogLine', array( $row->log_type
, $row->log_action
, $title, $paramArray,
331 &$comment, &$revert, $row->log_timestamp
) );
334 if( self
::isDeleted($row,LogPage
::DELETED_ACTION
) ) {
335 $action = '<span class="history-deleted">' . wfMsgHtml('rev-deleted-event') . '</span>';
337 $action = LogPage
::actionText( $row->log_type
, $row->log_action
, $title, $this->skin
, $paramArray, true );
340 return "<li>$del$time $userLink $action $comment $revert</li>\n";
347 private function showhideLinks( $row ) {
348 $revdel = SpecialPage
::getTitleFor( 'Revisiondelete' );
349 // If event was hidden from sysops
350 if( !self
::userCan( $row, LogPage
::DELETED_RESTRICTED
) ) {
351 $del = $this->message
['rev-delundel'];
352 } else if( $row->log_type
== 'suppress' ) {
353 // No one should be hiding from the oversight log
354 $del = $this->message
['rev-delundel'];
356 $target = SpecialPage
::getTitleFor( 'Log', $row->log_type
);
357 $del = $this->skin
->makeKnownLinkObj( $revdel, $this->message
['rev-delundel'],
358 'target=' . $target->getPrefixedUrl() . '&logid='.$row->log_id
);
359 // Bolden oversighted content
360 if( self
::isDeleted( $row, LogPage
::DELETED_RESTRICTED
) )
361 $del = "<strong>$del</strong>";
363 return "<tt>(<small>$del</small>)</tt>";
368 * @param mixed $type (string/array)
369 * @param mixed $action (string/array)
372 public static function typeAction( $row, $type, $action ) {
373 $match = is_array($type) ?
in_array($row->log_type
,$type) : $row->log_type
== $type;
375 $match = is_array($action) ?
in_array($row->log_action
,$action) : $row->log_action
== $action;
381 * Determine if the current user is allowed to view a particular
382 * field of this log row, if it's marked as deleted.
387 public static function userCan( $row, $field ) {
388 if( ( $row->log_deleted
& $field ) == $field ) {
390 $permission = ( $row->log_deleted
& LogPage
::DELETED_RESTRICTED
) == LogPage
::DELETED_RESTRICTED
393 wfDebug( "Checking for $permission due to $field match on $row->log_deleted\n" );
394 return $wgUser->isAllowed( $permission );
402 * @param int $field one of DELETED_* bitfield constants
405 public static function isDeleted( $row, $field ) {
406 return ($row->log_deleted
& $field) == $field;
410 * Quick function to show a short log extract
411 * @param OutputPage $out
412 * @param string $type
413 * @param string $page
414 * @param string $user
416 * @param array $conds
418 public static function showLogExtract( $out, $type='', $page='', $user='', $lim=0, $conds=array() ) {
420 # Insert list of top 50 or so items
421 $loglist = new LogEventsList( $wgUser->getSkin(), $out, 0 );
422 $pager = new LogPager( $loglist, $type, $user, $page, '', $conds );
423 if( $lim > 0 ) $pager->mLimit
= $lim;
424 $logBody = $pager->getBody();
427 $loglist->beginLogEventsList() .
429 $loglist->endLogEventsList()
432 $out->addWikiMsg( 'logempty' );
434 return $pager->getNumRows();
438 * SQL clause to skip forbidden log types for this user
439 * @param Database $db
440 * @returns mixed (string or false)
442 public static function getExcludeClause( $db ) {
443 global $wgLogRestrictions, $wgUser;
444 // Reset the array, clears extra "where" clauses when $par is used
445 $hiddenLogs = array();
446 // Don't show private logs to unprivileged users
447 foreach( $wgLogRestrictions as $logtype => $right ) {
448 if( !$wgUser->isAllowed($right) ) {
449 $safetype = $db->strencode( $logtype );
450 $hiddenLogs[] = $safetype;
453 if( count($hiddenLogs) == 1 ) {
454 return 'log_type != ' . $db->addQuotes( $hiddenLogs[0] );
455 } elseif( !empty( $hiddenLogs ) ) {
456 return 'log_type NOT IN (' . $db->makeList($hiddenLogs) . ')';
465 class LogPager
extends ReverseChronologicalPager
{
466 private $type = '', $user = '', $title = '', $pattern = '';
467 public $mLogEventsList;
470 * @param LogEventsList $loglist,
471 * @param string $type,
472 * @param string $user,
473 * @param string $page,
474 * @param string $pattern
475 * @param array $conds
477 function __construct( $list, $type='', $user='', $title='', $pattern='', $conds=array(), $y=false, $m=false ) {
478 parent
::__construct();
479 $this->mConds
= $conds;
481 $this->mLogEventsList
= $list;
483 $this->limitType( $type );
484 $this->limitUser( $user );
485 $this->limitTitle( $title, $pattern );
486 $this->getDateCond( $y, $m );
489 public function getDefaultQuery() {
490 $query = parent
::getDefaultQuery();
491 $query['type'] = $this->type
;
492 $query['month'] = $this->mMonth
;
493 $query['year'] = $this->mYear
;
497 public function getFilterParams() {
498 global $wgFilterLogTypes, $wgUser, $wgRequest;
503 foreach( $wgFilterLogTypes as $type => $default ) {
504 // Avoid silly filtering
505 if( $type !== 'patrol' ||
$wgUser->useNPPatrol() ) {
506 $hide = $wgRequest->getInt( "hide{$type}log", $default );
507 $filters[$type] = $hide;
509 $this->mConds
[] = 'log_type != '.$this->mDb
->addQuotes( $this->mDb
->strencode($type) );
516 * Set the log reader to return only entries of the given type.
517 * Type restrictions enforced here
518 * @param string $type A log type ('upload', 'delete', etc)
521 private function limitType( $type ) {
522 global $wgLogRestrictions, $wgUser;
523 // Don't even show header for private logs; don't recognize it...
524 if( isset($wgLogRestrictions[$type]) && !$wgUser->isAllowed($wgLogRestrictions[$type]) ) {
527 // Don't show private logs to unpriviledged users
528 $hideLogs = LogEventsList
::getExcludeClause( $this->mDb
);
529 if( $hideLogs !== false ) {
530 $this->mConds
[] = $hideLogs;
536 $this->mConds
['log_type'] = $type;
540 * Set the log reader to return only entries by the given user.
541 * @param string $name (In)valid user name
544 private function limitUser( $name ) {
548 $usertitle = Title
::makeTitleSafe( NS_USER
, $name );
549 if( is_null($usertitle) ) {
552 /* Fetch userid at first, if known, provides awesome query plan afterwards */
553 $userid = User
::idFromName( $name );
555 /* It should be nicer to abort query at all,
556 but for now it won't pass anywhere behind the optimizer */
557 $this->mConds
[] = "NULL";
559 $this->mConds
['log_user'] = $userid;
560 $this->user
= $usertitle->getText();
565 * Set the log reader to return only entries affecting the given page.
566 * (For the block and rights logs, this is a user page.)
567 * @param string $page Title name as text
570 private function limitTitle( $page, $pattern ) {
573 $title = Title
::newFromText( $page );
574 if( strlen($page) == 0 ||
!$title instanceof Title
)
577 $this->title
= $title->getPrefixedText();
578 $ns = $title->getNamespace();
579 # Using the (log_namespace, log_title, log_timestamp) index with a
580 # range scan (LIKE) on the first two parts, instead of simple equality,
581 # makes it unusable for sorting. Sorted retrieval using another index
582 # would be possible, but then we might have to scan arbitrarily many
583 # nodes of that index. Therefore, we need to avoid this if $wgMiserMode
586 # This is not a problem with simple title matches, because then we can
587 # use the page_time index. That should have no more than a few hundred
588 # log entries for even the busiest pages, so it can be safely scanned
589 # in full to satisfy an impossible condition on user or similar.
590 if( $pattern && !$wgMiserMode ) {
591 # use escapeLike to avoid expensive search patterns like 't%st%'
592 $safetitle = $this->mDb
->escapeLike( $title->getDBkey() );
593 $this->mConds
['log_namespace'] = $ns;
594 $this->mConds
[] = "log_title LIKE '$safetitle%'";
595 $this->pattern
= $pattern;
597 $this->mConds
['log_namespace'] = $ns;
598 $this->mConds
['log_title'] = $title->getDBkey();
602 public function getQueryInfo() {
603 $this->mConds
[] = 'user_id = log_user';
604 # Don't use the wrong logging index
605 if( $this->title ||
$this->pattern ||
$this->user
) {
606 $index = array( 'USE INDEX' => array( 'logging' => array('page_time','user_time') ) );
607 } else if( $this->type
) {
608 $index = array( 'USE INDEX' => array( 'logging' => 'type_time' ) );
610 $index = array( 'USE INDEX' => array( 'logging' => 'times' ) );
613 'tables' => array( 'logging', 'user' ),
614 'fields' => array( 'log_type', 'log_action', 'log_user', 'log_namespace', 'log_title', 'log_params',
615 'log_comment', 'log_id', 'log_deleted', 'log_timestamp', 'user_name', 'user_editcount' ),
616 'conds' => $this->mConds
,
621 function getIndexField() {
622 return 'log_timestamp';
625 public function getStartBody() {
626 wfProfileIn( __METHOD__
);
627 # Do a link batch query
628 if( $this->getNumRows() > 0 ) {
630 while( $row = $this->mResult
->fetchObject() ) {
631 $lb->add( $row->log_namespace
, $row->log_title
);
632 $lb->addObj( Title
::makeTitleSafe( NS_USER
, $row->user_name
) );
633 $lb->addObj( Title
::makeTitleSafe( NS_USER_TALK
, $row->user_name
) );
636 $this->mResult
->seek( 0 );
638 wfProfileOut( __METHOD__
);
642 public function formatRow( $row ) {
643 return $this->mLogEventsList
->logLine( $row );
646 public function getType() {
650 public function getUser() {
654 public function getPage() {
658 public function getPattern() {
659 return $this->pattern
;
662 public function getYear() {
666 public function getMonth() {
667 return $this->mMonth
;
673 * @ingroup SpecialPage
678 * @param WebRequest $request For internal use use a FauxRequest object to pass arbitrary parameters.
680 function __construct( $request ) {
681 global $wgUser, $wgOut;
683 $type = $request->getVal( 'type' );
684 $user = $request->getText( 'user' );
685 $title = $request->getText( 'page' );
686 $pattern = $request->getBool( 'pattern' );
687 $y = $request->getIntOrNull( 'year' );
688 $m = $request->getIntOrNull( 'month' );
689 # Don't let the user get stuck with a certain date
690 $skip = $request->getText( 'offset' ) ||
$request->getText( 'dir' ) == 'prev';
695 # Use new list class to output results
696 $loglist = new LogEventsList( $wgUser->getSkin(), $wgOut, 0 );
697 $this->pager
= new LogPager( $loglist, $type, $user, $title, $pattern, $y, $m );
701 * Is there at least one row?
704 public function hasRows() {
705 return isset($this->pager
) ?
($this->pager
->getNumRows() > 0) : false;
711 * @ingroup SpecialPage
714 const NO_ACTION_LINK
= 1;
716 * @var LogReader $reader
720 * @param LogReader &$reader where to get our data from
721 * @param integer $flags Bitwise combination of flags:
722 * LogEventsList::NO_ACTION_LINK Don't show restore/unblock/block links
724 function __construct( &$reader, $flags = 0 ) {
726 $this->reader
=& $reader;
727 $this->reader
->pager
->mLogEventsList
->flags
= $flags;
728 # Aliases for shorter code...
729 $this->pager
=& $this->reader
->pager
;
730 $this->list =& $this->reader
->pager
->mLogEventsList
;
734 * Take over the whole output page in $wgOut with the log display.
736 public function show() {
737 # Set title and add header
738 $this->list->showHeader( $pager->getType() );
740 $this->list->showOptions( $this->pager
->getType(), $this->pager
->getUser(), $this->pager
->getPage(),
741 $this->pager
->getPattern(), $this->pager
->getYear(), $this->pager
->getMonth() );
743 $logBody = $this->pager
->getBody();
746 $this->pager
->getNavigationBar() .
747 $this->list->beginLogEventsList() .
749 $this->list->endLogEventsList() .
750 $this->pager
->getNavigationBar()
753 $wgOut->addWikiMsg( 'logempty' );
758 * Output just the list of entries given by the linked LogReader,
759 * with extraneous UI elements. Use for displaying log fragments in
760 * another page (eg at Special:Undelete)
761 * @param OutputPage $out where to send output
763 public function showList( &$out ) {
764 $logBody = $this->pager
->getBody();
767 $this->list->beginLogEventsList() .
769 $this->list->endLogEventsList()
772 $out->addWikiMsg( 'logempty' );