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>'
148 # Show the appropriate "footer" message - WHOIS tools, etc.
149 if( $target != 'newbies' ) {
150 $message = 'sp-contributions-footer';
151 if ( IP
::isIPAddress( $target ) ) {
152 $message = 'sp-contributions-footer-anon';
154 $user = User
::newFromName( $target );
155 if ( !$user ||
$user->isAnon() ) {
156 // No message for non-existing users
161 $text = wfMsgNoTrans( $message, $target );
162 if( !wfEmptyMsg( $message, $text ) && $text != '-' ) {
164 "<div class='mw-contributions-footer'>\n$1\n</div>",
165 array( $message, $target ) );
171 protected function setSyndicated() {
173 $wgOut->setSyndicated( true );
174 $wgOut->setFeedAppendQuery( wfArrayToCGI( $this->opts
) );
178 * Generates the subheading with links
179 * @param $nt Title object for the target
180 * @param $id Integer: User ID for the target
181 * @return String: appropriately-escaped HTML to be output literally
182 * @todo Fixme: almost the same as getSubTitle in SpecialDeletedContributions.php. Could be combined.
184 protected function contributionsSub( $nt, $id ) {
185 global $wgSysopUserBans, $wgLang, $wgUser, $wgOut;
187 $sk = $wgUser->getSkin();
189 if ( $id === null ) {
190 $user = htmlspecialchars( $nt->getText() );
192 $user = $sk->link( $nt, htmlspecialchars( $nt->getText() ) );
194 $userObj = User
::newFromName( $nt->getText(), /* check for username validity not needed */ false );
195 $talk = $nt->getTalkPage();
198 $tools[] = $sk->link( $talk, wfMsgHtml( 'sp-contributions-talk' ) );
199 if( ( $id !== null && $wgSysopUserBans ) ||
( $id === null && IP
::isIPAddress( $nt->getText() ) ) ) {
200 if( $wgUser->isAllowed( 'block' ) ) { # Block / Change block / Unblock links
201 if ( $userObj->isBlocked() ) {
202 $tools[] = $sk->linkKnown( # Change block link
203 SpecialPage
::getTitleFor( 'Blockip', $nt->getDBkey() ),
204 wfMsgHtml( 'change-blocklink' )
206 $tools[] = $sk->linkKnown( # Unblock link
207 SpecialPage
::getTitleFor( 'Ipblocklist' ),
208 wfMsgHtml( 'unblocklink' ),
211 'action' => 'unblock',
212 'ip' => $nt->getDBkey()
216 else { # User is not blocked
217 $tools[] = $sk->linkKnown( # Block link
218 SpecialPage
::getTitleFor( 'Blockip', $nt->getDBkey() ),
219 wfMsgHtml( 'blocklink' )
224 $tools[] = $sk->linkKnown(
225 SpecialPage
::getTitleFor( 'Log' ),
226 wfMsgHtml( 'sp-contributions-blocklog' ),
230 'page' => $nt->getPrefixedText()
235 $tools[] = $sk->linkKnown(
236 SpecialPage
::getTitleFor( 'Listfiles' ),
237 wfMsgHtml( 'sp-contributions-uploads' ),
239 array( 'user' => $nt->getText() )
243 $tools[] = $sk->linkKnown(
244 SpecialPage
::getTitleFor( 'Log' ),
245 wfMsgHtml( 'sp-contributions-logs' ),
247 array( 'user' => $nt->getText() )
250 # Add link to deleted user contributions for priviledged users
251 if( $wgUser->isAllowed( 'deletedhistory' ) ) {
252 $tools[] = $sk->linkKnown(
253 SpecialPage
::getTitleFor( 'DeletedContributions', $nt->getDBkey() ),
254 wfMsgHtml( 'sp-contributions-deleted' )
258 # Add a link to change user rights for privileged users
259 $userrightsPage = new UserrightsPage();
260 if( $id !== null && $userrightsPage->userCanChangeRights( User
::newFromId( $id ) ) ) {
261 $tools[] = $sk->linkKnown(
262 SpecialPage
::getTitleFor( 'Userrights', $nt->getDBkey() ),
263 wfMsgHtml( 'sp-contributions-userrights' )
267 wfRunHooks( 'ContributionsToolLinks', array( $id, $nt, &$tools ) );
269 $links = $wgLang->pipeList( $tools );
271 // Show a note if the user is blocked and display the last block log entry.
272 if ( $userObj->isBlocked() ) {
273 LogEventsList
::showLogExtract(
276 $nt->getPrefixedText(),
280 'showIfEmpty' => false,
283 'sp-contributions-blocked-notice-anon' :
284 'sp-contributions-blocked-notice',
285 $nt->getText() # Support GENDER in 'sp-contributions-blocked-notice'
287 'offset' => '' # don't use $wgRequest parameter offset
293 // Old message 'contribsub' had one parameter, but that doesn't work for
294 // languages that want to put the "for" bit right after $user but before
295 // $links. If 'contribsub' is around, use it for reverse compatibility,
296 // otherwise use 'contribsub2'.
297 if( wfEmptyMsg( 'contribsub', wfMsg( 'contribsub' ) ) ) {
298 return wfMsgHtml( 'contribsub2', $user, $links );
300 return wfMsgHtml( 'contribsub', "$user ($links)" );
305 * Generates the namespace selector form with hidden attributes.
306 * @return String: HTML fragment
308 protected function getForm() {
311 $this->opts
['title'] = $this->getTitle()->getPrefixedText();
312 if( !isset( $this->opts
['target'] ) ) {
313 $this->opts
['target'] = '';
315 $this->opts
['target'] = str_replace( '_' , ' ' , $this->opts
['target'] );
318 if( !isset( $this->opts
['namespace'] ) ) {
319 $this->opts
['namespace'] = '';
322 if( !isset( $this->opts
['contribs'] ) ) {
323 $this->opts
['contribs'] = 'user';
326 if( !isset( $this->opts
['year'] ) ) {
327 $this->opts
['year'] = '';
330 if( !isset( $this->opts
['month'] ) ) {
331 $this->opts
['month'] = '';
334 if( $this->opts
['contribs'] == 'newbie' ) {
335 $this->opts
['target'] = '';
338 if( !isset( $this->opts
['tagFilter'] ) ) {
339 $this->opts
['tagFilter'] = '';
342 if( !isset( $this->opts
['topOnly'] ) ) {
343 $this->opts
['topOnly'] = false;
346 $f = Xml
::openElement( 'form', array( 'method' => 'get', 'action' => $wgScript, 'class' => 'mw-contributions-form' ) );
348 # Add hidden params for tracking except for parameters in $skipParameters
349 $skipParameters = array( 'namespace', 'deletedOnly', 'target', 'contribs', 'year', 'month', 'topOnly' );
350 foreach ( $this->opts
as $name => $value ) {
351 if( in_array( $name, $skipParameters ) ) {
354 $f .= "\t" . Html
::hidden( $name, $value ) . "\n";
357 $tagFilter = ChangeTags
::buildTagFilterSelector( $this->opts
['tagFilter'] );
359 $f .= Xml
::fieldset( wfMsg( 'sp-contributions-search' ) ) .
360 Xml
::radioLabel( wfMsgExt( 'sp-contributions-newbies', array( 'parsemag' ) ),
361 'contribs', 'newbie' , 'newbie', $this->opts
['contribs'] == 'newbie' ) . '<br />' .
362 Xml
::radioLabel( wfMsgExt( 'sp-contributions-username', array( 'parsemag' ) ),
363 'contribs' , 'user', 'user', $this->opts
['contribs'] == 'user' ) . ' ' .
364 Html
::input( 'target', $this->opts
['target'], 'text', array(
367 ) +
( $this->opts
['target'] ?
array() : array( 'autofocus' ) ) ) . ' '.
368 Html
::rawElement( 'span', array( 'style' => 'white-space: nowrap' ),
369 Xml
::label( wfMsg( 'namespace' ), 'namespace' ) . ' ' .
370 Xml
::namespaceSelector( $this->opts
['namespace'], '' )
372 Xml
::checkLabel( wfMsg( 'history-show-deleted' ),
373 'deletedOnly', 'mw-show-deleted-only', $this->opts
['deletedOnly'] ) . '<br />' .
374 Xml
::tags( 'p', null, Xml
::checkLabel( wfMsg( 'sp-contributions-toponly' ),
375 'topOnly', 'mw-show-top-only', $this->opts
['topOnly'] ) ) .
376 ( $tagFilter ? Xml
::tags( 'p', null, implode( ' ', $tagFilter ) ) : '' ) .
377 Html
::rawElement( 'p', array( 'style' => 'white-space: nowrap' ),
378 Xml
::dateMenu( $this->opts
['year'], $this->opts
['month'] ) . ' ' .
379 Xml
::submitButton( wfMsg( 'sp-contributions-submit' ) )
381 $explain = wfMsgExt( 'sp-contributions-explain', 'parseinline' );
382 if( !wfEmptyMsg( 'sp-contributions-explain', $explain ) ) {
383 $f .= "<p id='mw-sp-contributions-explain'>{$explain}</p>";
385 $f .= Xml
::closeElement('fieldset' ) .
386 Xml
::closeElement( 'form' );
391 * Output a subscription feed listing recent edits to this page.
392 * @param $type String
394 protected function feed( $type ) {
395 global $wgFeed, $wgFeedClasses, $wgFeedLimit, $wgOut;
398 $wgOut->addWikiMsg( 'feed-unavailable' );
402 if( !isset( $wgFeedClasses[$type] ) ) {
403 $wgOut->addWikiMsg( 'feed-invalid' );
407 $feed = new $wgFeedClasses[$type](
409 wfMsgExt( 'tagline', 'parsemag' ),
410 $this->getTitle()->getFullUrl() . "/" . urlencode($this->opts
['target'])
413 // Already valid title
414 $nt = Title
::makeTitleSafe( NS_USER
, $this->opts
['target'] );
415 $target = $this->opts
['target'] == 'newbies' ?
'newbies' : $nt->getText();
417 $pager = new ContribsPager( array(
419 'namespace' => $this->opts
['namespace'],
420 'year' => $this->opts
['year'],
421 'month' => $this->opts
['month'],
422 'tagFilter' => $this->opts
['tagFilter'],
423 'deletedOnly' => $this->opts
['deletedOnly'],
424 'topOnly' => $this->opts
['topOnly'],
427 $pager->mLimit
= min( $this->opts
['limit'], $wgFeedLimit );
430 if( $pager->getNumRows() > 0 ) {
431 foreach ( $pager->mResult
as $row ) {
432 $feed->outItem( $this->feedItem( $row ) );
438 protected function feedTitle() {
439 global $wgLanguageCode, $wgSitename;
440 $page = SpecialPage
::getPage( 'Contributions' );
441 $desc = $page->getDescription();
442 return "$wgSitename - $desc [$wgLanguageCode]";
445 protected function feedItem( $row ) {
446 $title = Title
::MakeTitle( intval( $row->page_namespace
), $row->page_title
);
448 $date = $row->rev_timestamp
;
449 $comments = $title->getTalkPage()->getFullURL();
450 $revision = Revision
::newFromTitle( $title, $row->rev_id
);
453 $title->getPrefixedText(),
454 $this->feedItemDesc( $revision ),
455 $title->getFullURL(),
457 $this->feedItemAuthor( $revision ),
465 protected function feedItemAuthor( $revision ) {
466 return $revision->getUserText();
469 protected function feedItemDesc( $revision ) {
471 return '<p>' . htmlspecialchars( $revision->getUserText() ) . wfMsgForContent( 'colon-separator' ) .
472 htmlspecialchars( FeedItem
::stripComment( $revision->getComment() ) ) .
473 "</p>\n<hr />\n<div>" .
474 nl2br( htmlspecialchars( $revision->getText() ) ) . "</div>";
481 * Pager for Special:Contributions
482 * @ingroup SpecialPage Pager
484 class ContribsPager
extends ReverseChronologicalPager
{
485 public $mDefaultDirection = true;
486 var $messages, $target;
487 var $namespace = '', $mDb;
489 function __construct( $options ) {
490 parent
::__construct();
492 $msgs = array( 'uctop', 'diff', 'newarticle', 'rollbacklink', 'diff', 'hist', 'rev-delundel', 'pipe-separator' );
494 foreach( $msgs as $msg ) {
495 $this->messages
[$msg] = wfMsgExt( $msg, array( 'escapenoentities' ) );
498 $this->target
= isset( $options['target'] ) ?
$options['target'] : '';
499 $this->namespace = isset( $options['namespace'] ) ?
$options['namespace'] : '';
500 $this->tagFilter
= isset( $options['tagFilter'] ) ?
$options['tagFilter'] : false;
502 $this->deletedOnly
= !empty( $options['deletedOnly'] );
503 $this->topOnly
= !empty( $options['topOnly'] );
505 $year = isset( $options['year'] ) ?
$options['year'] : false;
506 $month = isset( $options['month'] ) ?
$options['month'] : false;
507 $this->getDateCond( $year, $month );
509 $this->mDb
= wfGetDB( DB_SLAVE
, 'contributions' );
512 function getDefaultQuery() {
513 $query = parent
::getDefaultQuery();
514 $query['target'] = $this->target
;
518 function getQueryInfo() {
520 list( $tables, $index, $userCond, $join_cond ) = $this->getUserCond();
522 $conds = array_merge( $userCond, $this->getNamespaceCond() );
523 // Paranoia: avoid brute force searches (bug 17342)
524 if( !$wgUser->isAllowed( 'deletedhistory' ) ) {
525 $conds[] = $this->mDb
->bitAnd('rev_deleted',Revision
::DELETED_USER
) . ' = 0';
526 } else if( !$wgUser->isAllowed( 'suppressrevision' ) ) {
527 $conds[] = $this->mDb
->bitAnd('rev_deleted',Revision
::SUPPRESSED_USER
) .
528 ' != ' . Revision
::SUPPRESSED_USER
;
530 $join_cond['page'] = array( 'INNER JOIN', 'page_id=rev_page' );
535 'page_namespace', 'page_title', 'page_is_new', 'page_latest', 'page_is_redirect',
536 'page_len','rev_id', 'rev_page', 'rev_text_id', 'rev_timestamp', 'rev_comment',
537 'rev_minor_edit', 'rev_user', 'rev_user_text', 'rev_parent_id', 'rev_deleted'
540 'options' => array( 'USE INDEX' => array('revision' => $index) ),
541 'join_conds' => $join_cond
544 ChangeTags
::modifyDisplayQuery(
545 $queryInfo['tables'],
546 $queryInfo['fields'],
548 $queryInfo['join_conds'],
549 $queryInfo['options'],
553 wfRunHooks( 'ContribsPager::getQueryInfo', array( &$this, &$queryInfo ) );
557 function getUserCond() {
558 $condition = array();
559 $join_conds = array();
560 if( $this->target
== 'newbies' ) {
561 $tables = array( 'user_groups', 'page', 'revision' );
562 $max = $this->mDb
->selectField( 'user', 'max(user_id)', false, __METHOD__
);
563 $condition[] = 'rev_user >' . (int)($max - $max / 100);
564 $condition[] = 'ug_group IS NULL';
565 $index = 'user_timestamp';
566 # FIXME: other groups may have 'bot' rights
567 $join_conds['user_groups'] = array( 'LEFT JOIN', "ug_user = rev_user AND ug_group = 'bot'" );
569 $tables = array( 'page', 'revision' );
570 $condition['rev_user_text'] = $this->target
;
571 $index = 'usertext_timestamp';
573 if( $this->deletedOnly
) {
574 $condition[] = "rev_deleted != '0'";
576 if( $this->topOnly
) {
577 $condition[] = "rev_id = page_latest";
579 return array( $tables, $index, $condition, $join_conds );
582 function getNamespaceCond() {
583 if( $this->namespace !== '' ) {
584 return array( 'page_namespace' => (int)$this->namespace );
590 function getIndexField() {
591 return 'rev_timestamp';
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 global $wgUser, $wgLang, $wgContLang;
614 wfProfileIn( __METHOD__
);
616 $sk = $this->getSkin();
617 $rev = new Revision( $row );
620 $page = Title
::newFromRow( $row );
621 $page->resetArticleId( $row->rev_page
); // use process cache
624 htmlspecialchars( $page->getPrefixedText() ),
626 $page->isRedirect() ?
array( 'redirect' => 'no' ) : array()
628 # Mark current revisions
630 if( $row->rev_id
== $row->page_latest
) {
631 $topmarktext .= '<span class="mw-uctop">' . $this->messages
['uctop'] . '</span>';
633 if( !$row->page_is_new
&& $page->quickUserCan( 'rollback' )
634 && $page->quickUserCan( 'edit' ) )
636 $topmarktext .= ' '.$sk->generateRollback( $rev );
639 # Is there a visible previous revision?
640 if( $rev->userCan( Revision
::DELETED_TEXT
) && $rev->getParentId() !== 0 ) {
641 $difftext = $sk->linkKnown(
643 $this->messages
['diff'],
647 'oldid' => $row->rev_id
651 $difftext = $this->messages
['diff'];
653 $histlink = $sk->linkKnown(
655 $this->messages
['hist'],
657 array( 'action' => 'history' )
660 $comment = $wgContLang->getDirMark() . $sk->revComment( $rev, false, true );
661 $date = $wgLang->timeanddate( wfTimestamp( TS_MW
, $row->rev_timestamp
), true );
662 if( $rev->userCan( Revision
::DELETED_TEXT
) ) {
665 htmlspecialchars($date),
667 array( 'oldid' => intval( $row->rev_id
) )
672 if( $rev->isDeleted( Revision
::DELETED_TEXT
) ) {
673 $d = '<span class="history-deleted">' . $d . '</span>';
676 if( $this->target
== 'newbies' ) {
677 $userlink = ' . . ' . $sk->userLink( $row->rev_user
, $row->rev_user_text
);
678 $userlink .= ' ' . wfMsg( 'parentheses', $sk->userTalkLink( $row->rev_user
, $row->rev_user_text
) ) . ' ';
683 if( $rev->getParentId() === 0 ) {
684 $nflag = ChangesList
::flag( 'newpage' );
689 if( $rev->isMinor() ) {
690 $mflag = ChangesList
::flag( 'minor' );
695 // Don't show useless link to people who cannot hide revisions
696 $canHide = $wgUser->isAllowed( 'deleterevision' );
697 if( $canHide ||
($rev->getVisibility() && $wgUser->isAllowed('deletedhistory')) ) {
698 if( !$rev->userCan( Revision
::DELETED_RESTRICTED
) ) {
699 $del = $this->mSkin
->revDeleteLinkDisabled( $canHide ); // revision was hidden from sysops
702 'type' => 'revision',
703 'target' => $page->getPrefixedDbkey(),
704 'ids' => $rev->getId()
706 $del = $this->mSkin
->revDeleteLink( $query,
707 $rev->isDeleted( Revision
::DELETED_RESTRICTED
), $canHide );
714 $diffHistLinks = '(' . $difftext . $this->messages
['pipe-separator'] . $histlink . ')';
715 $ret = "{$del}{$d} {$diffHistLinks} {$nflag}{$mflag} {$link}{$userlink} {$comment} {$topmarktext}";
717 # Denote if username is redacted for this edit
718 if( $rev->isDeleted( Revision
::DELETED_USER
) ) {
719 $ret .= " <strong>" . wfMsgHtml('rev-deleted-user-contribs') . "</strong>";
723 list($tagSummary, $newClasses) = ChangeTags
::formatSummaryRow( $row->ts_tags
, 'contributions' );
724 $classes = array_merge( $classes, $newClasses );
725 $ret .= " $tagSummary";
727 // Let extensions add data
728 wfRunHooks( 'ContributionsLineEnding', array( &$this, &$ret, $row ) );
730 $classes = implode( ' ', $classes );
731 $ret = "<li class=\"$classes\">$ret</li>\n";
732 wfProfileOut( __METHOD__
);
737 * Get the Database object in use
741 public function getDatabase() {
746 * Overwrite Pager function and return a helpful comment
748 function getSqlComment() {
749 if ( $this->namespace ||
$this->deletedOnly
) {
750 return 'contributions page filtered for namespace or RevisionDeleted edits'; // potentially slow, see CR r58153
752 return 'contributions page unfiltered';