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 $wgUser->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' );
121 'action' => 'feedcontributions',
122 'feedformat' => $feedType,
125 if ( $this->opts
['topOnly'] ) {
126 $apiParams['toponly'] = true;
128 if ( $this->opts
['showSizeDiff'] ) {
129 $apiParams['showsizediff'] = true;
131 if ( $this->opts
['deletedonly'] ) {
132 $apiParams['deletedonly'] = true;
134 if ( $this->opts
['tagFilter'] !== '' ) {
135 $apiParams['tagfilter'] = $this->opts
['tagFilter'];
137 if ( $this->opts
['namespace'] !== '' ) {
138 $apiParams['namespace'] = $this->opts
['namespace'];
140 if ( $this->opts
['year'] !== null ) {
141 $apiParams['year'] = $this->opts
['year'];
143 if ( $this->opts
['month'] !== null ) {
144 $apiParams['month'] = $this->opts
['month'];
147 $url = wfScript( 'api' ) . '?' . wfArrayToCGI( $apiParams );
149 $wgOut->redirect( $url, '301' );
153 // Add RSS/atom links
154 $this->addFeedLinks( array( 'action' => 'feedcontributions', 'user' => $wgUser->getName() ) );
156 if ( wfRunHooks( 'SpecialContributionsBeforeMainOutput', array( $id ) ) ) {
158 $wgOut->addHTML( $this->getForm() );
160 $pager = new ContribsPager( array(
162 'namespace' => $this->opts
['namespace'],
163 'year' => $this->opts
['year'],
164 'month' => $this->opts
['month'],
165 'deletedOnly' => $this->opts
['deletedOnly'],
166 'topOnly' => $this->opts
['topOnly'],
167 'showSizeDiff' => $this->opts
['showSizeDiff'],
169 if( !$pager->getNumRows() ) {
170 $wgOut->addWikiMsg( 'nocontribs', $target );
172 # Show a message about slave lag, if applicable
173 if( ( $lag = $pager->getDatabase()->getLag() ) > 0 )
174 $wgOut->showLagWarning( $lag );
177 '<p>' . $pager->getNavigationBar() . '</p>' .
179 '<p>' . $pager->getNavigationBar() . '</p>'
182 $wgOut->preventClickjacking( $pager->getPreventClickjacking() );
184 # Show the appropriate "footer" message - WHOIS tools, etc.
185 if( $target != 'newbies' ) {
186 $message = 'sp-contributions-footer';
187 if ( IP
::isIPAddress( $target ) ) {
188 $message = 'sp-contributions-footer-anon';
190 $user = User
::newFromName( $target );
191 if ( !$user ||
$user->isAnon() ) {
192 // No message for non-existing users
197 if( !wfMessage( $message, $target )->isDisabled() ) {
199 "<div class='mw-contributions-footer'>\n$1\n</div>",
200 array( $message, $target ) );
207 * Generates the subheading with links
208 * @param $nt Title object for the target
209 * @param $id Integer: User ID for the target
210 * @return String: appropriately-escaped HTML to be output literally
211 * @todo FIXME: Almost the same as getSubTitle in SpecialDeletedContributions.php. Could be combined.
213 protected function contributionsSub( $nt, $id ) {
214 global $wgLang, $wgUser, $wgOut;
216 $sk = $wgUser->getSkin();
218 if ( $id === null ) {
219 $user = htmlspecialchars( $nt->getText() );
221 $user = $sk->link( $nt, htmlspecialchars( $nt->getText() ) );
223 $userObj = User
::newFromName( $nt->getText(), /* check for username validity not needed */ false );
224 $talk = $nt->getTalkPage();
226 $tools = self
::getUserLinks( $nt, $talk, $userObj, $wgUser );
227 $links = $wgLang->pipeList( $tools );
229 // Show a note if the user is blocked and display the last block log entry.
230 if ( $userObj->isBlocked() ) {
231 LogEventsList
::showLogExtract(
234 $nt->getPrefixedText(),
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 $wgRequest 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 is still checked in some cases, like userrights page!!)
269 public static function getUserLinks( Title
$userpage, Title
$talkpage, User
$target, User
$subject ) {
271 $sk = $subject->getSkin();
272 $id = $target->getId();
273 $username = $target->getName();
275 $tools[] = $sk->link( $talkpage, wfMsgHtml( 'sp-contributions-talk' ) );
277 if( ( $id !== null ) ||
( $id === null && IP
::isIPAddress( $username ) ) ) {
278 if( $subject->isAllowed( 'block' ) ) { # Block / Change block / Unblock links
279 if ( $target->isBlocked() ) {
280 $tools[] = $sk->linkKnown( # Change block link
281 SpecialPage
::getTitleFor( 'Block', $username ),
282 wfMsgHtml( 'change-blocklink' )
284 $tools[] = $sk->linkKnown( # Unblock link
285 SpecialPage
::getTitleFor( 'Unblock', $username ),
286 wfMsgHtml( 'unblocklink' )
288 } else { # User is not blocked
289 $tools[] = $sk->linkKnown( # Block link
290 SpecialPage
::getTitleFor( 'Block', $username ),
291 wfMsgHtml( 'blocklink' )
296 $tools[] = $sk->linkKnown(
297 SpecialPage
::getTitleFor( 'Log', 'block' ),
298 wfMsgHtml( 'sp-contributions-blocklog' ),
301 'page' => $userpage->getPrefixedText()
306 $tools[] = $sk->linkKnown(
307 SpecialPage
::getTitleFor( 'Listfiles', $username ),
308 wfMsgHtml( 'sp-contributions-uploads' )
312 $tools[] = $sk->linkKnown(
313 SpecialPage
::getTitleFor( 'Log', $username ),
314 wfMsgHtml( 'sp-contributions-logs' )
317 # Add link to deleted user contributions for priviledged users
318 if( $subject->isAllowed( 'deletedhistory' ) ) {
319 $tools[] = $sk->linkKnown(
320 SpecialPage
::getTitleFor( 'DeletedContributions', $username ),
321 wfMsgHtml( 'sp-contributions-deleted' )
325 # Add a link to change user rights for privileged users
326 $userrightsPage = new UserrightsPage();
327 if( $id !== null && $userrightsPage->userCanChangeRights( $target ) ) {
328 $tools[] = $sk->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() {
343 global $wgScript, $wgMiserMode;
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 if( !isset( $this->opts
['showSizeDiff'] ) ) {
381 $this->opts
['showSizeDiff'] = !$wgMiserMode;
384 $f = Xml
::openElement( 'form', array( 'method' => 'get', 'action' => $wgScript, 'class' => 'mw-contributions-form' ) );
386 # Add hidden params for tracking except for parameters in $skipParameters
387 $skipParameters = array( 'namespace', 'deletedOnly', 'target', 'contribs', 'year', 'month', 'topOnly', 'showSizeDiff' );
388 foreach ( $this->opts
as $name => $value ) {
389 if( in_array( $name, $skipParameters ) ) {
392 $f .= "\t" . Html
::hidden( $name, $value ) . "\n";
395 $tagFilter = ChangeTags
::buildTagFilterSelector( $this->opts
['tagFilter'] );
399 if ( !$wgMiserMode ) {
400 $fNS = Html
::rawElement( 'span', array( 'style' => 'white-space: nowrap' ),
401 Xml
::label( wfMsg( 'namespace' ), 'namespace' ) . ' ' .
402 Xml
::namespaceSelector( $this->opts
['namespace'], '' )
404 $fShowDiff = Xml
::checkLabel( wfMsg( 'sp-contributions-showsizediff' ), 'showSizeDiff', 'mw-show-size-diff', $this->opts
['showSizeDiff'] );
407 $f .= Xml
::fieldset( wfMsg( 'sp-contributions-search' ) ) .
408 Xml
::radioLabel( wfMsgExt( 'sp-contributions-newbies', array( 'parsemag' ) ),
409 'contribs', 'newbie' , 'newbie', $this->opts
['contribs'] == 'newbie' ) . '<br />' .
410 Xml
::radioLabel( wfMsgExt( 'sp-contributions-username', array( 'parsemag' ) ),
411 'contribs' , 'user', 'user', $this->opts
['contribs'] == 'user' ) . ' ' .
412 Html
::input( 'target', $this->opts
['target'], 'text', array(
415 ) +
( $this->opts
['target'] ?
array() : array( 'autofocus' ) ) ) . ' '.
417 Xml
::checkLabel( wfMsg( 'history-show-deleted' ),
418 'deletedOnly', 'mw-show-deleted-only', $this->opts
['deletedOnly'] ) . '<br />' .
419 Xml
::tags( 'p', null, Xml
::checkLabel( wfMsg( 'sp-contributions-toponly' ),
420 'topOnly', 'mw-show-top-only', $this->opts
['topOnly'] ) ) .
422 ( $tagFilter ? Xml
::tags( 'p', null, implode( ' ', $tagFilter ) ) : '' ) .
423 Html
::rawElement( 'p', array( 'style' => 'white-space: nowrap' ),
424 Xml
::dateMenu( $this->opts
['year'], $this->opts
['month'] ) . ' ' .
425 Xml
::submitButton( wfMsg( 'sp-contributions-submit' ) )
427 $explain = wfMessage( 'sp-contributions-explain' );
428 if ( $explain->exists() ) {
429 $f .= "<p id='mw-sp-contributions-explain'>{$explain}</p>";
431 $f .= Xml
::closeElement('fieldset' ) .
432 Xml
::closeElement( 'form' );
438 * Pager for Special:Contributions
439 * @ingroup SpecialPage Pager
441 class ContribsPager
extends ReverseChronologicalPager
{
442 public $mDefaultDirection = true;
443 var $messages, $target;
444 var $namespace = '', $mDb;
445 var $preventClickjacking = false;
447 function __construct( $options ) {
448 parent
::__construct();
450 $msgs = array( 'uctop', 'diff', 'newarticle', 'rollbacklink', 'diff', 'hist', 'rev-delundel', 'pipe-separator' );
452 foreach( $msgs as $msg ) {
453 $this->messages
[$msg] = wfMsgExt( $msg, array( 'escapenoentities' ) );
456 $this->target
= isset( $options['target'] ) ?
$options['target'] : '';
457 $this->namespace = isset( $options['namespace'] ) ?
$options['namespace'] : '';
458 $this->tagFilter
= isset( $options['tagFilter'] ) ?
$options['tagFilter'] : false;
460 $this->deletedOnly
= !empty( $options['deletedOnly'] );
461 $this->topOnly
= !empty( $options['topOnly'] );
462 $this->showSizeDiff
= !empty( $options['showSizeDiff'] );
464 $year = isset( $options['year'] ) ?
$options['year'] : false;
465 $month = isset( $options['month'] ) ?
$options['month'] : false;
466 $this->getDateCond( $year, $month );
468 $this->mDb
= wfGetDB( DB_SLAVE
, 'contributions' );
471 function getDefaultQuery() {
472 $query = parent
::getDefaultQuery();
473 $query['target'] = $this->target
;
477 function getQueryInfo() {
478 global $wgUser, $wgMiserMode;
479 list( $tables, $index, $userCond, $join_cond ) = $this->getUserCond();
481 $conds = array_merge( $userCond, $this->getNamespaceCond() );
482 // Paranoia: avoid brute force searches (bug 17342)
483 if( !$wgUser->isAllowed( 'deletedhistory' ) ) {
484 $conds[] = $this->mDb
->bitAnd('rev_deleted',Revision
::DELETED_USER
) . ' = 0';
485 } elseif( !$wgUser->isAllowed( 'suppressrevision' ) ) {
486 $conds[] = $this->mDb
->bitAnd('rev_deleted',Revision
::SUPPRESSED_USER
) .
487 ' != ' . Revision
::SUPPRESSED_USER
;
489 $join_cond['page'] = array( 'INNER JOIN', 'page_id=rev_page' );
492 'page_namespace', 'page_title', 'page_is_new', 'page_latest', 'page_is_redirect',
493 'page_len','rev_id', 'rev_page', 'rev_text_id', 'rev_timestamp', 'rev_comment',
494 'rev_minor_edit', 'rev_user', 'rev_user_text', 'rev_parent_id', 'rev_deleted',
497 if ( $this->showSizeDiff
&& !$wgMiserMode ) {
498 $fields = array_merge( $fields, array( 'rc_old_len', 'rc_new_len' ) );
499 array_unshift( $tables, 'recentchanges' );
500 $join_cond['recentchanges'] = array( 'INNER JOIN', "rev_id = rc_this_oldid" );
507 'options' => array( 'USE INDEX' => array('revision' => $index) ),
508 'join_conds' => $join_cond
510 ChangeTags
::modifyDisplayQuery(
511 $queryInfo['tables'],
512 $queryInfo['fields'],
514 $queryInfo['join_conds'],
515 $queryInfo['options'],
519 wfRunHooks( 'ContribsPager::getQueryInfo', array( &$this, &$queryInfo ) );
523 function getUserCond() {
524 $condition = array();
525 $join_conds = array();
527 if( $this->target
== 'newbies' ) {
528 $tables = array( 'user_groups', 'page', 'revision' );
529 $max = $this->mDb
->selectField( 'user', 'max(user_id)', false, __METHOD__
);
530 $condition[] = 'rev_user >' . (int)($max - $max / 100);
531 $condition[] = 'ug_group IS NULL';
532 $index = 'user_timestamp';
533 # @todo FIXME: Other groups may have 'bot' rights
534 $join_conds['user_groups'] = array( 'LEFT JOIN', "ug_user = rev_user AND ug_group = 'bot'" );
536 $tables = array( 'page', 'revision' );
537 $condition['rev_user_text'] = $this->target
;
538 $index = 'usertext_timestamp';
540 if( $this->deletedOnly
) {
541 $condition[] = "rev_deleted != '0'";
543 if( $this->topOnly
) {
544 $condition[] = "rev_id = page_latest";
546 return array( $tables, $index, $condition, $join_conds );
549 function getNamespaceCond() {
551 if( $this->namespace !== '' && !$wgMiserMode ) {
552 return array( 'page_namespace' => (int)$this->namespace );
558 function getIndexField() {
559 return 'rev_timestamp';
562 function getStartBody() {
566 function getEndBody() {
571 * Generates each row in the contributions list.
573 * Contributions which are marked "top" are currently on top of the history.
574 * For these contributions, a [rollback] link is shown for users with roll-
575 * back privileges. The rollback link restores the most recent version that
576 * was not written by the target user.
578 * @todo This would probably look a lot nicer in a table.
580 function formatRow( $row ) {
581 global $wgUser, $wgLang;
582 wfProfileIn( __METHOD__
);
584 $sk = $this->getSkin();
585 $rev = new Revision( $row );
588 $page = Title
::newFromRow( $row );
591 htmlspecialchars( $page->getPrefixedText() ),
593 $page->isRedirect() ?
array( 'redirect' => 'no' ) : array()
595 # Mark current revisions
597 if( $row->rev_id
== $row->page_latest
) {
598 $topmarktext .= '<span class="mw-uctop">' . $this->messages
['uctop'] . '</span>';
600 if( !$row->page_is_new
&& $page->quickUserCan( 'rollback' )
601 && $page->quickUserCan( 'edit' ) )
603 $this->preventClickjacking();
604 $topmarktext .= ' '.$sk->generateRollback( $rev );
607 # Is there a visible previous revision?
608 if( $rev->userCan( Revision
::DELETED_TEXT
) && $rev->getParentId() !== 0 ) {
609 $difftext = $sk->linkKnown(
611 $this->messages
['diff'],
615 'oldid' => $row->rev_id
619 $difftext = $this->messages
['diff'];
621 $histlink = $sk->linkKnown(
623 $this->messages
['hist'],
625 array( 'action' => 'history' )
628 $comment = wfUILang()->getDirMark() . $sk->revComment( $rev, false, true );
629 $date = $wgLang->timeanddate( wfTimestamp( TS_MW
, $row->rev_timestamp
), true );
630 if( $rev->userCan( Revision
::DELETED_TEXT
) ) {
633 htmlspecialchars($date),
635 array( 'oldid' => intval( $row->rev_id
) )
638 $d = htmlspecialchars( $date );
640 if( $rev->isDeleted( Revision
::DELETED_TEXT
) ) {
641 $d = '<span class="history-deleted">' . $d . '</span>';
644 if( $this->target
== 'newbies' ) {
645 $userlink = ' . . ' . $sk->userLink( $row->rev_user
, $row->rev_user_text
);
646 $userlink .= ' ' . wfMsg( 'parentheses', $sk->userTalkLink( $row->rev_user
, $row->rev_user_text
) ) . ' ';
651 if( $rev->getParentId() === 0 ) {
652 $nflag = ChangesList
::flag( 'newpage' );
657 if( $rev->isMinor() ) {
658 $mflag = ChangesList
::flag( 'minor' );
663 // Don't show useless link to people who cannot hide revisions
664 $canHide = $wgUser->isAllowed( 'deleterevision' );
665 if( $canHide ||
($rev->getVisibility() && $wgUser->isAllowed('deletedhistory')) ) {
666 if( !$rev->userCan( Revision
::DELETED_RESTRICTED
) ) {
667 $del = $this->mSkin
->revDeleteLinkDisabled( $canHide ); // revision was hidden from sysops
670 'type' => 'revision',
671 'target' => $page->getPrefixedDbkey(),
672 'ids' => $rev->getId()
674 $del = $this->mSkin
->revDeleteLink( $query,
675 $rev->isDeleted( Revision
::DELETED_RESTRICTED
), $canHide );
682 $diffHistLinks = '(' . $difftext . $this->messages
['pipe-separator'] . $histlink . ')';
685 $diffOut = ( $this->showSizeDiff
) ?
' . . '.ChangesList
::showCharacterDifference( $row->rc_old_len
, $row->rc_new_len
) : ' . . '.Linker
::formatRevisionSize( $row->rev_len
);
687 $ret = "{$del}{$d} {$diffHistLinks} {$nflag}{$mflag} {$link}{$diffOut}{$userlink} {$comment} {$topmarktext}";
689 # Denote if username is redacted for this edit
690 if( $rev->isDeleted( Revision
::DELETED_USER
) ) {
691 $ret .= " <strong>" . wfMsgHtml('rev-deleted-user-contribs') . "</strong>";
695 list($tagSummary, $newClasses) = ChangeTags
::formatSummaryRow( $row->ts_tags
, 'contributions' );
696 $classes = array_merge( $classes, $newClasses );
697 $ret .= " $tagSummary";
699 // Let extensions add data
700 wfRunHooks( 'ContributionsLineEnding', array( &$this, &$ret, $row ) );
702 $classes = implode( ' ', $classes );
703 $ret = "<li class=\"$classes\">$ret</li>\n";
704 wfProfileOut( __METHOD__
);
709 * Get the Database object in use
711 * @return DatabaseBase
713 public function getDatabase() {
718 * Overwrite Pager function and return a helpful comment
720 function getSqlComment() {
721 if ( $this->namespace ||
$this->deletedOnly
) {
722 return 'contributions page filtered for namespace or RevisionDeleted edits'; // potentially slow, see CR r58153
724 return 'contributions page unfiltered';
728 protected function preventClickjacking() {
729 $this->preventClickjacking
= true;
732 public function getPreventClickjacking() {
733 return $this->preventClickjacking
;