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();
44 $this->opts
= array();
46 if( $par == 'newbies' ) {
48 $this->opts
['contribs'] = 'newbie';
49 } elseif( isset( $par ) ) {
52 $target = $wgRequest->getVal( 'target' );
56 if( $wgRequest->getVal( 'contribs' ) == 'newbie' ) {
58 $this->opts
['contribs'] = 'newbie';
61 $this->opts
['deletedOnly'] = $wgRequest->getCheck( 'deletedOnly' );
63 if( !strlen( $target ) ) {
64 $wgOut->addHTML( $this->getForm() );
68 $this->opts
['limit'] = $wgRequest->getInt( 'limit', $wgUser->getOption('rclimit') );
69 $this->opts
['target'] = $target;
70 $this->opts
['topOnly'] = $wgRequest->getCheck( 'topOnly' );
72 $nt = Title
::makeTitleSafe( NS_USER
, $target );
74 $wgOut->addHTML( $this->getForm() );
77 $id = User
::idFromName( $nt->getText() );
79 if( $target != 'newbies' ) {
80 $target = $nt->getText();
81 $wgOut->setSubtitle( $this->contributionsSub( $nt, $id ) );
82 $wgOut->setHTMLTitle( wfMsg( 'pagetitle', wfMsgExt( 'contributions-title', array( 'parsemag' ),$target ) ) );
83 $user = User
::newFromName( $target, false );
84 if ( is_object($user) ) {
85 $wgUser->getSkin()->setRelevantUser( $user );
88 $wgOut->setSubtitle( wfMsgHtml( 'sp-contributions-newbies-sub') );
89 $wgOut->setHTMLTitle( wfMsg( 'pagetitle', wfMsg( 'sp-contributions-newbies-title' ) ) );
92 if( ( $ns = $wgRequest->getVal( 'namespace', null ) ) !== null && $ns !== '' ) {
93 $this->opts
['namespace'] = intval( $ns );
95 $this->opts
['namespace'] = '';
98 $this->opts
['tagFilter'] = (string) $wgRequest->getVal( 'tagFilter' );
100 // Allows reverts to have the bot flag in recent changes. It is just here to
101 // be passed in the form at the top of the page
102 if( $wgUser->isAllowed( 'markbotedits' ) && $wgRequest->getBool( 'bot' ) ) {
103 $this->opts
['bot'] = '1';
106 $skip = $wgRequest->getText( 'offset' ) ||
$wgRequest->getText( 'dir' ) == 'prev';
107 # Offset overrides year/month selection
109 $this->opts
['year'] = '';
110 $this->opts
['month'] = '';
112 $this->opts
['year'] = $wgRequest->getIntOrNull( 'year' );
113 $this->opts
['month'] = $wgRequest->getIntOrNull( 'month' );
116 // Add RSS/atom links
117 $this->setSyndicated();
118 $feedType = $wgRequest->getVal( 'feed' );
120 return $this->feed( $feedType );
123 if ( wfRunHooks( 'SpecialContributionsBeforeMainOutput', array( $id ) ) ) {
125 $wgOut->addHTML( $this->getForm() );
127 $pager = new ContribsPager( array(
129 'namespace' => $this->opts
['namespace'],
130 'year' => $this->opts
['year'],
131 'month' => $this->opts
['month'],
132 'deletedOnly' => $this->opts
['deletedOnly'],
133 'topOnly' => $this->opts
['topOnly'],
135 if( !$pager->getNumRows() ) {
136 $wgOut->addWikiMsg( 'nocontribs', $target );
138 # Show a message about slave lag, if applicable
139 if( ( $lag = $pager->getDatabase()->getLag() ) > 0 )
140 $wgOut->showLagWarning( $lag );
143 '<p>' . $pager->getNavigationBar() . '</p>' .
145 '<p>' . $pager->getNavigationBar() . '</p>'
148 $wgOut->preventClickjacking( $pager->getPreventClickjacking() );
151 # Show the appropriate "footer" message - WHOIS tools, etc.
152 if( $target != 'newbies' ) {
153 $message = 'sp-contributions-footer';
154 if ( IP
::isIPAddress( $target ) ) {
155 $message = 'sp-contributions-footer-anon';
157 $user = User
::newFromName( $target );
158 if ( !$user ||
$user->isAnon() ) {
159 // No message for non-existing users
164 $text = wfMsgNoTrans( $message, $target );
165 if( !wfEmptyMsg( $message, $text ) && $text != '-' ) {
167 "<div class='mw-contributions-footer'>\n$1\n</div>",
168 array( $message, $target ) );
174 protected function setSyndicated() {
176 $wgOut->setSyndicated( true );
177 $wgOut->setFeedAppendQuery( wfArrayToCGI( $this->opts
) );
181 * Generates the subheading with links
182 * @param $nt Title object for the target
183 * @param $id Integer: User ID for the target
184 * @return String: appropriately-escaped HTML to be output literally
185 * @todo Fixme: almost the same as getSubTitle in SpecialDeletedContributions.php. Could be combined.
187 protected function contributionsSub( $nt, $id ) {
188 global $wgSysopUserBans, $wgLang, $wgUser, $wgOut;
190 $sk = $wgUser->getSkin();
192 if ( $id === null ) {
193 $user = htmlspecialchars( $nt->getText() );
195 $user = $sk->link( $nt, htmlspecialchars( $nt->getText() ) );
197 $userObj = User
::newFromName( $nt->getText(), /* check for username validity not needed */ false );
198 $talk = $nt->getTalkPage();
201 $tools[] = $sk->link( $talk, wfMsgHtml( 'sp-contributions-talk' ) );
202 if( ( $id !== null && $wgSysopUserBans ) ||
( $id === null && IP
::isIPAddress( $nt->getText() ) ) ) {
203 if( $wgUser->isAllowed( 'block' ) ) { # Block / Change block / Unblock links
204 if ( $userObj->isBlocked() ) {
205 $tools[] = $sk->linkKnown( # Change block link
206 SpecialPage
::getTitleFor( 'Blockip', $nt->getDBkey() ),
207 wfMsgHtml( 'change-blocklink' )
209 $tools[] = $sk->linkKnown( # Unblock link
210 SpecialPage
::getTitleFor( 'Ipblocklist' ),
211 wfMsgHtml( 'unblocklink' ),
214 'action' => 'unblock',
215 'ip' => $nt->getDBkey()
219 else { # User is not blocked
220 $tools[] = $sk->linkKnown( # Block link
221 SpecialPage
::getTitleFor( 'Blockip', $nt->getDBkey() ),
222 wfMsgHtml( 'blocklink' )
227 $tools[] = $sk->linkKnown(
228 SpecialPage
::getTitleFor( 'Log' ),
229 wfMsgHtml( 'sp-contributions-blocklog' ),
233 'page' => $nt->getPrefixedText()
238 $tools[] = $sk->linkKnown(
239 SpecialPage
::getTitleFor( 'Listfiles' ),
240 wfMsgHtml( 'sp-contributions-uploads' ),
242 array( 'user' => $nt->getText() )
246 $tools[] = $sk->linkKnown(
247 SpecialPage
::getTitleFor( 'Log' ),
248 wfMsgHtml( 'sp-contributions-logs' ),
250 array( 'user' => $nt->getText() )
253 # Add link to deleted user contributions for priviledged users
254 if( $wgUser->isAllowed( 'deletedhistory' ) ) {
255 $tools[] = $sk->linkKnown(
256 SpecialPage
::getTitleFor( 'DeletedContributions', $nt->getDBkey() ),
257 wfMsgHtml( 'sp-contributions-deleted' )
261 # Add a link to change user rights for privileged users
262 $userrightsPage = new UserrightsPage();
263 if( $id !== null && $userrightsPage->userCanChangeRights( User
::newFromId( $id ) ) ) {
264 $tools[] = $sk->linkKnown(
265 SpecialPage
::getTitleFor( 'Userrights', $nt->getDBkey() ),
266 wfMsgHtml( 'sp-contributions-userrights' )
270 wfRunHooks( 'ContributionsToolLinks', array( $id, $nt, &$tools ) );
272 $links = $wgLang->pipeList( $tools );
274 // Show a note if the user is blocked and display the last block log entry.
275 if ( $userObj->isBlocked() ) {
276 LogEventsList
::showLogExtract(
279 $nt->getPrefixedText(),
283 'showIfEmpty' => false,
286 'sp-contributions-blocked-notice-anon' :
287 'sp-contributions-blocked-notice',
288 $nt->getText() # Support GENDER in 'sp-contributions-blocked-notice'
290 'offset' => '' # don't use $wgRequest parameter offset
296 // Old message 'contribsub' had one parameter, but that doesn't work for
297 // languages that want to put the "for" bit right after $user but before
298 // $links. If 'contribsub' is around, use it for reverse compatibility,
299 // otherwise use 'contribsub2'.
300 if( wfEmptyMsg( 'contribsub', wfMsg( 'contribsub' ) ) ) {
301 return wfMsgHtml( 'contribsub2', $user, $links );
303 return wfMsgHtml( 'contribsub', "$user ($links)" );
308 * Generates the namespace selector form with hidden attributes.
309 * @return String: HTML fragment
311 protected function getForm() {
314 $this->opts
['title'] = $this->getTitle()->getPrefixedText();
315 if( !isset( $this->opts
['target'] ) ) {
316 $this->opts
['target'] = '';
318 $this->opts
['target'] = str_replace( '_' , ' ' , $this->opts
['target'] );
321 if( !isset( $this->opts
['namespace'] ) ) {
322 $this->opts
['namespace'] = '';
325 if( !isset( $this->opts
['contribs'] ) ) {
326 $this->opts
['contribs'] = 'user';
329 if( !isset( $this->opts
['year'] ) ) {
330 $this->opts
['year'] = '';
333 if( !isset( $this->opts
['month'] ) ) {
334 $this->opts
['month'] = '';
337 if( $this->opts
['contribs'] == 'newbie' ) {
338 $this->opts
['target'] = '';
341 if( !isset( $this->opts
['tagFilter'] ) ) {
342 $this->opts
['tagFilter'] = '';
345 if( !isset( $this->opts
['topOnly'] ) ) {
346 $this->opts
['topOnly'] = false;
349 $f = Xml
::openElement( 'form', array( 'method' => 'get', 'action' => $wgScript, 'class' => 'mw-contributions-form' ) );
351 # Add hidden params for tracking except for parameters in $skipParameters
352 $skipParameters = array( 'namespace', 'deletedOnly', 'target', 'contribs', 'year', 'month', 'topOnly' );
353 foreach ( $this->opts
as $name => $value ) {
354 if( in_array( $name, $skipParameters ) ) {
357 $f .= "\t" . Html
::hidden( $name, $value ) . "\n";
360 $tagFilter = ChangeTags
::buildTagFilterSelector( $this->opts
['tagFilter'] );
362 $f .= Xml
::fieldset( wfMsg( 'sp-contributions-search' ) ) .
363 Xml
::radioLabel( wfMsgExt( 'sp-contributions-newbies', array( 'parsemag' ) ),
364 'contribs', 'newbie' , 'newbie', $this->opts
['contribs'] == 'newbie' ) . '<br />' .
365 Xml
::radioLabel( wfMsgExt( 'sp-contributions-username', array( 'parsemag' ) ),
366 'contribs' , 'user', 'user', $this->opts
['contribs'] == 'user' ) . ' ' .
367 Html
::input( 'target', $this->opts
['target'], 'text', array(
370 ) +
( $this->opts
['target'] ?
array() : array( 'autofocus' ) ) ) . ' '.
371 Html
::rawElement( 'span', array( 'style' => 'white-space: nowrap' ),
372 Xml
::label( wfMsg( 'namespace' ), 'namespace' ) . ' ' .
373 Xml
::namespaceSelector( $this->opts
['namespace'], '' )
375 Xml
::checkLabel( wfMsg( 'history-show-deleted' ),
376 'deletedOnly', 'mw-show-deleted-only', $this->opts
['deletedOnly'] ) . '<br />' .
377 Xml
::tags( 'p', null, Xml
::checkLabel( wfMsg( 'sp-contributions-toponly' ),
378 'topOnly', 'mw-show-top-only', $this->opts
['topOnly'] ) ) .
379 ( $tagFilter ? Xml
::tags( 'p', null, implode( ' ', $tagFilter ) ) : '' ) .
380 Html
::rawElement( 'p', array( 'style' => 'white-space: nowrap' ),
381 Xml
::dateMenu( $this->opts
['year'], $this->opts
['month'] ) . ' ' .
382 Xml
::submitButton( wfMsg( 'sp-contributions-submit' ) )
384 $explain = wfMsgExt( 'sp-contributions-explain', 'parseinline' );
385 if( !wfEmptyMsg( 'sp-contributions-explain', $explain ) ) {
386 $f .= "<p id='mw-sp-contributions-explain'>{$explain}</p>";
388 $f .= Xml
::closeElement('fieldset' ) .
389 Xml
::closeElement( 'form' );
394 * Output a subscription feed listing recent edits to this page.
395 * @param $type String
397 protected function feed( $type ) {
398 global $wgFeed, $wgFeedClasses, $wgFeedLimit, $wgOut;
401 $wgOut->addWikiMsg( 'feed-unavailable' );
405 if( !isset( $wgFeedClasses[$type] ) ) {
406 $wgOut->addWikiMsg( 'feed-invalid' );
410 $feed = new $wgFeedClasses[$type](
412 wfMsgExt( 'tagline', 'parsemag' ),
413 $this->getTitle()->getFullUrl() . "/" . urlencode($this->opts
['target'])
416 // Already valid title
417 $nt = Title
::makeTitleSafe( NS_USER
, $this->opts
['target'] );
418 $target = $this->opts
['target'] == 'newbies' ?
'newbies' : $nt->getText();
420 $pager = new ContribsPager( array(
422 'namespace' => $this->opts
['namespace'],
423 'year' => $this->opts
['year'],
424 'month' => $this->opts
['month'],
425 'tagFilter' => $this->opts
['tagFilter'],
426 'deletedOnly' => $this->opts
['deletedOnly'],
427 'topOnly' => $this->opts
['topOnly'],
430 $pager->mLimit
= min( $this->opts
['limit'], $wgFeedLimit );
433 if( $pager->getNumRows() > 0 ) {
434 foreach ( $pager->mResult
as $row ) {
435 $feed->outItem( $this->feedItem( $row ) );
441 protected function feedTitle() {
442 global $wgLanguageCode, $wgSitename;
443 $page = SpecialPage
::getPage( 'Contributions' );
444 $desc = $page->getDescription();
445 return "$wgSitename - $desc [$wgLanguageCode]";
448 protected function feedItem( $row ) {
449 $title = Title
::MakeTitle( intval( $row->page_namespace
), $row->page_title
);
451 $date = $row->rev_timestamp
;
452 $comments = $title->getTalkPage()->getFullURL();
453 $revision = Revision
::newFromTitle( $title, $row->rev_id
);
456 $title->getPrefixedText(),
457 $this->feedItemDesc( $revision ),
458 $title->getFullURL(),
460 $this->feedItemAuthor( $revision ),
468 protected function feedItemAuthor( $revision ) {
469 return $revision->getUserText();
472 protected function feedItemDesc( $revision ) {
474 return '<p>' . htmlspecialchars( $revision->getUserText() ) . wfMsgForContent( 'colon-separator' ) .
475 htmlspecialchars( FeedItem
::stripComment( $revision->getComment() ) ) .
476 "</p>\n<hr />\n<div>" .
477 nl2br( htmlspecialchars( $revision->getText() ) ) . "</div>";
484 * Pager for Special:Contributions
485 * @ingroup SpecialPage Pager
487 class ContribsPager
extends ReverseChronologicalPager
{
488 public $mDefaultDirection = true;
489 var $messages, $target;
490 var $namespace = '', $mDb;
491 var $preventClickjacking = false;
493 function __construct( $options ) {
494 parent
::__construct();
496 $msgs = array( 'uctop', 'diff', 'newarticle', 'rollbacklink', 'diff', 'hist', 'rev-delundel', 'pipe-separator' );
498 foreach( $msgs as $msg ) {
499 $this->messages
[$msg] = wfMsgExt( $msg, array( 'escapenoentities' ) );
502 $this->target
= isset( $options['target'] ) ?
$options['target'] : '';
503 $this->namespace = isset( $options['namespace'] ) ?
$options['namespace'] : '';
504 $this->tagFilter
= isset( $options['tagFilter'] ) ?
$options['tagFilter'] : false;
506 $this->deletedOnly
= !empty( $options['deletedOnly'] );
507 $this->topOnly
= !empty( $options['topOnly'] );
509 $year = isset( $options['year'] ) ?
$options['year'] : false;
510 $month = isset( $options['month'] ) ?
$options['month'] : false;
511 $this->getDateCond( $year, $month );
513 $this->mDb
= wfGetDB( DB_SLAVE
, 'contributions' );
516 function getDefaultQuery() {
517 $query = parent
::getDefaultQuery();
518 $query['target'] = $this->target
;
522 function getQueryInfo() {
524 list( $tables, $index, $userCond, $join_cond ) = $this->getUserCond();
526 $conds = array_merge( $userCond, $this->getNamespaceCond() );
527 // Paranoia: avoid brute force searches (bug 17342)
528 if( !$wgUser->isAllowed( 'deletedhistory' ) ) {
529 $conds[] = $this->mDb
->bitAnd('rev_deleted',Revision
::DELETED_USER
) . ' = 0';
530 } else if( !$wgUser->isAllowed( 'suppressrevision' ) ) {
531 $conds[] = $this->mDb
->bitAnd('rev_deleted',Revision
::SUPPRESSED_USER
) .
532 ' != ' . Revision
::SUPPRESSED_USER
;
534 $join_cond['page'] = array( 'INNER JOIN', 'page_id=rev_page' );
539 'page_namespace', 'page_title', 'page_is_new', 'page_latest', 'page_is_redirect',
540 'page_len','rev_id', 'rev_page', 'rev_text_id', 'rev_timestamp', 'rev_comment',
541 'rev_minor_edit', 'rev_user', 'rev_user_text', 'rev_parent_id', 'rev_deleted'
544 'options' => array( 'USE INDEX' => array('revision' => $index) ),
545 'join_conds' => $join_cond
548 ChangeTags
::modifyDisplayQuery(
549 $queryInfo['tables'],
550 $queryInfo['fields'],
552 $queryInfo['join_conds'],
553 $queryInfo['options'],
557 wfRunHooks( 'ContribsPager::getQueryInfo', array( &$this, &$queryInfo ) );
561 function getUserCond() {
562 $condition = array();
563 $join_conds = array();
564 if( $this->target
== 'newbies' ) {
565 $tables = array( 'user_groups', 'page', 'revision' );
566 $max = $this->mDb
->selectField( 'user', 'max(user_id)', false, __METHOD__
);
567 $condition[] = 'rev_user >' . (int)($max - $max / 100);
568 $condition[] = 'ug_group IS NULL';
569 $index = 'user_timestamp';
570 # FIXME: other groups may have 'bot' rights
571 $join_conds['user_groups'] = array( 'LEFT JOIN', "ug_user = rev_user AND ug_group = 'bot'" );
573 $tables = array( 'page', 'revision' );
574 $condition['rev_user_text'] = $this->target
;
575 $index = 'usertext_timestamp';
577 if( $this->deletedOnly
) {
578 $condition[] = "rev_deleted != '0'";
580 if( $this->topOnly
) {
581 $condition[] = "rev_id = page_latest";
583 return array( $tables, $index, $condition, $join_conds );
586 function getNamespaceCond() {
587 if( $this->namespace !== '' ) {
588 return array( 'page_namespace' => (int)$this->namespace );
594 function getIndexField() {
595 return 'rev_timestamp';
598 function getStartBody() {
602 function getEndBody() {
607 * Generates each row in the contributions list.
609 * Contributions which are marked "top" are currently on top of the history.
610 * For these contributions, a [rollback] link is shown for users with roll-
611 * back privileges. The rollback link restores the most recent version that
612 * was not written by the target user.
614 * @todo This would probably look a lot nicer in a table.
616 function formatRow( $row ) {
617 global $wgUser, $wgLang, $wgContLang;
618 wfProfileIn( __METHOD__
);
620 $sk = $this->getSkin();
621 $rev = new Revision( $row );
624 $page = Title
::newFromRow( $row );
625 $page->resetArticleId( $row->rev_page
); // use process cache
628 htmlspecialchars( $page->getPrefixedText() ),
630 $page->isRedirect() ?
array( 'redirect' => 'no' ) : array()
632 # Mark current revisions
634 if( $row->rev_id
== $row->page_latest
) {
635 $topmarktext .= '<span class="mw-uctop">' . $this->messages
['uctop'] . '</span>';
637 if( !$row->page_is_new
&& $page->quickUserCan( 'rollback' )
638 && $page->quickUserCan( 'edit' ) )
640 $this->preventClickjacking();
641 $topmarktext .= ' '.$sk->generateRollback( $rev );
644 # Is there a visible previous revision?
645 if( $rev->userCan( Revision
::DELETED_TEXT
) && $rev->getParentId() !== 0 ) {
646 $difftext = $sk->linkKnown(
648 $this->messages
['diff'],
652 'oldid' => $row->rev_id
656 $difftext = $this->messages
['diff'];
658 $histlink = $sk->linkKnown(
660 $this->messages
['hist'],
662 array( 'action' => 'history' )
665 $comment = $wgContLang->getDirMark() . $sk->revComment( $rev, false, true );
666 $date = $wgLang->timeanddate( wfTimestamp( TS_MW
, $row->rev_timestamp
), true );
667 if( $rev->userCan( Revision
::DELETED_TEXT
) ) {
670 htmlspecialchars($date),
672 array( 'oldid' => intval( $row->rev_id
) )
677 if( $rev->isDeleted( Revision
::DELETED_TEXT
) ) {
678 $d = '<span class="history-deleted">' . $d . '</span>';
681 if( $this->target
== 'newbies' ) {
682 $userlink = ' . . ' . $sk->userLink( $row->rev_user
, $row->rev_user_text
);
683 $userlink .= ' ' . wfMsg( 'parentheses', $sk->userTalkLink( $row->rev_user
, $row->rev_user_text
) ) . ' ';
688 if( $rev->getParentId() === 0 ) {
689 $nflag = ChangesList
::flag( 'newpage' );
694 if( $rev->isMinor() ) {
695 $mflag = ChangesList
::flag( 'minor' );
700 // Don't show useless link to people who cannot hide revisions
701 $canHide = $wgUser->isAllowed( 'deleterevision' );
702 if( $canHide ||
($rev->getVisibility() && $wgUser->isAllowed('deletedhistory')) ) {
703 if( !$rev->userCan( Revision
::DELETED_RESTRICTED
) ) {
704 $del = $this->mSkin
->revDeleteLinkDisabled( $canHide ); // revision was hidden from sysops
707 'type' => 'revision',
708 'target' => $page->getPrefixedDbkey(),
709 'ids' => $rev->getId()
711 $del = $this->mSkin
->revDeleteLink( $query,
712 $rev->isDeleted( Revision
::DELETED_RESTRICTED
), $canHide );
719 $diffHistLinks = '(' . $difftext . $this->messages
['pipe-separator'] . $histlink . ')';
720 $ret = "{$del}{$d} {$diffHistLinks} {$nflag}{$mflag} {$link}{$userlink} {$comment} {$topmarktext}";
722 # Denote if username is redacted for this edit
723 if( $rev->isDeleted( Revision
::DELETED_USER
) ) {
724 $ret .= " <strong>" . wfMsgHtml('rev-deleted-user-contribs') . "</strong>";
728 list($tagSummary, $newClasses) = ChangeTags
::formatSummaryRow( $row->ts_tags
, 'contributions' );
729 $classes = array_merge( $classes, $newClasses );
730 $ret .= " $tagSummary";
732 // Let extensions add data
733 wfRunHooks( 'ContributionsLineEnding', array( &$this, &$ret, $row ) );
735 $classes = implode( ' ', $classes );
736 $ret = "<li class=\"$classes\">$ret</li>\n";
737 wfProfileOut( __METHOD__
);
742 * Get the Database object in use
746 public function getDatabase() {
751 * Overwrite Pager function and return a helpful comment
753 function getSqlComment() {
754 if ( $this->namespace ||
$this->deletedOnly
) {
755 return 'contributions page filtered for namespace or RevisionDeleted edits'; // potentially slow, see CR r58153
757 return 'contributions page unfiltered';
761 protected function preventClickjacking() {
762 $this->preventClickjacking
= true;
765 public function getPreventClickjacking() {
766 return $this->preventClickjacking
;