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
{
32 public function __construct() {
33 parent
::__construct( 'Contributions' );
36 public function execute( $par ) {
37 global $wgUser, $wgOut, $wgRequest;
40 $this->outputHeader();
42 $this->opts
= array();
44 if( $par == 'newbies' ) {
46 $this->opts
['contribs'] = 'newbie';
47 } elseif( isset( $par ) ) {
50 $target = $wgRequest->getVal( 'target' );
54 if( $wgRequest->getVal( 'contribs' ) == 'newbie' ) {
56 $this->opts
['contribs'] = 'newbie';
59 $this->opts
['deletedOnly'] = $wgRequest->getCheck( 'deletedOnly' );
61 if( !strlen( $target ) ) {
62 $wgOut->addHTML( $this->getForm() );
66 $this->opts
['limit'] = $wgRequest->getInt( 'limit', $wgUser->getOption('rclimit') );
67 $this->opts
['target'] = $target;
68 $this->opts
['topOnly'] = $wgRequest->getCheck( 'topOnly' );
70 $nt = Title
::makeTitleSafe( NS_USER
, $target );
72 $wgOut->addHTML( $this->getForm() );
75 $id = User
::idFromName( $nt->getText() );
77 if( $target != 'newbies' ) {
78 $target = $nt->getText();
79 $wgOut->setSubtitle( $this->contributionsSub( $nt, $id ) );
80 $wgOut->setHTMLTitle( wfMsg( 'pagetitle', wfMsgExt( 'contributions-title', array( 'parsemag' ),$target ) ) );
81 $user = User
::newFromName( $target, false );
82 if ( is_object($user) ) {
83 $wgUser->getSkin()->setRelevantUser( $user );
86 $wgOut->setSubtitle( wfMsgHtml( 'sp-contributions-newbies-sub') );
87 $wgOut->setHTMLTitle( wfMsg( 'pagetitle', wfMsg( 'sp-contributions-newbies-title' ) ) );
90 if( ( $ns = $wgRequest->getVal( 'namespace', null ) ) !== null && $ns !== '' ) {
91 $this->opts
['namespace'] = intval( $ns );
93 $this->opts
['namespace'] = '';
96 $this->opts
['tagFilter'] = (string) $wgRequest->getVal( 'tagFilter' );
98 // Allows reverts to have the bot flag in recent changes. It is just here to
99 // be passed in the form at the top of the page
100 if( $wgUser->isAllowed( 'markbotedits' ) && $wgRequest->getBool( 'bot' ) ) {
101 $this->opts
['bot'] = '1';
104 $skip = $wgRequest->getText( 'offset' ) ||
$wgRequest->getText( 'dir' ) == 'prev';
105 # Offset overrides year/month selection
107 $this->opts
['year'] = '';
108 $this->opts
['month'] = '';
110 $this->opts
['year'] = $wgRequest->getIntOrNull( 'year' );
111 $this->opts
['month'] = $wgRequest->getIntOrNull( 'month' );
114 // Add RSS/atom links
115 $this->setSyndicated();
116 $feedType = $wgRequest->getVal( 'feed' );
118 return $this->feed( $feedType );
121 if ( wfRunHooks( 'SpecialContributionsBeforeMainOutput', array( $id ) ) ) {
123 $wgOut->addHTML( $this->getForm() );
125 $pager = new ContribsPager( array(
127 'namespace' => $this->opts
['namespace'],
128 'year' => $this->opts
['year'],
129 'month' => $this->opts
['month'],
130 'deletedOnly' => $this->opts
['deletedOnly'],
131 'topOnly' => $this->opts
['topOnly'],
133 if( !$pager->getNumRows() ) {
134 $wgOut->addWikiMsg( 'nocontribs', $target );
136 # Show a message about slave lag, if applicable
137 if( ( $lag = $pager->getDatabase()->getLag() ) > 0 )
138 $wgOut->showLagWarning( $lag );
141 '<p>' . $pager->getNavigationBar() . '</p>' .
143 '<p>' . $pager->getNavigationBar() . '</p>'
146 $wgOut->preventClickjacking( $pager->getPreventClickjacking() );
149 # Show the appropriate "footer" message - WHOIS tools, etc.
150 if( $target != 'newbies' ) {
151 $message = 'sp-contributions-footer';
152 if ( IP
::isIPAddress( $target ) ) {
153 $message = 'sp-contributions-footer-anon';
155 $user = User
::newFromName( $target );
156 if ( !$user ||
$user->isAnon() ) {
157 // No message for non-existing users
162 $text = wfMsgNoTrans( $message, $target );
163 if( !wfEmptyMsg( $message, $text ) && $text != '-' ) {
165 "<div class='mw-contributions-footer'>\n$1\n</div>",
166 array( $message, $target ) );
172 protected function setSyndicated() {
174 $wgOut->setSyndicated( true );
175 $wgOut->setFeedAppendQuery( wfArrayToCGI( $this->opts
) );
179 * Generates the subheading with links
180 * @param $nt Title object for the target
181 * @param $id Integer: User ID for the target
182 * @return String: appropriately-escaped HTML to be output literally
183 * @todo Fixme: almost the same as getSubTitle in SpecialDeletedContributions.php. Could be combined.
185 protected function contributionsSub( $nt, $id ) {
186 global $wgSysopUserBans, $wgLang, $wgUser, $wgOut;
188 $sk = $wgUser->getSkin();
190 if ( $id === null ) {
191 $user = htmlspecialchars( $nt->getText() );
193 $user = $sk->link( $nt, htmlspecialchars( $nt->getText() ) );
195 $userObj = User
::newFromName( $nt->getText(), /* check for username validity not needed */ false );
196 $talk = $nt->getTalkPage();
199 $tools[] = $sk->link( $talk, wfMsgHtml( 'sp-contributions-talk' ) );
200 if( ( $id !== null && $wgSysopUserBans ) ||
( $id === null && IP
::isIPAddress( $nt->getText() ) ) ) {
201 if( $wgUser->isAllowed( 'block' ) ) { # Block / Change block / Unblock links
202 if ( $userObj->isBlocked() ) {
203 $tools[] = $sk->linkKnown( # Change block link
204 SpecialPage
::getTitleFor( 'Blockip', $nt->getDBkey() ),
205 wfMsgHtml( 'change-blocklink' )
207 $tools[] = $sk->linkKnown( # Unblock link
208 SpecialPage
::getTitleFor( 'Ipblocklist' ),
209 wfMsgHtml( 'unblocklink' ),
212 'action' => 'unblock',
213 'ip' => $nt->getDBkey()
217 else { # User is not blocked
218 $tools[] = $sk->linkKnown( # Block link
219 SpecialPage
::getTitleFor( 'Blockip', $nt->getDBkey() ),
220 wfMsgHtml( 'blocklink' )
225 $tools[] = $sk->linkKnown(
226 SpecialPage
::getTitleFor( 'Log' ),
227 wfMsgHtml( 'sp-contributions-blocklog' ),
231 'page' => $nt->getPrefixedText()
236 $tools[] = $sk->linkKnown(
237 SpecialPage
::getTitleFor( 'Listfiles' ),
238 wfMsgHtml( 'sp-contributions-uploads' ),
240 array( 'user' => $nt->getText() )
244 $tools[] = $sk->linkKnown(
245 SpecialPage
::getTitleFor( 'Log' ),
246 wfMsgHtml( 'sp-contributions-logs' ),
248 array( 'user' => $nt->getText() )
251 # Add link to deleted user contributions for priviledged users
252 if( $wgUser->isAllowed( 'deletedhistory' ) ) {
253 $tools[] = $sk->linkKnown(
254 SpecialPage
::getTitleFor( 'DeletedContributions', $nt->getDBkey() ),
255 wfMsgHtml( 'sp-contributions-deleted' )
259 # Add a link to change user rights for privileged users
260 $userrightsPage = new UserrightsPage();
261 if( $id !== null && $userrightsPage->userCanChangeRights( User
::newFromId( $id ) ) ) {
262 $tools[] = $sk->linkKnown(
263 SpecialPage
::getTitleFor( 'Userrights', $nt->getDBkey() ),
264 wfMsgHtml( 'sp-contributions-userrights' )
268 wfRunHooks( 'ContributionsToolLinks', array( $id, $nt, &$tools ) );
270 $links = $wgLang->pipeList( $tools );
272 // Show a note if the user is blocked and display the last block log entry.
273 if ( $userObj->isBlocked() ) {
274 LogEventsList
::showLogExtract(
277 $nt->getPrefixedText(),
281 'showIfEmpty' => false,
284 'sp-contributions-blocked-notice-anon' :
285 'sp-contributions-blocked-notice',
286 $nt->getText() # Support GENDER in 'sp-contributions-blocked-notice'
288 'offset' => '' # don't use $wgRequest parameter offset
294 // Old message 'contribsub' had one parameter, but that doesn't work for
295 // languages that want to put the "for" bit right after $user but before
296 // $links. If 'contribsub' is around, use it for reverse compatibility,
297 // otherwise use 'contribsub2'.
298 if( wfEmptyMsg( 'contribsub', wfMsg( 'contribsub' ) ) ) {
299 return wfMsgHtml( 'contribsub2', $user, $links );
301 return wfMsgHtml( 'contribsub', "$user ($links)" );
306 * Generates the namespace selector form with hidden attributes.
307 * @return String: HTML fragment
309 protected function getForm() {
312 $this->opts
['title'] = $this->getTitle()->getPrefixedText();
313 if( !isset( $this->opts
['target'] ) ) {
314 $this->opts
['target'] = '';
316 $this->opts
['target'] = str_replace( '_' , ' ' , $this->opts
['target'] );
319 if( !isset( $this->opts
['namespace'] ) ) {
320 $this->opts
['namespace'] = '';
323 if( !isset( $this->opts
['contribs'] ) ) {
324 $this->opts
['contribs'] = 'user';
327 if( !isset( $this->opts
['year'] ) ) {
328 $this->opts
['year'] = '';
331 if( !isset( $this->opts
['month'] ) ) {
332 $this->opts
['month'] = '';
335 if( $this->opts
['contribs'] == 'newbie' ) {
336 $this->opts
['target'] = '';
339 if( !isset( $this->opts
['tagFilter'] ) ) {
340 $this->opts
['tagFilter'] = '';
343 if( !isset( $this->opts
['topOnly'] ) ) {
344 $this->opts
['topOnly'] = false;
347 $f = Xml
::openElement( 'form', array( 'method' => 'get', 'action' => $wgScript, 'class' => 'mw-contributions-form' ) );
349 # Add hidden params for tracking except for parameters in $skipParameters
350 $skipParameters = array( 'namespace', 'deletedOnly', 'target', 'contribs', 'year', 'month', 'topOnly' );
351 foreach ( $this->opts
as $name => $value ) {
352 if( in_array( $name, $skipParameters ) ) {
355 $f .= "\t" . Html
::hidden( $name, $value ) . "\n";
358 $tagFilter = ChangeTags
::buildTagFilterSelector( $this->opts
['tagFilter'] );
360 $f .= Xml
::fieldset( wfMsg( 'sp-contributions-search' ) ) .
361 Xml
::radioLabel( wfMsgExt( 'sp-contributions-newbies', array( 'parsemag' ) ),
362 'contribs', 'newbie' , 'newbie', $this->opts
['contribs'] == 'newbie' ) . '<br />' .
363 Xml
::radioLabel( wfMsgExt( 'sp-contributions-username', array( 'parsemag' ) ),
364 'contribs' , 'user', 'user', $this->opts
['contribs'] == 'user' ) . ' ' .
365 Html
::input( 'target', $this->opts
['target'], 'text', array(
368 ) +
( $this->opts
['target'] ?
array() : array( 'autofocus' ) ) ) . ' '.
369 Html
::rawElement( 'span', array( 'style' => 'white-space: nowrap' ),
370 Xml
::label( wfMsg( 'namespace' ), 'namespace' ) . ' ' .
371 Xml
::namespaceSelector( $this->opts
['namespace'], '' )
373 Xml
::checkLabel( wfMsg( 'history-show-deleted' ),
374 'deletedOnly', 'mw-show-deleted-only', $this->opts
['deletedOnly'] ) . '<br />' .
375 Xml
::tags( 'p', null, Xml
::checkLabel( wfMsg( 'sp-contributions-toponly' ),
376 'topOnly', 'mw-show-top-only', $this->opts
['topOnly'] ) ) .
377 ( $tagFilter ? Xml
::tags( 'p', null, implode( ' ', $tagFilter ) ) : '' ) .
378 Html
::rawElement( 'p', array( 'style' => 'white-space: nowrap' ),
379 Xml
::dateMenu( $this->opts
['year'], $this->opts
['month'] ) . ' ' .
380 Xml
::submitButton( wfMsg( 'sp-contributions-submit' ) )
382 $explain = wfMsgExt( 'sp-contributions-explain', 'parseinline' );
383 if( !wfEmptyMsg( 'sp-contributions-explain', $explain ) ) {
384 $f .= "<p id='mw-sp-contributions-explain'>{$explain}</p>";
386 $f .= Xml
::closeElement('fieldset' ) .
387 Xml
::closeElement( 'form' );
392 * Output a subscription feed listing recent edits to this page.
393 * @param $type String
395 protected function feed( $type ) {
396 global $wgFeed, $wgFeedClasses, $wgFeedLimit, $wgOut;
399 $wgOut->addWikiMsg( 'feed-unavailable' );
403 if( !isset( $wgFeedClasses[$type] ) ) {
404 $wgOut->addWikiMsg( 'feed-invalid' );
408 $feed = new $wgFeedClasses[$type](
410 wfMsgExt( 'tagline', 'parsemag' ),
411 $this->getTitle()->getFullUrl() . "/" . urlencode($this->opts
['target'])
414 // Already valid title
415 $nt = Title
::makeTitleSafe( NS_USER
, $this->opts
['target'] );
416 $target = $this->opts
['target'] == 'newbies' ?
'newbies' : $nt->getText();
418 $pager = new ContribsPager( array(
420 'namespace' => $this->opts
['namespace'],
421 'year' => $this->opts
['year'],
422 'month' => $this->opts
['month'],
423 'tagFilter' => $this->opts
['tagFilter'],
424 'deletedOnly' => $this->opts
['deletedOnly'],
425 'topOnly' => $this->opts
['topOnly'],
428 $pager->mLimit
= min( $this->opts
['limit'], $wgFeedLimit );
431 if( $pager->getNumRows() > 0 ) {
432 foreach ( $pager->mResult
as $row ) {
433 $feed->outItem( $this->feedItem( $row ) );
439 protected function feedTitle() {
440 global $wgLanguageCode, $wgSitename;
441 $page = SpecialPage
::getPage( 'Contributions' );
442 $desc = $page->getDescription();
443 return "$wgSitename - $desc [$wgLanguageCode]";
446 protected function feedItem( $row ) {
447 $title = Title
::MakeTitle( intval( $row->page_namespace
), $row->page_title
);
449 $date = $row->rev_timestamp
;
450 $comments = $title->getTalkPage()->getFullURL();
451 $revision = Revision
::newFromTitle( $title, $row->rev_id
);
454 $title->getPrefixedText(),
455 $this->feedItemDesc( $revision ),
456 $title->getFullURL(),
458 $this->feedItemAuthor( $revision ),
466 protected function feedItemAuthor( $revision ) {
467 return $revision->getUserText();
470 protected function feedItemDesc( $revision ) {
472 return '<p>' . htmlspecialchars( $revision->getUserText() ) . wfMsgForContent( 'colon-separator' ) .
473 htmlspecialchars( FeedItem
::stripComment( $revision->getComment() ) ) .
474 "</p>\n<hr />\n<div>" .
475 nl2br( htmlspecialchars( $revision->getText() ) ) . "</div>";
482 * Pager for Special:Contributions
483 * @ingroup SpecialPage Pager
485 class ContribsPager
extends ReverseChronologicalPager
{
486 public $mDefaultDirection = true;
487 var $messages, $target;
488 var $namespace = '', $mDb;
489 var $preventClickjacking = false;
491 function __construct( $options ) {
492 parent
::__construct();
494 $msgs = array( 'uctop', 'diff', 'newarticle', 'rollbacklink', 'diff', 'hist', 'rev-delundel', 'pipe-separator' );
496 foreach( $msgs as $msg ) {
497 $this->messages
[$msg] = wfMsgExt( $msg, array( 'escapenoentities' ) );
500 $this->target
= isset( $options['target'] ) ?
$options['target'] : '';
501 $this->namespace = isset( $options['namespace'] ) ?
$options['namespace'] : '';
502 $this->tagFilter
= isset( $options['tagFilter'] ) ?
$options['tagFilter'] : false;
504 $this->deletedOnly
= !empty( $options['deletedOnly'] );
505 $this->topOnly
= !empty( $options['topOnly'] );
507 $year = isset( $options['year'] ) ?
$options['year'] : false;
508 $month = isset( $options['month'] ) ?
$options['month'] : false;
509 $this->getDateCond( $year, $month );
511 $this->mDb
= wfGetDB( DB_SLAVE
, 'contributions' );
514 function getDefaultQuery() {
515 $query = parent
::getDefaultQuery();
516 $query['target'] = $this->target
;
520 function getQueryInfo() {
522 list( $tables, $index, $userCond, $join_cond ) = $this->getUserCond();
524 $conds = array_merge( $userCond, $this->getNamespaceCond() );
525 // Paranoia: avoid brute force searches (bug 17342)
526 if( !$wgUser->isAllowed( 'deletedhistory' ) ) {
527 $conds[] = $this->mDb
->bitAnd('rev_deleted',Revision
::DELETED_USER
) . ' = 0';
528 } else if( !$wgUser->isAllowed( 'suppressrevision' ) ) {
529 $conds[] = $this->mDb
->bitAnd('rev_deleted',Revision
::SUPPRESSED_USER
) .
530 ' != ' . Revision
::SUPPRESSED_USER
;
532 $join_cond['page'] = array( 'INNER JOIN', 'page_id=rev_page' );
537 'page_namespace', 'page_title', 'page_is_new', 'page_latest', 'page_is_redirect',
538 'page_len','rev_id', 'rev_page', 'rev_text_id', 'rev_timestamp', 'rev_comment',
539 'rev_minor_edit', 'rev_user', 'rev_user_text', 'rev_parent_id', 'rev_deleted'
542 'options' => array( 'USE INDEX' => array('revision' => $index) ),
543 'join_conds' => $join_cond
546 ChangeTags
::modifyDisplayQuery(
547 $queryInfo['tables'],
548 $queryInfo['fields'],
550 $queryInfo['join_conds'],
551 $queryInfo['options'],
555 wfRunHooks( 'ContribsPager::getQueryInfo', array( &$this, &$queryInfo ) );
559 function getUserCond() {
560 $condition = array();
561 $join_conds = array();
562 if( $this->target
== 'newbies' ) {
563 $tables = array( 'user_groups', 'page', 'revision' );
564 $max = $this->mDb
->selectField( 'user', 'max(user_id)', false, __METHOD__
);
565 $condition[] = 'rev_user >' . (int)($max - $max / 100);
566 $condition[] = 'ug_group IS NULL';
567 $index = 'user_timestamp';
568 # FIXME: other groups may have 'bot' rights
569 $join_conds['user_groups'] = array( 'LEFT JOIN', "ug_user = rev_user AND ug_group = 'bot'" );
571 $tables = array( 'page', 'revision' );
572 $condition['rev_user_text'] = $this->target
;
573 $index = 'usertext_timestamp';
575 if( $this->deletedOnly
) {
576 $condition[] = "rev_deleted != '0'";
578 if( $this->topOnly
) {
579 $condition[] = "rev_id = page_latest";
581 return array( $tables, $index, $condition, $join_conds );
584 function getNamespaceCond() {
585 if( $this->namespace !== '' ) {
586 return array( 'page_namespace' => (int)$this->namespace );
592 function getIndexField() {
593 return 'rev_timestamp';
596 function getStartBody() {
600 function getEndBody() {
605 * Generates each row in the contributions list.
607 * Contributions which are marked "top" are currently on top of the history.
608 * For these contributions, a [rollback] link is shown for users with roll-
609 * back privileges. The rollback link restores the most recent version that
610 * was not written by the target user.
612 * @todo This would probably look a lot nicer in a table.
614 function formatRow( $row ) {
615 global $wgUser, $wgLang, $wgContLang;
616 wfProfileIn( __METHOD__
);
618 $sk = $this->getSkin();
619 $rev = new Revision( $row );
622 $page = Title
::newFromRow( $row );
623 $page->resetArticleId( $row->rev_page
); // use process cache
626 htmlspecialchars( $page->getPrefixedText() ),
628 $page->isRedirect() ?
array( 'redirect' => 'no' ) : array()
630 # Mark current revisions
632 if( $row->rev_id
== $row->page_latest
) {
633 $topmarktext .= '<span class="mw-uctop">' . $this->messages
['uctop'] . '</span>';
635 if( !$row->page_is_new
&& $page->quickUserCan( 'rollback' )
636 && $page->quickUserCan( 'edit' ) )
638 $this->preventClickjacking();
639 $topmarktext .= ' '.$sk->generateRollback( $rev );
642 # Is there a visible previous revision?
643 if( $rev->userCan( Revision
::DELETED_TEXT
) && $rev->getParentId() !== 0 ) {
644 $difftext = $sk->linkKnown(
646 $this->messages
['diff'],
650 'oldid' => $row->rev_id
654 $difftext = $this->messages
['diff'];
656 $histlink = $sk->linkKnown(
658 $this->messages
['hist'],
660 array( 'action' => 'history' )
663 $comment = $wgContLang->getDirMark() . $sk->revComment( $rev, false, true );
664 $date = $wgLang->timeanddate( wfTimestamp( TS_MW
, $row->rev_timestamp
), true );
665 if( $rev->userCan( Revision
::DELETED_TEXT
) ) {
668 htmlspecialchars($date),
670 array( 'oldid' => intval( $row->rev_id
) )
675 if( $rev->isDeleted( Revision
::DELETED_TEXT
) ) {
676 $d = '<span class="history-deleted">' . $d . '</span>';
679 if( $this->target
== 'newbies' ) {
680 $userlink = ' . . ' . $sk->userLink( $row->rev_user
, $row->rev_user_text
);
681 $userlink .= ' ' . wfMsg( 'parentheses', $sk->userTalkLink( $row->rev_user
, $row->rev_user_text
) ) . ' ';
686 if( $rev->getParentId() === 0 ) {
687 $nflag = ChangesList
::flag( 'newpage' );
692 if( $rev->isMinor() ) {
693 $mflag = ChangesList
::flag( 'minor' );
698 // Don't show useless link to people who cannot hide revisions
699 $canHide = $wgUser->isAllowed( 'deleterevision' );
700 if( $canHide ||
($rev->getVisibility() && $wgUser->isAllowed('deletedhistory')) ) {
701 if( !$rev->userCan( Revision
::DELETED_RESTRICTED
) ) {
702 $del = $this->mSkin
->revDeleteLinkDisabled( $canHide ); // revision was hidden from sysops
705 'type' => 'revision',
706 'target' => $page->getPrefixedDbkey(),
707 'ids' => $rev->getId()
709 $del = $this->mSkin
->revDeleteLink( $query,
710 $rev->isDeleted( Revision
::DELETED_RESTRICTED
), $canHide );
717 $diffHistLinks = '(' . $difftext . $this->messages
['pipe-separator'] . $histlink . ')';
718 $ret = "{$del}{$d} {$diffHistLinks} {$nflag}{$mflag} {$link}{$userlink} {$comment} {$topmarktext}";
720 # Denote if username is redacted for this edit
721 if( $rev->isDeleted( Revision
::DELETED_USER
) ) {
722 $ret .= " <strong>" . wfMsgHtml('rev-deleted-user-contribs') . "</strong>";
726 list($tagSummary, $newClasses) = ChangeTags
::formatSummaryRow( $row->ts_tags
, 'contributions' );
727 $classes = array_merge( $classes, $newClasses );
728 $ret .= " $tagSummary";
730 // Let extensions add data
731 wfRunHooks( 'ContributionsLineEnding', array( &$this, &$ret, $row ) );
733 $classes = implode( ' ', $classes );
734 $ret = "<li class=\"$classes\">$ret</li>\n";
735 wfProfileOut( __METHOD__
);
740 * Get the Database object in use
744 public function getDatabase() {
749 * Overwrite Pager function and return a helpful comment
751 function getSqlComment() {
752 if ( $this->namespace ||
$this->deletedOnly
) {
753 return 'contributions page filtered for namespace or RevisionDeleted edits'; // potentially slow, see CR r58153
755 return 'contributions page unfiltered';
759 protected function preventClickjacking() {
760 $this->preventClickjacking
= true;
763 public function getPreventClickjacking() {
764 return $this->preventClickjacking
;