4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License along
15 * with this program; if not, write to the Free Software Foundation, Inc.,
16 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
17 * http://www.gnu.org/copyleft/gpl.html
21 * Special:Contributions, show user contributions in a paged list
23 * @ingroup SpecialPage
26 class SpecialContributions
extends SpecialPage
{
28 public function __construct() {
29 parent
::__construct( 'Contributions' );
32 public function execute( $par ) {
33 global $wgUser, $wgOut, $wgLang, $wgRequest;
36 $this->outputHeader();
38 $this->opts
= array();
40 if( $par == 'newbies' ) {
42 $this->opts
['contribs'] = 'newbie';
43 } elseif( isset( $par ) ) {
46 $target = $wgRequest->getVal( 'target' );
50 if( $wgRequest->getVal( 'contribs' ) == 'newbie' ) {
52 $this->opts
['contribs'] = 'newbie';
55 $this->opts
['deletedOnly'] = $wgRequest->getCheck( 'deletedOnly' );
57 if( !strlen( $target ) ) {
58 $wgOut->addHTML( $this->getForm() );
62 $this->opts
['limit'] = $wgRequest->getInt( 'limit', $wgUser->getOption('rclimit') );
63 $this->opts
['target'] = $target;
64 $this->opts
['topOnly'] = $wgRequest->getCheck( 'topOnly' );
66 $nt = Title
::makeTitleSafe( NS_USER
, $target );
68 $wgOut->addHTML( $this->getForm() );
71 $id = User
::idFromName( $nt->getText() );
73 if( $target != 'newbies' ) {
74 $target = $nt->getText();
75 $wgOut->setSubtitle( $this->contributionsSub( $nt, $id ) );
76 $wgOut->setHTMLTitle( wfMsg( 'pagetitle', wfMsgExt( 'contributions-title', array( 'parsemag' ),$target ) ) );
78 $wgOut->setSubtitle( wfMsgHtml( 'sp-contributions-newbies-sub') );
79 $wgOut->setHTMLTitle( wfMsg( 'pagetitle', wfMsg( 'sp-contributions-newbies-title' ) ) );
82 if( ( $ns = $wgRequest->getVal( 'namespace', null ) ) !== null && $ns !== '' ) {
83 $this->opts
['namespace'] = intval( $ns );
85 $this->opts
['namespace'] = '';
88 $this->opts
['tagFilter'] = (string) $wgRequest->getVal( 'tagFilter' );
90 // Allows reverts to have the bot flag in recent changes. It is just here to
91 // be passed in the form at the top of the page
92 if( $wgUser->isAllowed( 'markbotedits' ) && $wgRequest->getBool( 'bot' ) ) {
93 $this->opts
['bot'] = '1';
96 $skip = $wgRequest->getText( 'offset' ) ||
$wgRequest->getText( 'dir' ) == 'prev';
97 # Offset overrides year/month selection
99 $this->opts
['year'] = '';
100 $this->opts
['month'] = '';
102 $this->opts
['year'] = $wgRequest->getIntOrNull( 'year' );
103 $this->opts
['month'] = $wgRequest->getIntOrNull( 'month' );
106 // Add RSS/atom links
107 $this->setSyndicated();
108 $feedType = $wgRequest->getVal( 'feed' );
110 return $this->feed( $feedType );
113 if ( wfRunHooks( 'SpecialContributionsBeforeMainOutput', array( $id ) ) ) {
115 $wgOut->addHTML( $this->getForm() );
117 $pager = new ContribsPager( array(
119 'namespace' => $this->opts
['namespace'],
120 'year' => $this->opts
['year'],
121 'month' => $this->opts
['month'],
122 'deletedOnly' => $this->opts
['deletedOnly'],
123 'topOnly' => $this->opts
['topOnly'],
125 if( !$pager->getNumRows() ) {
126 $wgOut->addWikiMsg( 'nocontribs', $target );
128 # Show a message about slave lag, if applicable
129 if( ( $lag = $pager->getDatabase()->getLag() ) > 0 )
130 $wgOut->showLagWarning( $lag );
133 '<p>' . $pager->getNavigationBar() . '</p>' .
135 '<p>' . $pager->getNavigationBar() . '</p>'
140 # Show the appropriate "footer" message - WHOIS tools, etc.
141 if( $target != 'newbies' ) {
142 $message = 'sp-contributions-footer';
143 if ( IP
::isIPAddress( $target ) ) {
144 $message = 'sp-contributions-footer-anon';
146 $user = User
::newFromName( $target );
147 if ( !$user ||
$user->isAnon() ) {
148 // No message for non-existing users
153 $text = wfMsgNoTrans( $message, $target );
154 if( !wfEmptyMsg( $message, $text ) && $text != '-' ) {
156 "<div class='mw-contributions-footer'>\n$1\n</div>",
157 array( $message, $target ) );
163 protected function setSyndicated() {
165 $wgOut->setSyndicated( true );
166 $wgOut->setFeedAppendQuery( wfArrayToCGI( $this->opts
) );
170 * Generates the subheading with links
171 * @param $nt Title object for the target
172 * @param $id Integer: User ID for the target
173 * @return String: appropriately-escaped HTML to be output literally
174 * @todo Fixme: almost the same as getSubTitle in SpecialDeletedContributions.php. Could be combined.
176 protected function contributionsSub( $nt, $id ) {
177 global $wgSysopUserBans, $wgLang, $wgUser, $wgOut;
179 $sk = $wgUser->getSkin();
181 if ( $id === null ) {
182 $user = htmlspecialchars( $nt->getText() );
184 $user = $sk->link( $nt, htmlspecialchars( $nt->getText() ) );
186 $userObj = User
::newFromName( $nt->getText(), /* check for username validity not needed */ false );
187 $talk = $nt->getTalkPage();
190 $tools[] = $sk->link( $talk, wfMsgHtml( 'sp-contributions-talk' ) );
191 if( ( $id !== null && $wgSysopUserBans ) ||
( $id === null && IP
::isIPAddress( $nt->getText() ) ) ) {
192 if( $wgUser->isAllowed( 'block' ) ) { # Block / Change block / Unblock links
193 if ( $userObj->isBlocked() ) {
194 $tools[] = $sk->linkKnown( # Change block link
195 SpecialPage
::getTitleFor( 'Blockip', $nt->getDBkey() ),
196 wfMsgHtml( 'change-blocklink' )
198 $tools[] = $sk->linkKnown( # Unblock link
199 SpecialPage
::getTitleFor( 'Ipblocklist' ),
200 wfMsgHtml( 'unblocklink' ),
203 'action' => 'unblock',
204 'ip' => $nt->getDBkey()
208 else { # User is not blocked
209 $tools[] = $sk->linkKnown( # Block link
210 SpecialPage
::getTitleFor( 'Blockip', $nt->getDBkey() ),
211 wfMsgHtml( 'blocklink' )
216 $tools[] = $sk->linkKnown(
217 SpecialPage
::getTitleFor( 'Log' ),
218 wfMsgHtml( 'sp-contributions-blocklog' ),
222 'page' => $nt->getPrefixedText()
227 $tools[] = $sk->linkKnown(
228 SpecialPage
::getTitleFor( 'Log' ),
229 wfMsgHtml( 'sp-contributions-logs' ),
231 array( 'user' => $nt->getText() )
234 # Add link to deleted user contributions for priviledged users
235 if( $wgUser->isAllowed( 'deletedhistory' ) ) {
236 $tools[] = $sk->linkKnown(
237 SpecialPage
::getTitleFor( 'DeletedContributions', $nt->getDBkey() ),
238 wfMsgHtml( 'sp-contributions-deleted' )
242 # Add a link to change user rights for privileged users
243 $userrightsPage = new UserrightsPage();
244 if( $id !== null && $userrightsPage->userCanChangeRights( User
::newFromId( $id ) ) ) {
245 $tools[] = $sk->linkKnown(
246 SpecialPage
::getTitleFor( 'Userrights', $nt->getDBkey() ),
247 wfMsgHtml( 'sp-contributions-userrights' )
251 wfRunHooks( 'ContributionsToolLinks', array( $id, $nt, &$tools ) );
253 $links = $wgLang->pipeList( $tools );
255 // Show a note if the user is blocked and display the last block log entry.
256 if ( $userObj->isBlocked() ) {
257 LogEventsList
::showLogExtract(
260 $nt->getPrefixedText(),
264 'showIfEmpty' => false,
267 'sp-contributions-blocked-notice-anon' :
268 'sp-contributions-blocked-notice',
269 $nt->getText() # Support GENDER in 'sp-contributions-blocked-notice'
271 'offset' => '' # don't use $wgRequest parameter offset
277 // Old message 'contribsub' had one parameter, but that doesn't work for
278 // languages that want to put the "for" bit right after $user but before
279 // $links. If 'contribsub' is around, use it for reverse compatibility,
280 // otherwise use 'contribsub2'.
281 if( wfEmptyMsg( 'contribsub', wfMsg( 'contribsub' ) ) ) {
282 return wfMsgHtml( 'contribsub2', $user, $links );
284 return wfMsgHtml( 'contribsub', "$user ($links)" );
289 * Generates the namespace selector form with hidden attributes.
290 * @return String: HTML fragment
292 protected function getForm() {
295 $this->opts
['title'] = $this->getTitle()->getPrefixedText();
296 if( !isset( $this->opts
['target'] ) ) {
297 $this->opts
['target'] = '';
299 $this->opts
['target'] = str_replace( '_' , ' ' , $this->opts
['target'] );
302 if( !isset( $this->opts
['namespace'] ) ) {
303 $this->opts
['namespace'] = '';
306 if( !isset( $this->opts
['contribs'] ) ) {
307 $this->opts
['contribs'] = 'user';
310 if( !isset( $this->opts
['year'] ) ) {
311 $this->opts
['year'] = '';
314 if( !isset( $this->opts
['month'] ) ) {
315 $this->opts
['month'] = '';
318 if( $this->opts
['contribs'] == 'newbie' ) {
319 $this->opts
['target'] = '';
322 if( !isset( $this->opts
['tagFilter'] ) ) {
323 $this->opts
['tagFilter'] = '';
326 if( !isset( $this->opts
['topOnly'] ) ) {
327 $this->opts
['topOnly'] = false;
330 $f = Xml
::openElement( 'form', array( 'method' => 'get', 'action' => $wgScript ) );
332 # Add hidden params for tracking except for parameters in $skipParameters
333 $skipParameters = array( 'namespace', 'deletedOnly', 'target', 'contribs', 'year', 'month', 'topOnly' );
334 foreach ( $this->opts
as $name => $value ) {
335 if( in_array( $name, $skipParameters ) ) {
338 $f .= "\t" . Xml
::hidden( $name, $value ) . "\n";
341 $tagFilter = ChangeTags
::buildTagFilterSelector( $this->opts
['tagFilter'] );
344 Xml
::element( 'legend', array(), wfMsg( 'sp-contributions-search' ) ) .
345 Xml
::radioLabel( wfMsgExt( 'sp-contributions-newbies', array( 'parsemag' ) ),
346 'contribs', 'newbie' , 'newbie', $this->opts
['contribs'] == 'newbie' ?
true : false ) . '<br />' .
347 Xml
::radioLabel( wfMsgExt( 'sp-contributions-username', array( 'parsemag' ) ),
348 'contribs' , 'user', 'user', $this->opts
['contribs'] == 'user' ?
true : false ) . ' ' .
349 Html
::input( 'target', $this->opts
['target'], 'text', array(
352 ) +
( $this->opts
['target'] ?
array() : array( 'autofocus' ) ) ) . ' '.
353 '<span style="white-space: nowrap">' .
354 Xml
::label( wfMsg( 'namespace' ), 'namespace' ) . ' ' .
355 Xml
::namespaceSelector( $this->opts
['namespace'], '' ) .
357 Xml
::checkLabel( wfMsg( 'history-show-deleted' ),
358 'deletedOnly', 'mw-show-deleted-only', $this->opts
['deletedOnly'] ) . '<br />' .
359 Xml
::tags( 'p', null, Xml
::checkLabel( wfMsg( 'sp-contributions-toponly' ),
360 'topOnly', 'mw-show-top-only', $this->opts
['topOnly'] ) ) .
361 ( $tagFilter ? Xml
::tags( 'p', null, implode( ' ', $tagFilter ) ) : '' ) .
362 Xml
::openElement( 'p' ) .
363 '<span style="white-space: nowrap">' .
364 Xml
::dateMenu( $this->opts
['year'], $this->opts
['month'] ) .
366 Xml
::submitButton( wfMsg( 'sp-contributions-submit' ) ) .
367 Xml
::closeElement( 'p' );
369 $explain = wfMsgExt( 'sp-contributions-explain', 'parseinline' );
370 if( !wfEmptyMsg( 'sp-contributions-explain', $explain ) )
371 $f .= "<p id='mw-sp-contributions-explain'>{$explain}</p>";
373 $f .= '</fieldset>' .
374 Xml
::closeElement( 'form' );
379 * Output a subscription feed listing recent edits to this page.
380 * @param $type String
382 protected function feed( $type ) {
383 global $wgRequest, $wgFeed, $wgFeedClasses, $wgFeedLimit;
387 $wgOut->addWikiMsg( 'feed-unavailable' );
391 if( !isset( $wgFeedClasses[$type] ) ) {
393 $wgOut->addWikiMsg( 'feed-invalid' );
397 $feed = new $wgFeedClasses[$type](
399 wfMsgExt( 'tagline', 'parsemag' ),
400 $this->getTitle()->getFullUrl() . "/" . urlencode($this->opts
['target'])
403 // Already valid title
404 $nt = Title
::makeTitleSafe( NS_USER
, $this->opts
['target'] );
405 $target = $this->opts
['target'] == 'newbies' ?
'newbies' : $nt->getText();
407 $pager = new ContribsPager( array(
409 'namespace' => $this->opts
['namespace'],
410 'year' => $this->opts
['year'],
411 'month' => $this->opts
['month'],
412 'tagFilter' => $this->opts
['tagFilter'],
413 'deletedOnly' => $this->opts
['deletedOnly'],
414 'topOnly' => $this->opts
['topOnly'],
417 $pager->mLimit
= min( $this->opts
['limit'], $wgFeedLimit );
420 if( $pager->getNumRows() > 0 ) {
421 while( $row = $pager->mResult
->fetchObject() ) {
422 $feed->outItem( $this->feedItem( $row ) );
428 protected function feedTitle() {
429 global $wgContLanguageCode, $wgSitename;
430 $page = SpecialPage
::getPage( 'Contributions' );
431 $desc = $page->getDescription();
432 return "$wgSitename - $desc [$wgContLanguageCode]";
435 protected function feedItem( $row ) {
436 $title = Title
::MakeTitle( intval( $row->page_namespace
), $row->page_title
);
438 $date = $row->rev_timestamp
;
439 $comments = $title->getTalkPage()->getFullURL();
440 $revision = Revision
::newFromTitle( $title, $row->rev_id
);
443 $title->getPrefixedText(),
444 $this->feedItemDesc( $revision ),
445 $title->getFullURL(),
447 $this->feedItemAuthor( $revision ),
455 protected function feedItemAuthor( $revision ) {
456 return $revision->getUserText();
459 protected function feedItemDesc( $revision ) {
461 return '<p>' . htmlspecialchars( $revision->getUserText() ) . wfMsgForContent( 'colon-separator' ) .
462 htmlspecialchars( FeedItem
::stripComment( $revision->getComment() ) ) .
463 "</p>\n<hr />\n<div>" .
464 nl2br( htmlspecialchars( $revision->getText() ) ) . "</div>";
471 * Pager for Special:Contributions
472 * @ingroup SpecialPage Pager
474 class ContribsPager
extends ReverseChronologicalPager
{
475 public $mDefaultDirection = true;
476 var $messages, $target;
477 var $namespace = '', $mDb;
479 function __construct( $options ) {
480 parent
::__construct();
482 $msgs = array( 'uctop', 'diff', 'newarticle', 'rollbacklink', 'diff', 'hist', 'rev-delundel', 'pipe-separator' );
484 foreach( $msgs as $msg ) {
485 $this->messages
[$msg] = wfMsgExt( $msg, array( 'escapenoentities' ) );
488 $this->target
= isset( $options['target'] ) ?
$options['target'] : '';
489 $this->namespace = isset( $options['namespace'] ) ?
$options['namespace'] : '';
490 $this->tagFilter
= isset( $options['tagFilter'] ) ?
$options['tagFilter'] : false;
492 $this->deletedOnly
= !empty( $options['deletedOnly'] );
493 $this->topOnly
= !empty( $options['topOnly'] );
495 $year = isset( $options['year'] ) ?
$options['year'] : false;
496 $month = isset( $options['month'] ) ?
$options['month'] : false;
497 $this->getDateCond( $year, $month );
499 $this->mDb
= wfGetDB( DB_SLAVE
, 'contributions' );
502 function getDefaultQuery() {
503 $query = parent
::getDefaultQuery();
504 $query['target'] = $this->target
;
508 function getQueryInfo() {
510 list( $tables, $index, $userCond, $join_cond ) = $this->getUserCond();
512 $conds = array_merge( $userCond, $this->getNamespaceCond() );
513 // Paranoia: avoid brute force searches (bug 17342)
514 if( !$wgUser->isAllowed( 'deletedhistory' ) ) {
515 $conds[] = $this->mDb
->bitAnd('rev_deleted',Revision
::DELETED_USER
) . ' = 0';
516 } else if( !$wgUser->isAllowed( 'suppressrevision' ) ) {
517 $conds[] = $this->mDb
->bitAnd('rev_deleted',Revision
::SUPPRESSED_USER
) .
518 ' != ' . Revision
::SUPPRESSED_USER
;
520 $join_cond['page'] = array( 'INNER JOIN', 'page_id=rev_page' );
525 'page_namespace', 'page_title', 'page_is_new', 'page_latest', 'page_is_redirect',
526 'page_len','rev_id', 'rev_page', 'rev_text_id', 'rev_timestamp', 'rev_comment',
527 'rev_minor_edit', 'rev_user', 'rev_user_text', 'rev_parent_id', 'rev_deleted'
530 'options' => array( 'USE INDEX' => array('revision' => $index) ),
531 'join_conds' => $join_cond
534 ChangeTags
::modifyDisplayQuery(
535 $queryInfo['tables'],
536 $queryInfo['fields'],
538 $queryInfo['join_conds'],
539 $queryInfo['options'],
543 wfRunHooks( 'ContribsPager::getQueryInfo', array( &$this, &$queryInfo ) );
547 function getUserCond() {
548 $condition = array();
549 $join_conds = array();
550 if( $this->target
== 'newbies' ) {
551 $tables = array( 'user_groups', 'page', 'revision' );
552 $max = $this->mDb
->selectField( 'user', 'max(user_id)', false, __METHOD__
);
553 $condition[] = 'rev_user >' . (int)($max - $max / 100);
554 $condition[] = 'ug_group IS NULL';
555 $index = 'user_timestamp';
556 # FIXME: other groups may have 'bot' rights
557 $join_conds['user_groups'] = array( 'LEFT JOIN', "ug_user = rev_user AND ug_group = 'bot'" );
559 $tables = array( 'page', 'revision' );
560 $condition['rev_user_text'] = $this->target
;
561 $index = 'usertext_timestamp';
563 if( $this->deletedOnly
) {
564 $condition[] = "rev_deleted != '0'";
566 if( $this->topOnly
) {
567 $condition[] = "rev_id = page_latest";
569 return array( $tables, $index, $condition, $join_conds );
572 function getNamespaceCond() {
573 if( $this->namespace !== '' ) {
574 return array( 'page_namespace' => (int)$this->namespace );
580 function getIndexField() {
581 return 'rev_timestamp';
584 function getStartBody() {
588 function getEndBody() {
593 * Generates each row in the contributions list.
595 * Contributions which are marked "top" are currently on top of the history.
596 * For these contributions, a [rollback] link is shown for users with roll-
597 * back privileges. The rollback link restores the most recent version that
598 * was not written by the target user.
600 * @todo This would probably look a lot nicer in a table.
602 function formatRow( $row ) {
603 global $wgUser, $wgLang, $wgContLang;
604 wfProfileIn( __METHOD__
);
606 $sk = $this->getSkin();
607 $rev = new Revision( $row );
610 $page = Title
::newFromRow( $row );
611 $page->resetArticleId( $row->rev_page
); // use process cache
614 htmlspecialchars( $page->getPrefixedText() ),
616 $page->isRedirect() ?
array( 'redirect' => 'no' ) : array()
618 # Mark current revisions
619 $difftext = $topmarktext = '';
620 if( $row->rev_id
== $row->page_latest
) {
621 $topmarktext .= '<span class="mw-uctop">' . $this->messages
['uctop'] . '</span>';
623 if( !$row->page_is_new
&& $page->quickUserCan( 'rollback' )
624 && $page->quickUserCan( 'edit' ) )
626 $topmarktext .= ' '.$sk->generateRollback( $rev );
629 # Is there a visible previous revision?
630 if( $rev->userCan( Revision
::DELETED_TEXT
) && $rev->getParentId() !== 0 ) {
631 $difftext = $sk->linkKnown(
633 $this->messages
['diff'],
637 'oldid' => $row->rev_id
641 $difftext = $this->messages
['diff'];
643 $histlink = $sk->linkKnown(
645 $this->messages
['hist'],
647 array( 'action' => 'history' )
650 $comment = $wgContLang->getDirMark() . $sk->revComment( $rev, false, true );
651 $date = $wgLang->timeanddate( wfTimestamp( TS_MW
, $row->rev_timestamp
), true );
652 if( $rev->userCan( Revision
::DELETED_TEXT
) ) {
655 htmlspecialchars($date),
657 array( 'oldid' => intval( $row->rev_id
) )
662 if( $rev->isDeleted( Revision
::DELETED_TEXT
) ) {
663 $d = '<span class="history-deleted">' . $d . '</span>';
666 if( $this->target
== 'newbies' ) {
667 $userlink = ' . . ' . $sk->userLink( $row->rev_user
, $row->rev_user_text
);
668 $userlink .= ' ' . wfMsg( 'parentheses', $sk->userTalkLink( $row->rev_user
, $row->rev_user_text
) ) . ' ';
673 if( $rev->getParentId() === 0 ) {
674 $nflag = ChangesList
::flag( 'newpage' );
679 if( $rev->isMinor() ) {
680 $mflag = ChangesList
::flag( 'minor' );
685 // Don't show useless link to people who cannot hide revisions
686 $canHide = $wgUser->isAllowed( 'deleterevision' );
687 if( $canHide ||
($rev->getVisibility() && $wgUser->isAllowed('deletedhistory')) ) {
688 if( !$rev->userCan( Revision
::DELETED_RESTRICTED
) ) {
689 $del = $this->mSkin
->revDeleteLinkDisabled( $canHide ); // revision was hidden from sysops
692 'type' => 'revision',
693 'target' => $page->getPrefixedDbkey(),
694 'ids' => $rev->getId()
696 $del = $this->mSkin
->revDeleteLink( $query,
697 $rev->isDeleted( Revision
::DELETED_RESTRICTED
), $canHide );
704 $diffHistLinks = '(' . $difftext . $this->messages
['pipe-separator'] . $histlink . ')';
705 $ret = "{$del}{$d} {$diffHistLinks} {$nflag}{$mflag} {$link}{$userlink} {$comment} {$topmarktext}";
707 # Denote if username is redacted for this edit
708 if( $rev->isDeleted( Revision
::DELETED_USER
) ) {
709 $ret .= " <strong>" . wfMsgHtml('rev-deleted-user-contribs') . "</strong>";
713 list($tagSummary, $newClasses) = ChangeTags
::formatSummaryRow( $row->ts_tags
, 'contributions' );
714 $classes = array_merge( $classes, $newClasses );
715 $ret .= " $tagSummary";
717 // Let extensions add data
718 wfRunHooks( 'ContributionsLineEnding', array( &$this, &$ret, $row ) );
720 $classes = implode( ' ', $classes );
721 $ret = "<li class=\"$classes\">$ret</li>\n";
722 wfProfileOut( __METHOD__
);
727 * Get the Database object in use
731 public function getDatabase() {
736 * Overwrite Pager function and return a helpful comment
738 function getSqlComment() {
739 if ( $this->namespace ||
$this->deletedOnly
) {
740 return 'contributions page filtered for namespace or RevisionDeleted edits'; // potentially slow, see CR r58153
742 return 'contributions page unfiltered';