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 ) {
40 $this->outputHeader();
41 $out = $this->getOutput();
42 $out->addModuleStyles( 'mediawiki.special' );
44 $this->opts
= array();
45 $request = $this->getRequest();
47 if( $par == 'newbies' ) {
49 $this->opts
['contribs'] = 'newbie';
50 } elseif( $par !== null ) {
53 $target = $request->getVal( 'target' );
57 if( $request->getVal( 'contribs' ) == 'newbie' ) {
59 $this->opts
['contribs'] = 'newbie';
61 $this->opts
['contribs'] = 'user';
64 $this->opts
['deletedOnly'] = $request->getBool( 'deletedOnly' );
66 if( !strlen( $target ) ) {
67 $out->addHTML( $this->getForm() );
71 $user = $this->getUser();
73 $this->opts
['limit'] = $request->getInt( 'limit', $user->getOption('rclimit') );
74 $this->opts
['target'] = $target;
75 $this->opts
['topOnly'] = $request->getBool( 'topOnly' );
77 $nt = Title
::makeTitleSafe( NS_USER
, $target );
79 $out->addHTML( $this->getForm() );
82 $id = User
::idFromName( $nt->getText() );
84 if( $this->opts
['contribs'] != 'newbie' ) {
85 $target = $nt->getText();
86 $out->setSubtitle( $this->contributionsSub( $nt, $id ) );
87 $out->setHTMLTitleMsg( 'pagetitle', wfMsgExt( 'contributions-title', array( 'parsemag' ),$target ) );
88 $userObj = User
::newFromName( $target, false );
89 if ( is_object( $userObj ) ) {
90 $this->getSkin()->setRelevantUser( $userObj );
93 $out->setSubtitle( wfMsgHtml( 'sp-contributions-newbies-sub') );
94 $out->setHTMLTitleMsg( 'pagetitle', wfMsg( 'sp-contributions-newbies-title' ) );
97 if( ( $ns = $request->getVal( 'namespace', null ) ) !== null && $ns !== '' ) {
98 $this->opts
['namespace'] = intval( $ns );
100 $this->opts
['namespace'] = '';
103 $this->opts
['tagFilter'] = (string) $request->getVal( 'tagFilter' );
105 // Allows reverts to have the bot flag in recent changes. It is just here to
106 // be passed in the form at the top of the page
107 if( $user->isAllowed( 'markbotedits' ) && $request->getBool( 'bot' ) ) {
108 $this->opts
['bot'] = '1';
111 $skip = $request->getText( 'offset' ) ||
$request->getText( 'dir' ) == 'prev';
112 # Offset overrides year/month selection
114 $this->opts
['year'] = '';
115 $this->opts
['month'] = '';
117 $this->opts
['year'] = $request->getIntOrNull( 'year' );
118 $this->opts
['month'] = $request->getIntOrNull( 'month' );
121 $feedType = $request->getVal( 'feed' );
123 // Maintain some level of backwards compatability
124 // If people request feeds using the old parameters, redirect to API
126 'action' => 'feedcontributions',
127 'feedformat' => $feedType,
130 if ( $this->opts
['topOnly'] ) {
131 $apiParams['toponly'] = 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 $out->redirect( $url, '301' );
155 // Add RSS/atom links
156 $this->addFeedLinks( array( 'action' => 'feedcontributions', 'user' => $target ) );
158 if ( wfRunHooks( 'SpecialContributionsBeforeMainOutput', array( $id ) ) ) {
160 $out->addHTML( $this->getForm() );
162 $pager = new ContribsPager( array(
164 'contribs' => $this->opts
['contribs'],
165 'namespace' => $this->opts
['namespace'],
166 'year' => $this->opts
['year'],
167 'month' => $this->opts
['month'],
168 'deletedOnly' => $this->opts
['deletedOnly'],
169 'topOnly' => $this->opts
['topOnly'],
171 if( !$pager->getNumRows() ) {
172 $out->addWikiMsg( 'nocontribs', $target );
174 # Show a message about slave lag, if applicable
175 $lag = wfGetLB()->safeGetLag( $pager->getDatabase() );
177 $out->showLagWarning( $lag );
180 '<p>' . $pager->getNavigationBar() . '</p>' .
182 '<p>' . $pager->getNavigationBar() . '</p>'
185 $out->preventClickjacking( $pager->getPreventClickjacking() );
187 # Show the appropriate "footer" message - WHOIS tools, etc.
188 if( $this->opts
['contribs'] != 'newbie' ) {
189 $message = 'sp-contributions-footer';
190 if ( IP
::isIPAddress( $target ) ) {
191 $message = 'sp-contributions-footer-anon';
193 $userObj = User
::newFromName( $target );
194 if ( !$userObj ||
$userObj->isAnon() ) {
195 // No message for non-existing users
200 if( !wfMessage( $message, $target )->isDisabled() ) {
202 "<div class='mw-contributions-footer'>\n$1\n</div>",
203 array( $message, $target ) );
210 * Generates the subheading with links
211 * @param $nt Title object for the target
212 * @param $id Integer: User ID for the target
213 * @return String: appropriately-escaped HTML to be output literally
214 * @todo FIXME: Almost the same as getSubTitle in SpecialDeletedContributions.php. Could be combined.
216 protected function contributionsSub( $nt, $id ) {
217 if ( $id === null ) {
218 $user = htmlspecialchars( $nt->getText() );
220 $user = Linker
::link( $nt, htmlspecialchars( $nt->getText() ) );
222 $userObj = User
::newFromName( $nt->getText(), /* check for username validity not needed */ false );
223 $talk = $nt->getTalkPage();
225 $tools = self
::getUserLinks( $nt, $talk, $userObj, $this->getUser() );
226 $links = $this->getLang()->pipeList( $tools );
228 // Show a note if the user is blocked and display the last block log entry.
229 if ( $userObj->isBlocked() ) {
230 $out = $this->getOutput(); // showLogExtract() wants first parameter by reference
231 LogEventsList
::showLogExtract(
238 'showIfEmpty' => false,
241 'sp-contributions-blocked-notice-anon' :
242 'sp-contributions-blocked-notice',
243 $nt->getText() # Support GENDER in 'sp-contributions-blocked-notice'
245 'offset' => '' # don't use WebRequest parameter offset
251 // Old message 'contribsub' had one parameter, but that doesn't work for
252 // languages that want to put the "for" bit right after $user but before
253 // $links. If 'contribsub' is around, use it for reverse compatibility,
254 // otherwise use 'contribsub2'.
255 if( wfEmptyMsg( 'contribsub' ) ) {
256 return wfMsgHtml( 'contribsub2', $user, $links );
258 return wfMsgHtml( 'contribsub', "$user ($links)" );
263 * Links to different places.
264 * @param $userpage Title: Target user page
265 * @param $talkpage Title: Talk page
266 * @param $target User: Target user object
267 * @param $subject User: The viewing user ($wgUser might be still checked in some cases)
269 public static function getUserLinks( Title
$userpage, Title
$talkpage, User
$target, User
$subject ) {
271 $id = $target->getId();
272 $username = $target->getName();
274 $tools[] = Linker
::link( $talkpage, wfMsgHtml( 'sp-contributions-talk' ) );
276 if( ( $id !== null ) ||
( $id === null && IP
::isIPAddress( $username ) ) ) {
277 if( $subject->isAllowed( 'block' ) ) { # Block / Change block / Unblock links
278 if ( $target->isBlocked() ) {
279 $tools[] = Linker
::linkKnown( # Change block link
280 SpecialPage
::getTitleFor( 'Block', $username ),
281 wfMsgHtml( 'change-blocklink' )
283 $tools[] = Linker
::linkKnown( # Unblock link
284 SpecialPage
::getTitleFor( 'Unblock', $username ),
285 wfMsgHtml( 'unblocklink' )
287 } else { # User is not blocked
288 $tools[] = Linker
::linkKnown( # Block link
289 SpecialPage
::getTitleFor( 'Block', $username ),
290 wfMsgHtml( 'blocklink' )
295 $tools[] = Linker
::linkKnown(
296 SpecialPage
::getTitleFor( 'Log', 'block' ),
297 wfMsgHtml( 'sp-contributions-blocklog' ),
300 'page' => $userpage->getPrefixedText()
305 $tools[] = Linker
::linkKnown(
306 SpecialPage
::getTitleFor( 'Listfiles', $username ),
307 wfMsgHtml( 'sp-contributions-uploads' )
311 $tools[] = Linker
::linkKnown(
312 SpecialPage
::getTitleFor( 'Log', $username ),
313 wfMsgHtml( 'sp-contributions-logs' )
316 # Add link to deleted user contributions for priviledged users
317 if( $subject->isAllowed( 'deletedhistory' ) ) {
318 $tools[] = Linker
::linkKnown(
319 SpecialPage
::getTitleFor( 'DeletedContributions', $username ),
320 wfMsgHtml( 'sp-contributions-deleted' )
324 # Add a link to change user rights for privileged users
325 $userrightsPage = new UserrightsPage();
326 $userrightsPage->getContext()->setUser( $subject );
327 if( $id !== null && $userrightsPage->userCanChangeRights( $target ) ) {
328 $tools[] = Linker
::linkKnown(
329 SpecialPage
::getTitleFor( 'Userrights', $username ),
330 wfMsgHtml( 'sp-contributions-userrights' )
334 wfRunHooks( 'ContributionsToolLinks', array( $id, $userpage, &$tools ) );
339 * Generates the namespace selector form with hidden attributes.
340 * @return String: HTML fragment
342 protected function getForm() {
345 $this->opts
['title'] = $this->getTitle()->getPrefixedText();
346 if( !isset( $this->opts
['target'] ) ) {
347 $this->opts
['target'] = '';
349 $this->opts
['target'] = str_replace( '_' , ' ' , $this->opts
['target'] );
352 if( !isset( $this->opts
['namespace'] ) ) {
353 $this->opts
['namespace'] = '';
356 if( !isset( $this->opts
['contribs'] ) ) {
357 $this->opts
['contribs'] = 'user';
360 if( !isset( $this->opts
['year'] ) ) {
361 $this->opts
['year'] = '';
364 if( !isset( $this->opts
['month'] ) ) {
365 $this->opts
['month'] = '';
368 if( $this->opts
['contribs'] == 'newbie' ) {
369 $this->opts
['target'] = '';
372 if( !isset( $this->opts
['tagFilter'] ) ) {
373 $this->opts
['tagFilter'] = '';
376 if( !isset( $this->opts
['topOnly'] ) ) {
377 $this->opts
['topOnly'] = false;
380 $f = Xml
::openElement( 'form', array( 'method' => 'get', 'action' => $wgScript, 'class' => 'mw-contributions-form' ) );
382 # Add hidden params for tracking except for parameters in $skipParameters
383 $skipParameters = array( 'namespace', 'deletedOnly', 'target', 'contribs', 'year', 'month', 'topOnly' );
384 foreach ( $this->opts
as $name => $value ) {
385 if( in_array( $name, $skipParameters ) ) {
388 $f .= "\t" . Html
::hidden( $name, $value ) . "\n";
391 $tagFilter = ChangeTags
::buildTagFilterSelector( $this->opts
['tagFilter'] );
393 $f .= Xml
::fieldset( wfMsg( 'sp-contributions-search' ) ) .
394 Xml
::radioLabel( wfMsgExt( 'sp-contributions-newbies', array( 'parsemag' ) ),
395 'contribs', 'newbie' , 'newbie', $this->opts
['contribs'] == 'newbie' ) . '<br />' .
396 Xml
::radioLabel( wfMsgExt( 'sp-contributions-username', array( 'parsemag' ) ),
397 'contribs' , 'user', 'user', $this->opts
['contribs'] == 'user' ) . ' ' .
398 Html
::input( 'target', $this->opts
['target'], 'text', array(
401 ) +
( $this->opts
['target'] ?
array() : array( 'autofocus' ) ) ) . ' '.
402 Html
::rawElement( 'span', array( 'style' => 'white-space: nowrap' ),
403 Xml
::label( wfMsg( 'namespace' ), 'namespace' ) . ' ' .
404 Xml
::namespaceSelector( $this->opts
['namespace'], '' )
406 Xml
::checkLabel( wfMsg( 'history-show-deleted' ),
407 'deletedOnly', 'mw-show-deleted-only', $this->opts
['deletedOnly'] ) . '<br />' .
408 Xml
::tags( 'p', null, Xml
::checkLabel( wfMsg( 'sp-contributions-toponly' ),
409 'topOnly', 'mw-show-top-only', $this->opts
['topOnly'] ) ) .
410 ( $tagFilter ? Xml
::tags( 'p', null, implode( ' ', $tagFilter ) ) : '' ) .
411 Html
::rawElement( 'p', array( 'style' => 'white-space: nowrap' ),
412 Xml
::dateMenu( $this->opts
['year'], $this->opts
['month'] ) . ' ' .
413 Xml
::submitButton( wfMsg( 'sp-contributions-submit' ) )
415 $explain = wfMessage( 'sp-contributions-explain' );
416 if ( $explain->exists() ) {
417 $f .= "<p id='mw-sp-contributions-explain'>{$explain}</p>";
419 $f .= Xml
::closeElement('fieldset' ) .
420 Xml
::closeElement( 'form' );
426 * Pager for Special:Contributions
427 * @ingroup SpecialPage Pager
429 class ContribsPager
extends ReverseChronologicalPager
{
430 public $mDefaultDirection = true;
431 var $messages, $target;
432 var $namespace = '', $mDb;
433 var $preventClickjacking = false;
435 function __construct( $options ) {
436 parent
::__construct();
438 $msgs = array( 'uctop', 'diff', 'newarticle', 'rollbacklink', 'diff', 'hist', 'rev-delundel', 'pipe-separator' );
440 foreach( $msgs as $msg ) {
441 $this->messages
[$msg] = wfMsgExt( $msg, array( 'escapenoentities' ) );
444 $this->target
= isset( $options['target'] ) ?
$options['target'] : '';
445 $this->contribs
= isset( $options['contribs'] ) ?
$options['contribs'] : 'users';
446 $this->namespace = isset( $options['namespace'] ) ?
$options['namespace'] : '';
447 $this->tagFilter
= isset( $options['tagFilter'] ) ?
$options['tagFilter'] : false;
449 $this->deletedOnly
= !empty( $options['deletedOnly'] );
450 $this->topOnly
= !empty( $options['topOnly'] );
452 $year = isset( $options['year'] ) ?
$options['year'] : false;
453 $month = isset( $options['month'] ) ?
$options['month'] : false;
454 $this->getDateCond( $year, $month );
456 $this->mDb
= wfGetDB( DB_SLAVE
, 'contributions' );
459 function getDefaultQuery() {
460 $query = parent
::getDefaultQuery();
461 $query['target'] = $this->target
;
465 function getQueryInfo() {
466 list( $tables, $index, $userCond, $join_cond ) = $this->getUserCond();
468 $user = $this->getUser();
469 $conds = array_merge( $userCond, $this->getNamespaceCond() );
470 // Paranoia: avoid brute force searches (bug 17342)
471 if( !$user->isAllowed( 'deletedhistory' ) ) {
472 $conds[] = $this->mDb
->bitAnd('rev_deleted',Revision
::DELETED_USER
) . ' = 0';
473 } elseif( !$user->isAllowed( 'suppressrevision' ) ) {
474 $conds[] = $this->mDb
->bitAnd('rev_deleted',Revision
::SUPPRESSED_USER
) .
475 ' != ' . Revision
::SUPPRESSED_USER
;
478 # Don't include orphaned revisions
479 $join_cond['page'] = array( 'INNER JOIN', 'page_id = rev_page' );
480 # Get the current user name for accounts
481 $join_cond['user'] = array( 'LEFT JOIN', 'rev_user != 0 AND user_id = rev_user' );
485 'fields' => array_merge(
486 Revision
::selectFields(),
487 Revision
::selectUserFields(),
488 array( 'page_namespace', 'page_title', 'page_is_new',
489 'page_latest', 'page_is_redirect', 'page_len' )
492 'options' => array( 'USE INDEX' => array( 'revision' => $index ) ),
493 'join_conds' => $join_cond
496 ChangeTags
::modifyDisplayQuery(
497 $queryInfo['tables'],
498 $queryInfo['fields'],
500 $queryInfo['join_conds'],
501 $queryInfo['options'],
505 wfRunHooks( 'ContribsPager::getQueryInfo', array( &$this, &$queryInfo ) );
509 function getUserCond() {
510 $condition = array();
511 $join_conds = array();
512 $tables = array( 'revision', 'page', 'user' );
513 if( $this->contribs
== 'newbie' ) {
514 $tables[] = 'user_groups';
515 $max = $this->mDb
->selectField( 'user', 'max(user_id)', false, __METHOD__
);
516 $condition[] = 'rev_user >' . (int)($max - $max / 100);
517 $condition[] = 'ug_group IS NULL';
518 $index = 'user_timestamp';
519 # @todo FIXME: Other groups may have 'bot' rights
520 $join_conds['user_groups'] = array( 'LEFT JOIN', "ug_user = rev_user AND ug_group = 'bot'" );
522 if ( IP
::isIPAddress( $this->target
) ) {
523 $condition['rev_user_text'] = $this->target
;
524 $index = 'usertext_timestamp';
526 $condition['rev_user'] = User
::idFromName( $this->target
);
527 $index = 'user_timestamp';
530 if( $this->deletedOnly
) {
531 $condition[] = "rev_deleted != '0'";
533 if( $this->topOnly
) {
534 $condition[] = "rev_id = page_latest";
536 return array( $tables, $index, $condition, $join_conds );
539 function getNamespaceCond() {
540 if( $this->namespace !== '' ) {
541 return array( 'page_namespace' => (int)$this->namespace );
547 function getIndexField() {
548 return 'rev_timestamp';
551 function doBatchLookups() {
552 $this->mResult
->rewind();
554 foreach ( $this->mResult
as $row ) {
555 $revIds[] = $row->rev_parent_id
;
557 $this->mParentLens
= $this->getParentLengths( $revIds );
558 $this->mResult
->rewind(); // reset
560 if ( $this->contribs
=== 'newbie' ) { // multiple users
561 # Do a link batch query
562 $this->mResult
->seek( 0 );
563 $batch = new LinkBatch();
564 # Give some pointers to make (last) links
565 foreach ( $this->mResult
as $row ) {
566 $batch->addObj( Title
::makeTitleSafe( NS_USER
, $row->user_name
) );
567 $batch->addObj( Title
::makeTitleSafe( NS_USER_TALK
, $row->user_name
) );
570 $this->mResult
->seek( 0 );
575 * Do a batched query to get the parent revision lengths
577 private function getParentLengths( array $revIds ) {
580 return $revLens; // empty
582 wfProfileIn( __METHOD__
);
583 $res = $this->getDatabase()->select( 'revision',
584 array( 'rev_id', 'rev_len' ),
585 array( 'rev_id' => $revIds ),
587 foreach( $res as $row ) {
588 $revLens[$row->rev_id
] = $row->rev_len
;
590 wfProfileOut( __METHOD__
);
594 function getStartBody() {
598 function getEndBody() {
603 * Generates each row in the contributions list.
605 * Contributions which are marked "top" are currently on top of the history.
606 * For these contributions, a [rollback] link is shown for users with roll-
607 * back privileges. The rollback link restores the most recent version that
608 * was not written by the target user.
610 * @todo This would probably look a lot nicer in a table.
612 function formatRow( $row ) {
613 wfProfileIn( __METHOD__
);
615 $rev = new Revision( $row );
618 $page = Title
::newFromRow( $row );
619 $link = Linker
::link(
621 htmlspecialchars( $page->getPrefixedText() ),
623 $page->isRedirect() ?
array( 'redirect' => 'no' ) : array()
625 # Mark current revisions
627 if( $row->rev_id
== $row->page_latest
) {
628 $topmarktext .= '<span class="mw-uctop">' . $this->messages
['uctop'] . '</span>';
630 if( !$row->page_is_new
&& $page->quickUserCan( 'rollback' )
631 && $page->quickUserCan( 'edit' ) )
633 $this->preventClickjacking();
634 $topmarktext .= ' '.Linker
::generateRollback( $rev );
637 $user = $this->getUser();
638 # Is there a visible previous revision?
639 if( $rev->userCan( Revision
::DELETED_TEXT
, $user ) && $rev->getParentId() !== 0 ) {
640 $difftext = Linker
::linkKnown(
642 $this->messages
['diff'],
646 'oldid' => $row->rev_id
650 $difftext = $this->messages
['diff'];
652 $histlink = Linker
::linkKnown(
654 $this->messages
['hist'],
656 array( 'action' => 'history' )
659 if ( isset( $this->mParentLens
[$row->rev_parent_id
] ) ) {
660 $chardiff = ' . . ' . ChangesList
::showCharacterDifference(
661 $this->mParentLens
[$row->rev_parent_id
], $row->rev_len
) . ' . . ';
666 $comment = $this->getLang()->getDirMark() . Linker
::revComment( $rev, false, true );
667 $date = $this->getLang()->timeanddate( wfTimestamp( TS_MW
, $row->rev_timestamp
), true );
668 if( $rev->userCan( Revision
::DELETED_TEXT
, $user ) ) {
669 $d = Linker
::linkKnown(
671 htmlspecialchars($date),
673 array( 'oldid' => intval( $row->rev_id
) )
676 $d = htmlspecialchars( $date );
678 if( $rev->isDeleted( Revision
::DELETED_TEXT
) ) {
679 $d = '<span class="history-deleted">' . $d . '</span>';
682 # Show user names for /newbies as there may be different users.
683 # Note that we already excluded rows with hidden user names.
684 if( $this->contribs
== 'newbie' ) {
685 $userlink = ' . . ' . Linker
::userLink( $rev->getUser(), $rev->getUserText() );
686 $userlink .= ' ' . wfMsg( 'parentheses',
687 Linker
::userTalkLink( $rev->getUser(), $rev->getUserText() ) ) . ' ';
692 if( $rev->getParentId() === 0 ) {
693 $nflag = ChangesList
::flag( 'newpage' );
698 if( $rev->isMinor() ) {
699 $mflag = ChangesList
::flag( 'minor' );
704 // Don't show useless link to people who cannot hide revisions
705 $canHide = $user->isAllowed( 'deleterevision' );
706 if( $canHide ||
($rev->getVisibility() && $user->isAllowed('deletedhistory')) ) {
707 if( !$rev->userCan( Revision
::DELETED_RESTRICTED
, $user ) ) {
708 $del = Linker
::revDeleteLinkDisabled( $canHide ); // revision was hidden from sysops
711 'type' => 'revision',
712 'target' => $page->getPrefixedDbkey(),
713 'ids' => $rev->getId()
715 $del = Linker
::revDeleteLink( $query,
716 $rev->isDeleted( Revision
::DELETED_RESTRICTED
), $canHide );
723 $diffHistLinks = '(' . $difftext . $this->messages
['pipe-separator'] . $histlink . ')';
724 $ret = "{$del}{$d} {$diffHistLinks}{$chardiff}{$nflag}{$mflag} {$link}{$userlink} {$comment} {$topmarktext}";
726 # Denote if username is redacted for this edit
727 if( $rev->isDeleted( Revision
::DELETED_USER
) ) {
728 $ret .= " <strong>" . wfMsgHtml('rev-deleted-user-contribs') . "</strong>";
732 list($tagSummary, $newClasses) = ChangeTags
::formatSummaryRow( $row->ts_tags
, 'contributions' );
733 $classes = array_merge( $classes, $newClasses );
734 $ret .= " $tagSummary";
736 // Let extensions add data
737 wfRunHooks( 'ContributionsLineEnding', array( &$this, &$ret, $row ) );
739 $classes = implode( ' ', $classes );
740 $ret = "<li class=\"$classes\">$ret</li>\n";
741 wfProfileOut( __METHOD__
);
746 * Get the Database object in use
748 * @return DatabaseBase
750 public function getDatabase() {
755 * Overwrite Pager function and return a helpful comment
757 function getSqlComment() {
758 if ( $this->namespace ||
$this->deletedOnly
) {
759 return 'contributions page filtered for namespace or RevisionDeleted edits'; // potentially slow, see CR r58153
761 return 'contributions page unfiltered';
765 protected function preventClickjacking() {
766 $this->preventClickjacking
= true;
769 public function getPreventClickjacking() {
770 return $this->preventClickjacking
;