3 * Implements Special:Contributions
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 * Special:Contributions, show user contributions in a paged list
27 * @ingroup SpecialPage
30 class SpecialContributions
extends SpecialPage
{
34 public function __construct() {
35 parent
::__construct( 'Contributions' );
38 public function execute( $par ) {
39 global $wgUser, $wgOut, $wgRequest;
42 $this->outputHeader();
43 $wgOut->addModuleStyles( 'mediawiki.special' );
45 $this->opts
= array();
47 if( $par == 'newbies' ) {
49 $this->opts
['contribs'] = 'newbie';
50 } elseif( isset( $par ) ) {
53 $target = $wgRequest->getVal( 'target' );
57 if( $wgRequest->getVal( 'contribs' ) == 'newbie' ) {
59 $this->opts
['contribs'] = 'newbie';
62 $this->opts
['deletedOnly'] = $wgRequest->getBool( 'deletedOnly' );
64 if( !strlen( $target ) ) {
65 $wgOut->addHTML( $this->getForm() );
69 $this->opts
['limit'] = $wgRequest->getInt( 'limit', $wgUser->getOption('rclimit') );
70 $this->opts
['target'] = $target;
71 $this->opts
['topOnly'] = $wgRequest->getBool( 'topOnly' );
72 $this->opts
['showSizeDiff'] = $wgRequest->getBool( 'showSizeDiff' );
74 $nt = Title
::makeTitleSafe( NS_USER
, $target );
76 $wgOut->addHTML( $this->getForm() );
79 $id = User
::idFromName( $nt->getText() );
81 if( $target != 'newbies' ) {
82 $target = $nt->getText();
83 $wgOut->setSubtitle( $this->contributionsSub( $nt, $id ) );
84 $wgOut->setHTMLTitle( wfMsg( 'pagetitle', wfMsgExt( 'contributions-title', array( 'parsemag' ),$target ) ) );
85 $user = User
::newFromName( $target, false );
86 if ( is_object( $user ) ) {
87 $this->getSkin()->setRelevantUser( $user );
90 $wgOut->setSubtitle( wfMsgHtml( 'sp-contributions-newbies-sub') );
91 $wgOut->setHTMLTitle( wfMsg( 'pagetitle', wfMsg( 'sp-contributions-newbies-title' ) ) );
94 if( ( $ns = $wgRequest->getVal( 'namespace', null ) ) !== null && $ns !== '' ) {
95 $this->opts
['namespace'] = intval( $ns );
97 $this->opts
['namespace'] = '';
100 $this->opts
['tagFilter'] = (string) $wgRequest->getVal( 'tagFilter' );
102 // Allows reverts to have the bot flag in recent changes. It is just here to
103 // be passed in the form at the top of the page
104 if( $wgUser->isAllowed( 'markbotedits' ) && $wgRequest->getBool( 'bot' ) ) {
105 $this->opts
['bot'] = '1';
108 $skip = $wgRequest->getText( 'offset' ) ||
$wgRequest->getText( 'dir' ) == 'prev';
109 # Offset overrides year/month selection
111 $this->opts
['year'] = '';
112 $this->opts
['month'] = '';
114 $this->opts
['year'] = $wgRequest->getIntOrNull( 'year' );
115 $this->opts
['month'] = $wgRequest->getIntOrNull( 'month' );
118 $feedType = $wgRequest->getVal( 'feed' );
120 // Maintain some level of backwards compatability
121 // If people request feeds using the old parameters, redirect to API
123 'action' => 'feedcontributions',
124 'feedformat' => $feedType,
127 if ( $this->opts
['topOnly'] ) {
128 $apiParams['toponly'] = true;
130 if ( $this->opts
['showSizeDiff'] ) {
131 $apiParams['showsizediff'] = true;
133 if ( $this->opts
['deletedOnly'] ) {
134 $apiParams['deletedonly'] = true;
136 if ( $this->opts
['tagFilter'] !== '' ) {
137 $apiParams['tagfilter'] = $this->opts
['tagFilter'];
139 if ( $this->opts
['namespace'] !== '' ) {
140 $apiParams['namespace'] = $this->opts
['namespace'];
142 if ( $this->opts
['year'] !== null ) {
143 $apiParams['year'] = $this->opts
['year'];
145 if ( $this->opts
['month'] !== null ) {
146 $apiParams['month'] = $this->opts
['month'];
149 $url = wfScript( 'api' ) . '?' . wfArrayToCGI( $apiParams );
151 $wgOut->redirect( $url, '301' );
155 // Add RSS/atom links
156 $this->addFeedLinks( array( 'action' => 'feedcontributions', 'user' => $target ) );
158 if ( wfRunHooks( 'SpecialContributionsBeforeMainOutput', array( $id ) ) ) {
160 $wgOut->addHTML( $this->getForm() );
162 $pager = new ContribsPager( array(
164 'namespace' => $this->opts
['namespace'],
165 'year' => $this->opts
['year'],
166 'month' => $this->opts
['month'],
167 'deletedOnly' => $this->opts
['deletedOnly'],
168 'topOnly' => $this->opts
['topOnly'],
169 'showSizeDiff' => $this->opts
['showSizeDiff'],
171 if( !$pager->getNumRows() ) {
172 $wgOut->addWikiMsg( 'nocontribs', $target );
174 # Show a message about slave lag, if applicable
175 if( ( $lag = $pager->getDatabase()->getLag() ) > 0 )
176 $wgOut->showLagWarning( $lag );
179 '<p>' . $pager->getNavigationBar() . '</p>' .
181 '<p>' . $pager->getNavigationBar() . '</p>'
184 $wgOut->preventClickjacking( $pager->getPreventClickjacking() );
186 # Show the appropriate "footer" message - WHOIS tools, etc.
187 if( $target != 'newbies' ) {
188 $message = 'sp-contributions-footer';
189 if ( IP
::isIPAddress( $target ) ) {
190 $message = 'sp-contributions-footer-anon';
192 $user = User
::newFromName( $target );
193 if ( !$user ||
$user->isAnon() ) {
194 // No message for non-existing users
199 if( !wfMessage( $message, $target )->isDisabled() ) {
201 "<div class='mw-contributions-footer'>\n$1\n</div>",
202 array( $message, $target ) );
209 * Generates the subheading with links
210 * @param $nt Title object for the target
211 * @param $id Integer: User ID for the target
212 * @return String: appropriately-escaped HTML to be output literally
213 * @todo FIXME: Almost the same as getSubTitle in SpecialDeletedContributions.php. Could be combined.
215 protected function contributionsSub( $nt, $id ) {
216 global $wgLang, $wgUser, $wgOut;
218 $sk = $this->getSkin();
220 if ( $id === null ) {
221 $user = htmlspecialchars( $nt->getText() );
223 $user = $sk->link( $nt, htmlspecialchars( $nt->getText() ) );
225 $userObj = User
::newFromName( $nt->getText(), /* check for username validity not needed */ false );
226 $talk = $nt->getTalkPage();
228 $tools = self
::getUserLinks( $nt, $talk, $userObj, $wgUser );
229 $links = $wgLang->pipeList( $tools );
231 // Show a note if the user is blocked and display the last block log entry.
232 if ( $userObj->isBlocked() ) {
233 LogEventsList
::showLogExtract(
236 $nt->getPrefixedText(),
240 'showIfEmpty' => false,
243 'sp-contributions-blocked-notice-anon' :
244 'sp-contributions-blocked-notice',
245 $nt->getText() # Support GENDER in 'sp-contributions-blocked-notice'
247 'offset' => '' # don't use $wgRequest parameter offset
253 // Old message 'contribsub' had one parameter, but that doesn't work for
254 // languages that want to put the "for" bit right after $user but before
255 // $links. If 'contribsub' is around, use it for reverse compatibility,
256 // otherwise use 'contribsub2'.
257 if( wfEmptyMsg( 'contribsub' ) ) {
258 return wfMsgHtml( 'contribsub2', $user, $links );
260 return wfMsgHtml( 'contribsub', "$user ($links)" );
265 * Links to different places.
266 * @param $userpage Title: Target user page
267 * @param $talkpage Title: Talk page
268 * @param $target User: Target user object
269 * @param $subject User: The viewing user ($wgUser is still checked in some cases, like userrights page!!)
271 public static function getUserLinks( Title
$userpage, Title
$talkpage, User
$target, User
$subject ) {
273 $sk = $subject->getSkin();
274 $id = $target->getId();
275 $username = $target->getName();
277 $tools[] = $sk->link( $talkpage, wfMsgHtml( 'sp-contributions-talk' ) );
279 if( ( $id !== null ) ||
( $id === null && IP
::isIPAddress( $username ) ) ) {
280 if( $subject->isAllowed( 'block' ) ) { # Block / Change block / Unblock links
281 if ( $target->isBlocked() ) {
282 $tools[] = $sk->linkKnown( # Change block link
283 SpecialPage
::getTitleFor( 'Block', $username ),
284 wfMsgHtml( 'change-blocklink' )
286 $tools[] = $sk->linkKnown( # Unblock link
287 SpecialPage
::getTitleFor( 'Unblock', $username ),
288 wfMsgHtml( 'unblocklink' )
290 } else { # User is not blocked
291 $tools[] = $sk->linkKnown( # Block link
292 SpecialPage
::getTitleFor( 'Block', $username ),
293 wfMsgHtml( 'blocklink' )
298 $tools[] = $sk->linkKnown(
299 SpecialPage
::getTitleFor( 'Log', 'block' ),
300 wfMsgHtml( 'sp-contributions-blocklog' ),
303 'page' => $userpage->getPrefixedText()
308 $tools[] = $sk->linkKnown(
309 SpecialPage
::getTitleFor( 'Listfiles', $username ),
310 wfMsgHtml( 'sp-contributions-uploads' )
314 $tools[] = $sk->linkKnown(
315 SpecialPage
::getTitleFor( 'Log', $username ),
316 wfMsgHtml( 'sp-contributions-logs' )
319 # Add link to deleted user contributions for priviledged users
320 if( $subject->isAllowed( 'deletedhistory' ) ) {
321 $tools[] = $sk->linkKnown(
322 SpecialPage
::getTitleFor( 'DeletedContributions', $username ),
323 wfMsgHtml( 'sp-contributions-deleted' )
327 # Add a link to change user rights for privileged users
328 $userrightsPage = new UserrightsPage();
329 if( $id !== null && $userrightsPage->userCanChangeRights( $target ) ) {
330 $tools[] = $sk->linkKnown(
331 SpecialPage
::getTitleFor( 'Userrights', $username ),
332 wfMsgHtml( 'sp-contributions-userrights' )
336 wfRunHooks( 'ContributionsToolLinks', array( $id, $userpage, &$tools ) );
341 * Generates the namespace selector form with hidden attributes.
342 * @return String: HTML fragment
344 protected function getForm() {
345 global $wgScript, $wgMiserMode;
347 $this->opts
['title'] = $this->getTitle()->getPrefixedText();
348 if( !isset( $this->opts
['target'] ) ) {
349 $this->opts
['target'] = '';
351 $this->opts
['target'] = str_replace( '_' , ' ' , $this->opts
['target'] );
354 if( !isset( $this->opts
['namespace'] ) ) {
355 $this->opts
['namespace'] = '';
358 if( !isset( $this->opts
['contribs'] ) ) {
359 $this->opts
['contribs'] = 'user';
362 if( !isset( $this->opts
['year'] ) ) {
363 $this->opts
['year'] = '';
366 if( !isset( $this->opts
['month'] ) ) {
367 $this->opts
['month'] = '';
370 if( $this->opts
['contribs'] == 'newbie' ) {
371 $this->opts
['target'] = '';
374 if( !isset( $this->opts
['tagFilter'] ) ) {
375 $this->opts
['tagFilter'] = '';
378 if( !isset( $this->opts
['topOnly'] ) ) {
379 $this->opts
['topOnly'] = false;
382 if( !isset( $this->opts
['showSizeDiff'] ) ) {
383 $this->opts
['showSizeDiff'] = !$wgMiserMode;
386 $f = Xml
::openElement( 'form', array( 'method' => 'get', 'action' => $wgScript, 'class' => 'mw-contributions-form' ) );
388 # Add hidden params for tracking except for parameters in $skipParameters
389 $skipParameters = array( 'namespace', 'deletedOnly', 'target', 'contribs', 'year', 'month', 'topOnly', 'showSizeDiff' );
390 foreach ( $this->opts
as $name => $value ) {
391 if( in_array( $name, $skipParameters ) ) {
394 $f .= "\t" . Html
::hidden( $name, $value ) . "\n";
397 $tagFilter = ChangeTags
::buildTagFilterSelector( $this->opts
['tagFilter'] );
401 if ( !$wgMiserMode ) {
402 $fNS = Html
::rawElement( 'span', array( 'style' => 'white-space: nowrap' ),
403 Xml
::label( wfMsg( 'namespace' ), 'namespace' ) . ' ' .
404 Xml
::namespaceSelector( $this->opts
['namespace'], '' )
406 $fShowDiff = Xml
::checkLabel( wfMsg( 'sp-contributions-showsizediff' ), 'showSizeDiff', 'mw-show-size-diff', $this->opts
['showSizeDiff'] );
409 $f .= Xml
::fieldset( wfMsg( 'sp-contributions-search' ) ) .
410 Xml
::radioLabel( wfMsgExt( 'sp-contributions-newbies', array( 'parsemag' ) ),
411 'contribs', 'newbie' , 'newbie', $this->opts
['contribs'] == 'newbie' ) . '<br />' .
412 Xml
::radioLabel( wfMsgExt( 'sp-contributions-username', array( 'parsemag' ) ),
413 'contribs' , 'user', 'user', $this->opts
['contribs'] == 'user' ) . ' ' .
414 Html
::input( 'target', $this->opts
['target'], 'text', array(
417 ) +
( $this->opts
['target'] ?
array() : array( 'autofocus' ) ) ) . ' '.
419 Xml
::checkLabel( wfMsg( 'history-show-deleted' ),
420 'deletedOnly', 'mw-show-deleted-only', $this->opts
['deletedOnly'] ) . '<br />' .
421 Xml
::tags( 'p', null, Xml
::checkLabel( wfMsg( 'sp-contributions-toponly' ),
422 'topOnly', 'mw-show-top-only', $this->opts
['topOnly'] ) ) .
424 ( $tagFilter ? Xml
::tags( 'p', null, implode( ' ', $tagFilter ) ) : '' ) .
425 Html
::rawElement( 'p', array( 'style' => 'white-space: nowrap' ),
426 Xml
::dateMenu( $this->opts
['year'], $this->opts
['month'] ) . ' ' .
427 Xml
::submitButton( wfMsg( 'sp-contributions-submit' ) )
429 $explain = wfMessage( 'sp-contributions-explain' );
430 if ( $explain->exists() ) {
431 $f .= "<p id='mw-sp-contributions-explain'>{$explain}</p>";
433 $f .= Xml
::closeElement('fieldset' ) .
434 Xml
::closeElement( 'form' );
440 * Pager for Special:Contributions
441 * @ingroup SpecialPage Pager
443 class ContribsPager
extends ReverseChronologicalPager
{
444 public $mDefaultDirection = true;
445 var $messages, $target;
446 var $namespace = '', $mDb;
447 var $preventClickjacking = false;
449 function __construct( $options ) {
450 parent
::__construct();
452 $msgs = array( 'uctop', 'diff', 'newarticle', 'rollbacklink', 'diff', 'hist', 'rev-delundel', 'pipe-separator' );
454 foreach( $msgs as $msg ) {
455 $this->messages
[$msg] = wfMsgExt( $msg, array( 'escapenoentities' ) );
458 $this->target
= isset( $options['target'] ) ?
$options['target'] : '';
459 $this->namespace = isset( $options['namespace'] ) ?
$options['namespace'] : '';
460 $this->tagFilter
= isset( $options['tagFilter'] ) ?
$options['tagFilter'] : false;
462 $this->deletedOnly
= !empty( $options['deletedOnly'] );
463 $this->topOnly
= !empty( $options['topOnly'] );
464 $this->showSizeDiff
= !empty( $options['showSizeDiff'] );
466 $year = isset( $options['year'] ) ?
$options['year'] : false;
467 $month = isset( $options['month'] ) ?
$options['month'] : false;
468 $this->getDateCond( $year, $month );
470 $this->mDb
= wfGetDB( DB_SLAVE
, 'contributions' );
473 function getDefaultQuery() {
474 $query = parent
::getDefaultQuery();
475 $query['target'] = $this->target
;
479 function getTitle() {
480 return SpecialPage
::getTitleFor( 'Contributions' );
483 function getQueryInfo() {
484 global $wgUser, $wgMiserMode;
485 list( $tables, $index, $userCond, $join_cond ) = $this->getUserCond();
487 $conds = array_merge( $userCond, $this->getNamespaceCond() );
488 // Paranoia: avoid brute force searches (bug 17342)
489 if( !$wgUser->isAllowed( 'deletedhistory' ) ) {
490 $conds[] = $this->mDb
->bitAnd('rev_deleted',Revision
::DELETED_USER
) . ' = 0';
491 } elseif( !$wgUser->isAllowed( 'suppressrevision' ) ) {
492 $conds[] = $this->mDb
->bitAnd('rev_deleted',Revision
::SUPPRESSED_USER
) .
493 ' != ' . Revision
::SUPPRESSED_USER
;
495 $join_cond['page'] = array( 'INNER JOIN', 'page_id=rev_page' );
498 'page_namespace', 'page_title', 'page_is_new', 'page_latest', 'page_is_redirect',
499 'page_len','rev_id', 'rev_page', 'rev_text_id', 'rev_timestamp', 'rev_comment',
500 'rev_minor_edit', 'rev_user', 'rev_user_text', 'rev_parent_id', 'rev_deleted',
503 if ( $this->showSizeDiff
&& !$wgMiserMode ) {
504 $fields = array_merge( $fields, array( 'rc_old_len', 'rc_new_len' ) );
505 array_unshift( $tables, 'recentchanges' );
506 $join_cond['recentchanges'] = array( 'INNER JOIN', "rev_id = rc_this_oldid" );
513 'options' => array( 'USE INDEX' => array('revision' => $index) ),
514 'join_conds' => $join_cond
516 ChangeTags
::modifyDisplayQuery(
517 $queryInfo['tables'],
518 $queryInfo['fields'],
520 $queryInfo['join_conds'],
521 $queryInfo['options'],
525 wfRunHooks( 'ContribsPager::getQueryInfo', array( &$this, &$queryInfo ) );
529 function getUserCond() {
530 $condition = array();
531 $join_conds = array();
533 if( $this->target
== 'newbies' ) {
534 $tables = array( 'user_groups', 'page', 'revision' );
535 $max = $this->mDb
->selectField( 'user', 'max(user_id)', false, __METHOD__
);
536 $condition[] = 'rev_user >' . (int)($max - $max / 100);
537 $condition[] = 'ug_group IS NULL';
538 $index = 'user_timestamp';
539 # @todo FIXME: Other groups may have 'bot' rights
540 $join_conds['user_groups'] = array( 'LEFT JOIN', "ug_user = rev_user AND ug_group = 'bot'" );
542 $tables = array( 'page', 'revision' );
543 $condition['rev_user_text'] = $this->target
;
544 $index = 'usertext_timestamp';
546 if( $this->deletedOnly
) {
547 $condition[] = "rev_deleted != '0'";
549 if( $this->topOnly
) {
550 $condition[] = "rev_id = page_latest";
552 return array( $tables, $index, $condition, $join_conds );
555 function getNamespaceCond() {
557 if( $this->namespace !== '' && !$wgMiserMode ) {
558 return array( 'page_namespace' => (int)$this->namespace );
564 function getIndexField() {
565 return 'rev_timestamp';
568 function getStartBody() {
572 function getEndBody() {
577 * Generates each row in the contributions list.
579 * Contributions which are marked "top" are currently on top of the history.
580 * For these contributions, a [rollback] link is shown for users with roll-
581 * back privileges. The rollback link restores the most recent version that
582 * was not written by the target user.
584 * @todo This would probably look a lot nicer in a table.
586 function formatRow( $row ) {
587 global $wgUser, $wgLang;
588 wfProfileIn( __METHOD__
);
590 $sk = $this->getSkin();
591 $rev = new Revision( $row );
594 $page = Title
::newFromRow( $row );
597 htmlspecialchars( $page->getPrefixedText() ),
599 $page->isRedirect() ?
array( 'redirect' => 'no' ) : array()
601 # Mark current revisions
603 if( $row->rev_id
== $row->page_latest
) {
604 $topmarktext .= '<span class="mw-uctop">' . $this->messages
['uctop'] . '</span>';
606 if( !$row->page_is_new
&& $page->quickUserCan( 'rollback' )
607 && $page->quickUserCan( 'edit' ) )
609 $this->preventClickjacking();
610 $topmarktext .= ' '.$sk->generateRollback( $rev );
613 # Is there a visible previous revision?
614 if( $rev->userCan( Revision
::DELETED_TEXT
) && $rev->getParentId() !== 0 ) {
615 $difftext = $sk->linkKnown(
617 $this->messages
['diff'],
621 'oldid' => $row->rev_id
625 $difftext = $this->messages
['diff'];
627 $histlink = $sk->linkKnown(
629 $this->messages
['hist'],
631 array( 'action' => 'history' )
634 $comment = $wgLang->getDirMark() . $sk->revComment( $rev, false, true );
635 $date = $wgLang->timeanddate( wfTimestamp( TS_MW
, $row->rev_timestamp
), true );
636 if( $rev->userCan( Revision
::DELETED_TEXT
) ) {
639 htmlspecialchars($date),
641 array( 'oldid' => intval( $row->rev_id
) )
644 $d = htmlspecialchars( $date );
646 if( $rev->isDeleted( Revision
::DELETED_TEXT
) ) {
647 $d = '<span class="history-deleted">' . $d . '</span>';
650 if( $this->target
== 'newbies' ) {
651 $userlink = ' . . ' . $sk->userLink( $row->rev_user
, $row->rev_user_text
);
652 $userlink .= ' ' . wfMsg( 'parentheses', $sk->userTalkLink( $row->rev_user
, $row->rev_user_text
) ) . ' ';
657 if( $rev->getParentId() === 0 ) {
658 $nflag = ChangesList
::flag( 'newpage' );
663 if( $rev->isMinor() ) {
664 $mflag = ChangesList
::flag( 'minor' );
669 // Don't show useless link to people who cannot hide revisions
670 $canHide = $wgUser->isAllowed( 'deleterevision' );
671 if( $canHide ||
($rev->getVisibility() && $wgUser->isAllowed('deletedhistory')) ) {
672 if( !$rev->userCan( Revision
::DELETED_RESTRICTED
) ) {
673 $del = $this->mSkin
->revDeleteLinkDisabled( $canHide ); // revision was hidden from sysops
676 'type' => 'revision',
677 'target' => $page->getPrefixedDbkey(),
678 'ids' => $rev->getId()
680 $del = $this->mSkin
->revDeleteLink( $query,
681 $rev->isDeleted( Revision
::DELETED_RESTRICTED
), $canHide );
688 $diffHistLinks = '(' . $difftext . $this->messages
['pipe-separator'] . $histlink . ')';
691 $diffOut = ' . . ' . $wgLang->getDirMark() . ( $this->showSizeDiff ?
692 ChangesList
::showCharacterDifference( $row->rc_old_len
, $row->rc_new_len
) : Linker
::formatRevisionSize( $row->rev_len
) );
694 $ret = "{$del}{$d} {$diffHistLinks} {$nflag}{$mflag} {$link}{$diffOut}{$userlink} {$comment} {$topmarktext}";
696 # Denote if username is redacted for this edit
697 if( $rev->isDeleted( Revision
::DELETED_USER
) ) {
698 $ret .= " <strong>" . wfMsgHtml('rev-deleted-user-contribs') . "</strong>";
702 list($tagSummary, $newClasses) = ChangeTags
::formatSummaryRow( $row->ts_tags
, 'contributions' );
703 $classes = array_merge( $classes, $newClasses );
704 $ret .= " $tagSummary";
706 // Let extensions add data
707 wfRunHooks( 'ContributionsLineEnding', array( &$this, &$ret, $row ) );
709 $classes = implode( ' ', $classes );
710 $ret = "<li class=\"$classes\">$ret</li>\n";
711 wfProfileOut( __METHOD__
);
716 * Get the Database object in use
718 * @return DatabaseBase
720 public function getDatabase() {
725 * Overwrite Pager function and return a helpful comment
727 function getSqlComment() {
728 if ( $this->namespace ||
$this->deletedOnly
) {
729 return 'contributions page filtered for namespace or RevisionDeleted edits'; // potentially slow, see CR r58153
731 return 'contributions page unfiltered';
735 protected function preventClickjacking() {
736 $this->preventClickjacking
= true;
739 public function getPreventClickjacking() {
740 return $this->preventClickjacking
;