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 if( !wfMessage( $message, $target )->isDisabled() ) {
166 "<div class='mw-contributions-footer'>\n$1\n</div>",
167 array( $message, $target ) );
173 protected function setSyndicated() {
175 $wgOut->setSyndicated( true );
176 $wgOut->setFeedAppendQuery( wfArrayToCGI( $this->opts
) );
180 * Generates the subheading with links
181 * @param $nt Title object for the target
182 * @param $id Integer: User ID for the target
183 * @return String: appropriately-escaped HTML to be output literally
184 * @todo Fixme: almost the same as getSubTitle in SpecialDeletedContributions.php. Could be combined.
186 protected function contributionsSub( $nt, $id ) {
187 global $wgSysopUserBans, $wgLang, $wgUser, $wgOut;
189 $sk = $wgUser->getSkin();
191 if ( $id === null ) {
192 $user = htmlspecialchars( $nt->getText() );
194 $user = $sk->link( $nt, htmlspecialchars( $nt->getText() ) );
196 $userObj = User
::newFromName( $nt->getText(), /* check for username validity not needed */ false );
197 $talk = $nt->getTalkPage();
200 $tools[] = $sk->link( $talk, wfMsgHtml( 'sp-contributions-talk' ) );
201 if( ( $id !== null && $wgSysopUserBans ) ||
( $id === null && IP
::isIPAddress( $nt->getText() ) ) ) {
202 if( $wgUser->isAllowed( 'block' ) ) { # Block / Change block / Unblock links
203 if ( $userObj->isBlocked() ) {
204 $tools[] = $sk->linkKnown( # Change block link
205 SpecialPage
::getTitleFor( 'Blockip', $nt->getDBkey() ),
206 wfMsgHtml( 'change-blocklink' )
208 $tools[] = $sk->linkKnown( # Unblock link
209 SpecialPage
::getTitleFor( 'Ipblocklist' ),
210 wfMsgHtml( 'unblocklink' ),
213 'action' => 'unblock',
214 'ip' => $nt->getDBkey()
218 else { # User is not blocked
219 $tools[] = $sk->linkKnown( # Block link
220 SpecialPage
::getTitleFor( 'Blockip', $nt->getDBkey() ),
221 wfMsgHtml( 'blocklink' )
226 $tools[] = $sk->linkKnown(
227 SpecialPage
::getTitleFor( 'Log' ),
228 wfMsgHtml( 'sp-contributions-blocklog' ),
232 'page' => $nt->getPrefixedText()
237 $tools[] = $sk->linkKnown(
238 SpecialPage
::getTitleFor( 'Listfiles' ),
239 wfMsgHtml( 'sp-contributions-uploads' ),
241 array( 'user' => $nt->getText() )
245 $tools[] = $sk->linkKnown(
246 SpecialPage
::getTitleFor( 'Log' ),
247 wfMsgHtml( 'sp-contributions-logs' ),
249 array( 'user' => $nt->getText() )
252 # Add link to deleted user contributions for priviledged users
253 if( $wgUser->isAllowed( 'deletedhistory' ) ) {
254 $tools[] = $sk->linkKnown(
255 SpecialPage
::getTitleFor( 'DeletedContributions', $nt->getDBkey() ),
256 wfMsgHtml( 'sp-contributions-deleted' )
260 # Add a link to change user rights for privileged users
261 $userrightsPage = new UserrightsPage();
262 if( $id !== null && $userrightsPage->userCanChangeRights( User
::newFromId( $id ) ) ) {
263 $tools[] = $sk->linkKnown(
264 SpecialPage
::getTitleFor( 'Userrights', $nt->getDBkey() ),
265 wfMsgHtml( 'sp-contributions-userrights' )
269 wfRunHooks( 'ContributionsToolLinks', array( $id, $nt, &$tools ) );
271 $links = $wgLang->pipeList( $tools );
273 // Show a note if the user is blocked and display the last block log entry.
274 if ( $userObj->isBlocked() ) {
275 LogEventsList
::showLogExtract(
278 $nt->getPrefixedText(),
282 'showIfEmpty' => false,
285 'sp-contributions-blocked-notice-anon' :
286 'sp-contributions-blocked-notice',
287 $nt->getText() # Support GENDER in 'sp-contributions-blocked-notice'
289 'offset' => '' # don't use $wgRequest parameter offset
295 // Old message 'contribsub' had one parameter, but that doesn't work for
296 // languages that want to put the "for" bit right after $user but before
297 // $links. If 'contribsub' is around, use it for reverse compatibility,
298 // otherwise use 'contribsub2'.
299 if( wfEmptyMsg( 'contribsub', wfMsg( 'contribsub' ) ) ) {
300 return wfMsgHtml( 'contribsub2', $user, $links );
302 return wfMsgHtml( 'contribsub', "$user ($links)" );
307 * Generates the namespace selector form with hidden attributes.
308 * @return String: HTML fragment
310 protected function getForm() {
313 $this->opts
['title'] = $this->getTitle()->getPrefixedText();
314 if( !isset( $this->opts
['target'] ) ) {
315 $this->opts
['target'] = '';
317 $this->opts
['target'] = str_replace( '_' , ' ' , $this->opts
['target'] );
320 if( !isset( $this->opts
['namespace'] ) ) {
321 $this->opts
['namespace'] = '';
324 if( !isset( $this->opts
['contribs'] ) ) {
325 $this->opts
['contribs'] = 'user';
328 if( !isset( $this->opts
['year'] ) ) {
329 $this->opts
['year'] = '';
332 if( !isset( $this->opts
['month'] ) ) {
333 $this->opts
['month'] = '';
336 if( $this->opts
['contribs'] == 'newbie' ) {
337 $this->opts
['target'] = '';
340 if( !isset( $this->opts
['tagFilter'] ) ) {
341 $this->opts
['tagFilter'] = '';
344 if( !isset( $this->opts
['topOnly'] ) ) {
345 $this->opts
['topOnly'] = false;
348 $f = Xml
::openElement( 'form', array( 'method' => 'get', 'action' => $wgScript, 'class' => 'mw-contributions-form' ) );
350 # Add hidden params for tracking except for parameters in $skipParameters
351 $skipParameters = array( 'namespace', 'deletedOnly', 'target', 'contribs', 'year', 'month', 'topOnly' );
352 foreach ( $this->opts
as $name => $value ) {
353 if( in_array( $name, $skipParameters ) ) {
356 $f .= "\t" . Html
::hidden( $name, $value ) . "\n";
359 $tagFilter = ChangeTags
::buildTagFilterSelector( $this->opts
['tagFilter'] );
361 $f .= Xml
::fieldset( wfMsg( 'sp-contributions-search' ) ) .
362 Xml
::radioLabel( wfMsgExt( 'sp-contributions-newbies', array( 'parsemag' ) ),
363 'contribs', 'newbie' , 'newbie', $this->opts
['contribs'] == 'newbie' ) . '<br />' .
364 Xml
::radioLabel( wfMsgExt( 'sp-contributions-username', array( 'parsemag' ) ),
365 'contribs' , 'user', 'user', $this->opts
['contribs'] == 'user' ) . ' ' .
366 Html
::input( 'target', $this->opts
['target'], 'text', array(
369 ) +
( $this->opts
['target'] ?
array() : array( 'autofocus' ) ) ) . ' '.
370 Html
::rawElement( 'span', array( 'style' => 'white-space: nowrap' ),
371 Xml
::label( wfMsg( 'namespace' ), 'namespace' ) . ' ' .
372 Xml
::namespaceSelector( $this->opts
['namespace'], '' )
374 Xml
::checkLabel( wfMsg( 'history-show-deleted' ),
375 'deletedOnly', 'mw-show-deleted-only', $this->opts
['deletedOnly'] ) . '<br />' .
376 Xml
::tags( 'p', null, Xml
::checkLabel( wfMsg( 'sp-contributions-toponly' ),
377 'topOnly', 'mw-show-top-only', $this->opts
['topOnly'] ) ) .
378 ( $tagFilter ? Xml
::tags( 'p', null, implode( ' ', $tagFilter ) ) : '' ) .
379 Html
::rawElement( 'p', array( 'style' => 'white-space: nowrap' ),
380 Xml
::dateMenu( $this->opts
['year'], $this->opts
['month'] ) . ' ' .
381 Xml
::submitButton( wfMsg( 'sp-contributions-submit' ) )
383 $explain = wfMsgExt( 'sp-contributions-explain', 'parseinline' );
384 if( !wfEmptyMsg( 'sp-contributions-explain', $explain ) ) {
385 $f .= "<p id='mw-sp-contributions-explain'>{$explain}</p>";
387 $f .= Xml
::closeElement('fieldset' ) .
388 Xml
::closeElement( 'form' );
393 * Output a subscription feed listing recent edits to this page.
394 * @param $type String
396 protected function feed( $type ) {
397 global $wgFeed, $wgFeedClasses, $wgFeedLimit, $wgOut;
400 $wgOut->addWikiMsg( 'feed-unavailable' );
404 if( !isset( $wgFeedClasses[$type] ) ) {
405 $wgOut->addWikiMsg( 'feed-invalid' );
409 $feed = new $wgFeedClasses[$type](
411 wfMsgExt( 'tagline', 'parsemag' ),
412 $this->getTitle()->getFullUrl() . "/" . urlencode($this->opts
['target'])
415 // Already valid title
416 $nt = Title
::makeTitleSafe( NS_USER
, $this->opts
['target'] );
417 $target = $this->opts
['target'] == 'newbies' ?
'newbies' : $nt->getText();
419 $pager = new ContribsPager( array(
421 'namespace' => $this->opts
['namespace'],
422 'year' => $this->opts
['year'],
423 'month' => $this->opts
['month'],
424 'tagFilter' => $this->opts
['tagFilter'],
425 'deletedOnly' => $this->opts
['deletedOnly'],
426 'topOnly' => $this->opts
['topOnly'],
429 $pager->mLimit
= min( $this->opts
['limit'], $wgFeedLimit );
432 if( $pager->getNumRows() > 0 ) {
433 foreach ( $pager->mResult
as $row ) {
434 $feed->outItem( $this->feedItem( $row ) );
440 protected function feedTitle() {
441 global $wgLanguageCode, $wgSitename;
442 $page = SpecialPage
::getPage( 'Contributions' );
443 $desc = $page->getDescription();
444 return "$wgSitename - $desc [$wgLanguageCode]";
447 protected function feedItem( $row ) {
448 $title = Title
::MakeTitle( intval( $row->page_namespace
), $row->page_title
);
450 $date = $row->rev_timestamp
;
451 $comments = $title->getTalkPage()->getFullURL();
452 $revision = Revision
::newFromTitle( $title, $row->rev_id
);
455 $title->getPrefixedText(),
456 $this->feedItemDesc( $revision ),
457 $title->getFullURL(),
459 $this->feedItemAuthor( $revision ),
467 protected function feedItemAuthor( $revision ) {
468 return $revision->getUserText();
471 protected function feedItemDesc( $revision ) {
473 return '<p>' . htmlspecialchars( $revision->getUserText() ) . wfMsgForContent( 'colon-separator' ) .
474 htmlspecialchars( FeedItem
::stripComment( $revision->getComment() ) ) .
475 "</p>\n<hr />\n<div>" .
476 nl2br( htmlspecialchars( $revision->getText() ) ) . "</div>";
483 * Pager for Special:Contributions
484 * @ingroup SpecialPage Pager
486 class ContribsPager
extends ReverseChronologicalPager
{
487 public $mDefaultDirection = true;
488 var $messages, $target;
489 var $namespace = '', $mDb;
490 var $preventClickjacking = false;
492 function __construct( $options ) {
493 parent
::__construct();
495 $msgs = array( 'uctop', 'diff', 'newarticle', 'rollbacklink', 'diff', 'hist', 'rev-delundel', 'pipe-separator' );
497 foreach( $msgs as $msg ) {
498 $this->messages
[$msg] = wfMsgExt( $msg, array( 'escapenoentities' ) );
501 $this->target
= isset( $options['target'] ) ?
$options['target'] : '';
502 $this->namespace = isset( $options['namespace'] ) ?
$options['namespace'] : '';
503 $this->tagFilter
= isset( $options['tagFilter'] ) ?
$options['tagFilter'] : false;
505 $this->deletedOnly
= !empty( $options['deletedOnly'] );
506 $this->topOnly
= !empty( $options['topOnly'] );
508 $year = isset( $options['year'] ) ?
$options['year'] : false;
509 $month = isset( $options['month'] ) ?
$options['month'] : false;
510 $this->getDateCond( $year, $month );
512 $this->mDb
= wfGetDB( DB_SLAVE
, 'contributions' );
515 function getDefaultQuery() {
516 $query = parent
::getDefaultQuery();
517 $query['target'] = $this->target
;
521 function getQueryInfo() {
523 list( $tables, $index, $userCond, $join_cond ) = $this->getUserCond();
525 $conds = array_merge( $userCond, $this->getNamespaceCond() );
526 // Paranoia: avoid brute force searches (bug 17342)
527 if( !$wgUser->isAllowed( 'deletedhistory' ) ) {
528 $conds[] = $this->mDb
->bitAnd('rev_deleted',Revision
::DELETED_USER
) . ' = 0';
529 } else if( !$wgUser->isAllowed( 'suppressrevision' ) ) {
530 $conds[] = $this->mDb
->bitAnd('rev_deleted',Revision
::SUPPRESSED_USER
) .
531 ' != ' . Revision
::SUPPRESSED_USER
;
533 $join_cond['page'] = array( 'INNER JOIN', 'page_id=rev_page' );
538 'page_namespace', 'page_title', 'page_is_new', 'page_latest', 'page_is_redirect',
539 'page_len','rev_id', 'rev_page', 'rev_text_id', 'rev_timestamp', 'rev_comment',
540 'rev_minor_edit', 'rev_user', 'rev_user_text', 'rev_parent_id', 'rev_deleted'
543 'options' => array( 'USE INDEX' => array('revision' => $index) ),
544 'join_conds' => $join_cond
547 ChangeTags
::modifyDisplayQuery(
548 $queryInfo['tables'],
549 $queryInfo['fields'],
551 $queryInfo['join_conds'],
552 $queryInfo['options'],
556 wfRunHooks( 'ContribsPager::getQueryInfo', array( &$this, &$queryInfo ) );
560 function getUserCond() {
561 $condition = array();
562 $join_conds = array();
563 if( $this->target
== 'newbies' ) {
564 $tables = array( 'user_groups', 'page', 'revision' );
565 $max = $this->mDb
->selectField( 'user', 'max(user_id)', false, __METHOD__
);
566 $condition[] = 'rev_user >' . (int)($max - $max / 100);
567 $condition[] = 'ug_group IS NULL';
568 $index = 'user_timestamp';
569 # FIXME: other groups may have 'bot' rights
570 $join_conds['user_groups'] = array( 'LEFT JOIN', "ug_user = rev_user AND ug_group = 'bot'" );
572 $tables = array( 'page', 'revision' );
573 $condition['rev_user_text'] = $this->target
;
574 $index = 'usertext_timestamp';
576 if( $this->deletedOnly
) {
577 $condition[] = "rev_deleted != '0'";
579 if( $this->topOnly
) {
580 $condition[] = "rev_id = page_latest";
582 return array( $tables, $index, $condition, $join_conds );
585 function getNamespaceCond() {
586 if( $this->namespace !== '' ) {
587 return array( 'page_namespace' => (int)$this->namespace );
593 function getIndexField() {
594 return 'rev_timestamp';
597 function getStartBody() {
601 function getEndBody() {
606 * Generates each row in the contributions list.
608 * Contributions which are marked "top" are currently on top of the history.
609 * For these contributions, a [rollback] link is shown for users with roll-
610 * back privileges. The rollback link restores the most recent version that
611 * was not written by the target user.
613 * @todo This would probably look a lot nicer in a table.
615 function formatRow( $row ) {
616 global $wgUser, $wgLang, $wgContLang;
617 wfProfileIn( __METHOD__
);
619 $sk = $this->getSkin();
620 $rev = new Revision( $row );
623 $page = Title
::newFromRow( $row );
624 $page->resetArticleId( $row->rev_page
); // use process cache
627 htmlspecialchars( $page->getPrefixedText() ),
629 $page->isRedirect() ?
array( 'redirect' => 'no' ) : array()
631 # Mark current revisions
633 if( $row->rev_id
== $row->page_latest
) {
634 $topmarktext .= '<span class="mw-uctop">' . $this->messages
['uctop'] . '</span>';
636 if( !$row->page_is_new
&& $page->quickUserCan( 'rollback' )
637 && $page->quickUserCan( 'edit' ) )
639 $this->preventClickjacking();
640 $topmarktext .= ' '.$sk->generateRollback( $rev );
643 # Is there a visible previous revision?
644 if( $rev->userCan( Revision
::DELETED_TEXT
) && $rev->getParentId() !== 0 ) {
645 $difftext = $sk->linkKnown(
647 $this->messages
['diff'],
651 'oldid' => $row->rev_id
655 $difftext = $this->messages
['diff'];
657 $histlink = $sk->linkKnown(
659 $this->messages
['hist'],
661 array( 'action' => 'history' )
664 $comment = $wgContLang->getDirMark() . $sk->revComment( $rev, false, true );
665 $date = $wgLang->timeanddate( wfTimestamp( TS_MW
, $row->rev_timestamp
), true );
666 if( $rev->userCan( Revision
::DELETED_TEXT
) ) {
669 htmlspecialchars($date),
671 array( 'oldid' => intval( $row->rev_id
) )
674 $d = htmlspecialchars( $date );
676 if( $rev->isDeleted( Revision
::DELETED_TEXT
) ) {
677 $d = '<span class="history-deleted">' . $d . '</span>';
680 if( $this->target
== 'newbies' ) {
681 $userlink = ' . . ' . $sk->userLink( $row->rev_user
, $row->rev_user_text
);
682 $userlink .= ' ' . wfMsg( 'parentheses', $sk->userTalkLink( $row->rev_user
, $row->rev_user_text
) ) . ' ';
687 if( $rev->getParentId() === 0 ) {
688 $nflag = ChangesList
::flag( 'newpage' );
693 if( $rev->isMinor() ) {
694 $mflag = ChangesList
::flag( 'minor' );
699 // Don't show useless link to people who cannot hide revisions
700 $canHide = $wgUser->isAllowed( 'deleterevision' );
701 if( $canHide ||
($rev->getVisibility() && $wgUser->isAllowed('deletedhistory')) ) {
702 if( !$rev->userCan( Revision
::DELETED_RESTRICTED
) ) {
703 $del = $this->mSkin
->revDeleteLinkDisabled( $canHide ); // revision was hidden from sysops
706 'type' => 'revision',
707 'target' => $page->getPrefixedDbkey(),
708 'ids' => $rev->getId()
710 $del = $this->mSkin
->revDeleteLink( $query,
711 $rev->isDeleted( Revision
::DELETED_RESTRICTED
), $canHide );
718 $diffHistLinks = '(' . $difftext . $this->messages
['pipe-separator'] . $histlink . ')';
719 $ret = "{$del}{$d} {$diffHistLinks} {$nflag}{$mflag} {$link}{$userlink} {$comment} {$topmarktext}";
721 # Denote if username is redacted for this edit
722 if( $rev->isDeleted( Revision
::DELETED_USER
) ) {
723 $ret .= " <strong>" . wfMsgHtml('rev-deleted-user-contribs') . "</strong>";
727 list($tagSummary, $newClasses) = ChangeTags
::formatSummaryRow( $row->ts_tags
, 'contributions' );
728 $classes = array_merge( $classes, $newClasses );
729 $ret .= " $tagSummary";
731 // Let extensions add data
732 wfRunHooks( 'ContributionsLineEnding', array( &$this, &$ret, $row ) );
734 $classes = implode( ' ', $classes );
735 $ret = "<li class=\"$classes\">$ret</li>\n";
736 wfProfileOut( __METHOD__
);
741 * Get the Database object in use
745 public function getDatabase() {
750 * Overwrite Pager function and return a helpful comment
752 function getSqlComment() {
753 if ( $this->namespace ||
$this->deletedOnly
) {
754 return 'contributions page filtered for namespace or RevisionDeleted edits'; // potentially slow, see CR r58153
756 return 'contributions page unfiltered';
760 protected function preventClickjacking() {
761 $this->preventClickjacking
= true;
764 public function getPreventClickjacking() {
765 return $this->preventClickjacking
;