00001 <?php
00008 class SpecialContributions extends SpecialPage {
00009
00010 public function __construct() {
00011 parent::__construct( 'Contributions' );
00012 }
00013
00014 public function execute( $par ) {
00015 global $wgUser, $wgOut, $wgLang, $wgRequest;
00016
00017 $this->setHeaders();
00018 $this->outputHeader();
00019
00020 $this->opts = array();
00021
00022 if( $par == 'newbies' ) {
00023 $target = 'newbies';
00024 $this->opts['contribs'] = 'newbie';
00025 } elseif( isset( $par ) ) {
00026 $target = $par;
00027 } else {
00028 $target = $wgRequest->getVal( 'target' );
00029 }
00030
00031
00032 if( $wgRequest->getVal( 'contribs' ) == 'newbie' ) {
00033 $target = 'newbies';
00034 $this->opts['contribs'] = 'newbie';
00035 }
00036
00037 if( !strlen( $target ) ) {
00038 $wgOut->addHTML( $this->getForm() );
00039 return;
00040 }
00041
00042 $this->opts['limit'] = $wgRequest->getInt( 'limit', $wgUser->getOption('rclimit') );
00043 $this->opts['target'] = $target;
00044
00045 $nt = Title::makeTitleSafe( NS_USER, $target );
00046 if( !$nt ) {
00047 $wgOut->addHTML( $this->getForm() );
00048 return;
00049 }
00050 $id = User::idFromName( $nt->getText() );
00051
00052 if( $target != 'newbies' ) {
00053 $target = $nt->getText();
00054 $wgOut->setSubtitle( $this->contributionsSub( $nt, $id ) );
00055 $wgOut->setHTMLTitle( wfMsg( 'pagetitle', wfMsgExt( 'contributions-title', array( 'parsemag' ),$target ) ) );
00056 } else {
00057 $wgOut->setSubtitle( wfMsgHtml( 'sp-contributions-newbies-sub') );
00058 $wgOut->setHTMLTitle( wfMsg( 'pagetitle', wfMsg( 'sp-contributions-newbies-title' ) ) );
00059 }
00060
00061 if( ( $ns = $wgRequest->getVal( 'namespace', null ) ) !== null && $ns !== '' ) {
00062 $this->opts['namespace'] = intval( $ns );
00063 } else {
00064 $this->opts['namespace'] = '';
00065 }
00066
00067 $this->opts['tagfilter'] = (string) $wgRequest->getVal( 'tagfilter' );
00068
00069
00070
00071 if( $wgUser->isAllowed( 'markbotedits' ) && $wgRequest->getBool( 'bot' ) ) {
00072 $this->opts['bot'] = '1';
00073 }
00074
00075 $skip = $wgRequest->getText( 'offset' ) || $wgRequest->getText( 'dir' ) == 'prev';
00076 # Offset overrides year/month selection
00077 if( $skip ) {
00078 $this->opts['year'] = '';
00079 $this->opts['month'] = '';
00080 } else {
00081 $this->opts['year'] = $wgRequest->getIntOrNull( 'year' );
00082 $this->opts['month'] = $wgRequest->getIntOrNull( 'month' );
00083 }
00084
00085
00086 $this->setSyndicated();
00087 $feedType = $wgRequest->getVal( 'feed' );
00088 if( $feedType ) {
00089 return $this->feed( $feedType );
00090 }
00091
00092 if ( wfRunHooks( 'SpecialContributionsBeforeMainOutput', array( $id ) ) ) {
00093
00094 $wgOut->addHTML( $this->getForm() );
00095
00096 $pager = new ContribsPager( $target, $this->opts['namespace'], $this->opts['year'], $this->opts['month'] );
00097 if( !$pager->getNumRows() ) {
00098 $wgOut->addWikiMsg( 'nocontribs', $target );
00099 } else {
00100 # Show a message about slave lag, if applicable
00101 if( ( $lag = $pager->getDatabase()->getLag() ) > 0 )
00102 $wgOut->showLagWarning( $lag );
00103
00104 $wgOut->addHTML(
00105 '<p>' . $pager->getNavigationBar() . '</p>' .
00106 $pager->getBody() .
00107 '<p>' . $pager->getNavigationBar() . '</p>'
00108 );
00109 }
00110 $wgOut->preventClickjacking( $pager->getPreventClickjacking() );
00111
00112
00113 # Show the appropriate "footer" message - WHOIS tools, etc.
00114 if( $target != 'newbies' ) {
00115 $message = 'sp-contributions-footer';
00116 if ( IP::isIPAddress( $target ) ) {
00117 $message = 'sp-contributions-footer-anon';
00118 } else {
00119 $user = User::newFromName( $target );
00120 if ( !$user || $user->isAnon() ) {
00121
00122 return;
00123 }
00124 }
00125
00126 $text = wfMsgNoTrans( $message, $target );
00127 if( !wfEmptyMsg( $message, $text ) && $text != '-' ) {
00128 $wgOut->wrapWikiMsg(
00129 "<div class='mw-contributions-footer'>\n$1\n</div>",
00130 array( $message, $target ) );
00131 }
00132 }
00133 }
00134 }
00135
00136 protected function setSyndicated() {
00137 global $wgOut;
00138 $wgOut->setSyndicated( true );
00139 $wgOut->setFeedAppendQuery( wfArrayToCGI( $this->opts ) );
00140 }
00141
00149 protected function contributionsSub( $nt, $id ) {
00150 global $wgSysopUserBans, $wgLang, $wgUser, $wgOut;
00151
00152 $sk = $wgUser->getSkin();
00153
00154 if ( $id === null ) {
00155 $user = htmlspecialchars( $nt->getText() );
00156 } else {
00157 $user = $sk->link( $nt, htmlspecialchars( $nt->getText() ) );
00158 }
00159 $userObj = User::newFromName( $nt->getText(), false );
00160 $talk = $nt->getTalkPage();
00161 if( $talk ) {
00162 # Talk page link
00163 $tools[] = $sk->link( $talk, wfMsgHtml( 'sp-contributions-talk' ) );
00164 if( ( $id !== null && $wgSysopUserBans ) || ( $id === null && IP::isIPAddress( $nt->getText() ) ) ) {
00165 if( $wgUser->isAllowed( 'block' ) ) { # Block / Change block / Unblock links
00166 if ( $userObj->isBlocked() ) {
00167 $tools[] = $sk->linkKnown( # Change block link
00168 SpecialPage::getTitleFor( 'Blockip', $nt->getDBkey() ),
00169 wfMsgHtml( 'change-blocklink' )
00170 );
00171 $tools[] = $sk->linkKnown( # Unblock link
00172 SpecialPage::getTitleFor( 'BlockList' ),
00173 wfMsgHtml( 'unblocklink' ),
00174 array(),
00175 array(
00176 'action' => 'unblock',
00177 'ip' => $nt->getDBkey()
00178 )
00179 );
00180 }
00181 else { # User is not blocked
00182 $tools[] = $sk->linkKnown( # Block link
00183 SpecialPage::getTitleFor( 'Blockip', $nt->getDBkey() ),
00184 wfMsgHtml( 'blocklink' )
00185 );
00186 }
00187 }
00188 # Block log link
00189 $tools[] = $sk->linkKnown(
00190 SpecialPage::getTitleFor( 'Log' ),
00191 wfMsgHtml( 'sp-contributions-blocklog' ),
00192 array(),
00193 array(
00194 'type' => 'block',
00195 'page' => $nt->getPrefixedText()
00196 )
00197 );
00198 }
00199 # Other logs link
00200 $tools[] = $sk->linkKnown(
00201 SpecialPage::getTitleFor( 'Log' ),
00202 wfMsgHtml( 'sp-contributions-logs' ),
00203 array(),
00204 array( 'user' => $nt->getText() )
00205 );
00206
00207 # Add link to deleted user contributions for priviledged users
00208 if( $wgUser->isAllowed( 'deletedhistory' ) ) {
00209 $tools[] = $sk->linkKnown(
00210 SpecialPage::getTitleFor( 'DeletedContributions', $nt->getDBkey() ),
00211 wfMsgHtml( 'sp-contributions-deleted' )
00212 );
00213 }
00214
00215 # Add a link to change user rights for privileged users
00216 $userrightsPage = new UserrightsPage();
00217 if( $id !== null && $userrightsPage->userCanChangeRights( User::newFromId( $id ) ) ) {
00218 $tools[] = $sk->linkKnown(
00219 SpecialPage::getTitleFor( 'Userrights', $nt->getDBkey() ),
00220 wfMsgHtml( 'sp-contributions-userrights' )
00221 );
00222 }
00223
00224 wfRunHooks( 'ContributionsToolLinks', array( $id, $nt, &$tools ) );
00225
00226 $links = $wgLang->pipeList( $tools );
00227
00228
00229 if ( $userObj->isBlocked() ) {
00230 LogEventsList::showLogExtract(
00231 $wgOut,
00232 'block',
00233 $nt->getPrefixedText(),
00234 '',
00235 array(
00236 'lim' => 1,
00237 'showIfEmpty' => false,
00238 'msgKey' => array(
00239 'sp-contributions-blocked-notice',
00240 $nt->getText() # Support GENDER in 'sp-contributions-blocked-notice'
00241 ),
00242 'offset' => '' # don't use $wgRequest parameter offset
00243 )
00244 );
00245 }
00246 }
00247
00248 // Old message 'contribsub' had one parameter, but that doesn't work for
00249
00250
00251
00252 if( wfEmptyMsg( 'contribsub', wfMsg( 'contribsub' ) ) ) {
00253 return wfMsgHtml( 'contribsub2', $user, $links );
00254 } else {
00255 return wfMsgHtml( 'contribsub', "$user ($links)" );
00256 }
00257 }
00258
00263 protected function getForm() {
00264 global $wgScript;
00265
00266 $this->opts['title'] = $this->getTitle()->getPrefixedText();
00267 if( !isset( $this->opts['target'] ) ) {
00268 $this->opts['target'] = '';
00269 } else {
00270 $this->opts['target'] = str_replace( '_' , ' ' , $this->opts['target'] );
00271 }
00272
00273 if( !isset( $this->opts['namespace'] ) ) {
00274 $this->opts['namespace'] = '';
00275 }
00276
00277 if( !isset( $this->opts['contribs'] ) ) {
00278 $this->opts['contribs'] = 'user';
00279 }
00280
00281 if( !isset( $this->opts['year'] ) ) {
00282 $this->opts['year'] = '';
00283 }
00284
00285 if( !isset( $this->opts['month'] ) ) {
00286 $this->opts['month'] = '';
00287 }
00288
00289 if( $this->opts['contribs'] == 'newbie' ) {
00290 $this->opts['target'] = '';
00291 }
00292
00293 if( !isset( $this->opts['tagfilter'] ) ) {
00294 $this->opts['tagfilter'] = '';
00295 }
00296
00297 $f = Xml::openElement( 'form', array( 'method' => 'get', 'action' => $wgScript ) );
00298 # Add hidden params for tracking
00299 foreach ( $this->opts as $name => $value ) {
00300 if( in_array( $name, array( 'namespace', 'target', 'contribs', 'year', 'month' ) ) ) {
00301 continue;
00302 }
00303 $f .= "\t" . Xml::hidden( $name, $value ) . "\n";
00304 }
00305
00306 $tagFilter = ChangeTags::buildTagFilterSelector( $this->opts['tagfilter'] );
00307
00308 $f .= '<fieldset>' .
00309 Xml::element( 'legend', array(), wfMsg( 'sp-contributions-search' ) ) .
00310 Xml::radioLabel( wfMsgExt( 'sp-contributions-newbies', array( 'parsemag' ) ),
00311 'contribs', 'newbie' , 'newbie', $this->opts['contribs'] == 'newbie' ? true : false ) . '<br />' .
00312 Xml::radioLabel( wfMsgExt( 'sp-contributions-username', array( 'parsemag' ) ),
00313 'contribs' , 'user', 'user', $this->opts['contribs'] == 'user' ? true : false ) . ' ' .
00314 Html::input( 'target', $this->opts['target'], 'text', array(
00315 'size' => '20',
00316 'required' => ''
00317 ) + ( $this->opts['target'] ? array() : array( 'autofocus' ) ) ) . ' '.
00318 '<span style="white-space: nowrap">' .
00319 Xml::label( wfMsg( 'namespace' ), 'namespace' ) . ' ' .
00320 Xml::namespaceSelector( $this->opts['namespace'], '' ) .
00321 '</span>' .
00322 ( $tagFilter ? Xml::tags( 'p', null, implode( ' ', $tagFilter ) ) : '' ) .
00323 Xml::openElement( 'p' ) .
00324 '<span style="white-space: nowrap">' .
00325 Xml::dateMenu( $this->opts['year'], $this->opts['month'] ) .
00326 '</span>' . ' ' .
00327 Xml::submitButton( wfMsg( 'sp-contributions-submit' ) ) .
00328 Xml::closeElement( 'p' );
00329
00330 $explain = wfMsgExt( 'sp-contributions-explain', 'parseinline' );
00331 if( !wfEmptyMsg( 'sp-contributions-explain', $explain ) )
00332 $f .= "<p id='mw-sp-contributions-explain'>{$explain}</p>";
00333
00334 $f .= '</fieldset>' .
00335 Xml::closeElement( 'form' );
00336 return $f;
00337 }
00338
00343 protected function feed( $type ) {
00344 global $wgRequest, $wgFeed, $wgFeedClasses, $wgFeedLimit;
00345
00346 if( !$wgFeed ) {
00347 global $wgOut;
00348 $wgOut->addWikiMsg( 'feed-unavailable' );
00349 return;
00350 }
00351
00352 if( !isset( $wgFeedClasses[$type] ) ) {
00353 global $wgOut;
00354 $wgOut->addWikiMsg( 'feed-invalid' );
00355 return;
00356 }
00357
00358 $feed = new $wgFeedClasses[$type](
00359 $this->feedTitle(),
00360 wfMsgExt( 'tagline', 'parsemag' ),
00361 $this->getTitle()->getFullUrl() . "/" . urlencode($this->opts['target'])
00362 );
00363
00364
00365 $nt = Title::makeTitleSafe( NS_USER, $this->opts['target'] );
00366 $target = $this->opts['target'] == 'newbies' ? 'newbies' : $nt->getText();
00367
00368 $pager = new ContribsPager( $target, $this->opts['namespace'],
00369 $this->opts['year'], $this->opts['month'], $this->opts['tagfilter'] );
00370
00371 $pager->mLimit = min( $this->opts['limit'], $wgFeedLimit );
00372
00373 $feed->outHeader();
00374 if( $pager->getNumRows() > 0 ) {
00375 while( $row = $pager->mResult->fetchObject() ) {
00376 $feed->outItem( $this->feedItem( $row ) );
00377 }
00378 }
00379 $feed->outFooter();
00380 }
00381
00382 protected function feedTitle() {
00383 global $wgContLanguageCode, $wgSitename;
00384 $page = SpecialPage::getPage( 'Contributions' );
00385 $desc = $page->getDescription();
00386 return "$wgSitename - $desc [$wgContLanguageCode]";
00387 }
00388
00389 protected function feedItem( $row ) {
00390 $title = Title::MakeTitle( intval( $row->page_namespace ), $row->page_title );
00391 if( $title ) {
00392 $date = $row->rev_timestamp;
00393 $comments = $title->getTalkPage()->getFullURL();
00394 $revision = Revision::newFromTitle( $title, $row->rev_id );
00395
00396 return new FeedItem(
00397 $title->getPrefixedText(),
00398 $this->feedItemDesc( $revision ),
00399 $title->getFullURL(),
00400 $date,
00401 $this->feedItemAuthor( $revision ),
00402 $comments
00403 );
00404 } else {
00405 return null;
00406 }
00407 }
00408
00409 protected function feedItemAuthor( $revision ) {
00410 return $revision->getUserText();
00411 }
00412
00413 protected function feedItemDesc( $revision ) {
00414 if( $revision ) {
00415 return '<p>' . htmlspecialchars( $revision->getUserText() ) . wfMsgForContent( 'colon-separator' ) .
00416 htmlspecialchars( FeedItem::stripComment( $revision->getComment() ) ) .
00417 "</p>\n<hr />\n<div>" .
00418 nl2br( htmlspecialchars( $revision->getText() ) ) . "</div>";
00419 }
00420 return '';
00421 }
00422 }
00423
00428 class ContribsPager extends ReverseChronologicalPager {
00429 public $mDefaultDirection = true;
00430 var $messages, $target;
00431 var $namespace = '', $mDb;
00432 var $preventClickjacking = false;
00433
00434 function __construct( $target, $namespace = false, $year = false, $month = false, $tagFilter = false ) {
00435 parent::__construct();
00436
00437 $msgs = array( 'uctop', 'diff', 'newarticle', 'rollbacklink', 'diff', 'hist', 'rev-delundel', 'pipe-separator' );
00438
00439 foreach( $msgs as $msg ) {
00440 $this->messages[$msg] = wfMsgExt( $msg, array( 'escapenoentities' ) );
00441 }
00442
00443 $this->target = $target;
00444 $this->namespace = $namespace;
00445 $this->tagFilter = $tagFilter;
00446
00447 $this->getDateCond( $year, $month );
00448
00449 $this->mDb = wfGetDB( DB_SLAVE, 'contributions' );
00450 }
00451
00452 function getDefaultQuery() {
00453 $query = parent::getDefaultQuery();
00454 $query['target'] = $this->target;
00455 return $query;
00456 }
00457
00458 function getQueryInfo() {
00459 global $wgUser;
00460 list( $tables, $index, $userCond, $join_cond ) = $this->getUserCond();
00461
00462 $conds = array_merge( $userCond, $this->getNamespaceCond() );
00463
00464 if( !$wgUser->isAllowed( 'deletedhistory' ) ) {
00465 $conds[] = $this->mDb->bitAnd('rev_deleted',Revision::DELETED_USER) . ' = 0';
00466 } else if( !$wgUser->isAllowed( 'suppressrevision' ) ) {
00467 $conds[] = $this->mDb->bitAnd('rev_deleted',Revision::SUPPRESSED_USER) .
00468 ' != ' . Revision::SUPPRESSED_USER;
00469 }
00470 $join_cond['page'] = array( 'INNER JOIN', 'page_id=rev_page' );
00471
00472 $queryInfo = array(
00473 'tables' => $tables,
00474 'fields' => array(
00475 'page_namespace', 'page_title', 'page_is_new', 'page_latest', 'page_is_redirect',
00476 'page_len','rev_id', 'rev_page', 'rev_text_id', 'rev_timestamp', 'rev_comment',
00477 'rev_minor_edit', 'rev_user', 'rev_user_text', 'rev_parent_id', 'rev_deleted'
00478 ),
00479 'conds' => $conds,
00480 'options' => array( 'USE INDEX' => array('revision' => $index) ),
00481 'join_conds' => $join_cond
00482 );
00483
00484 ChangeTags::modifyDisplayQuery(
00485 $queryInfo['tables'],
00486 $queryInfo['fields'],
00487 $queryInfo['conds'],
00488 $queryInfo['join_conds'],
00489 $queryInfo['options'],
00490 $this->tagFilter
00491 );
00492
00493 wfRunHooks( 'ContribsPager::getQueryInfo', array( &$this, &$queryInfo ) );
00494 return $queryInfo;
00495 }
00496
00497 function getUserCond() {
00498 $condition = array();
00499 $join_conds = array();
00500 if( $this->target == 'newbies' ) {
00501 $tables = array( 'user_groups', 'page', 'revision' );
00502 $max = $this->mDb->selectField( 'user', 'max(user_id)', false, __METHOD__ );
00503 $condition[] = 'rev_user >' . (int)($max - $max / 100);
00504 $condition[] = 'ug_group IS NULL';
00505 $index = 'user_timestamp';
00506 # FIXME: other groups may have 'bot' rights
00507 $join_conds['user_groups'] = array( 'LEFT JOIN', "ug_user = rev_user AND ug_group = 'bot'" );
00508 } else {
00509 $tables = array( 'page', 'revision' );
00510 $condition['rev_user_text'] = $this->target;
00511 $index = 'usertext_timestamp';
00512 }
00513 return array( $tables, $index, $condition, $join_conds );
00514 }
00515
00516 function getNamespaceCond() {
00517 if( $this->namespace !== '' ) {
00518 return array( 'page_namespace' => (int)$this->namespace );
00519 } else {
00520 return array();
00521 }
00522 }
00523
00524 function getIndexField() {
00525 return 'rev_timestamp';
00526 }
00527
00528 function getStartBody() {
00529 return "<ul>\n";
00530 }
00531
00532 function getEndBody() {
00533 return "</ul>\n";
00534 }
00535
00546 function formatRow( $row ) {
00547 global $wgUser, $wgLang, $wgContLang;
00548 wfProfileIn( __METHOD__ );
00549
00550 $sk = $this->getSkin();
00551 $rev = new Revision( $row );
00552 $classes = array();
00553
00554 $page = Title::newFromRow( $row );
00555 $page->resetArticleId( $row->rev_page );
00556 $link = $sk->link(
00557 $page,
00558 htmlspecialchars( $page->getPrefixedText() ),
00559 array(),
00560 $page->isRedirect() ? array( 'redirect' => 'no' ) : array()
00561 );
00562 # Mark current revisions
00563 $difftext = $topmarktext = '';
00564 if( $row->rev_id == $row->page_latest ) {
00565 $topmarktext .= '<span class="mw-uctop">' . $this->messages['uctop'] . '</span>';
00566 # Add rollback link
00567 if( !$row->page_is_new && $page->quickUserCan( 'rollback' )
00568 && $page->quickUserCan( 'edit' ) )
00569 {
00570 $this->preventClickjacking();
00571 $topmarktext .= ' '.$sk->generateRollback( $rev );
00572 }
00573 }
00574 # Is there a visible previous revision?
00575 if( $rev->userCan( Revision::DELETED_TEXT ) && $rev->getParentId() !== 0 ) {
00576 $difftext = $sk->linkKnown(
00577 $page,
00578 $this->messages['diff'],
00579 array(),
00580 array(
00581 'diff' => 'prev',
00582 'oldid' => $row->rev_id
00583 )
00584 );
00585 } else {
00586 $difftext = $this->messages['diff'];
00587 }
00588 $histlink = $sk->linkKnown(
00589 $page,
00590 $this->messages['hist'],
00591 array(),
00592 array( 'action' => 'history' )
00593 );
00594
00595 $comment = $wgContLang->getDirMark() . $sk->revComment( $rev, false, true );
00596 $date = $wgLang->timeanddate( wfTimestamp( TS_MW, $row->rev_timestamp ), true );
00597 if( $rev->isDeleted( Revision::DELETED_TEXT ) ) {
00598 $d = '<span class="history-deleted">' . $date . '</span>';
00599 } else {
00600 $d = $sk->linkKnown(
00601 $page,
00602 htmlspecialchars($date),
00603 array(),
00604 array( 'oldid' => intval( $row->rev_id ) )
00605 );
00606 }
00607
00608 if( $this->target == 'newbies' ) {
00609 $userlink = ' . . ' . $sk->userLink( $row->rev_user, $row->rev_user_text );
00610 $userlink .= ' ' . wfMsg( 'parentheses', $sk->userTalkLink( $row->rev_user, $row->rev_user_text ) ) . ' ';
00611 } else {
00612 $userlink = '';
00613 }
00614
00615 if( $rev->getParentId() === 0 ) {
00616 $nflag = ChangesList::flag( 'newpage' );
00617 } else {
00618 $nflag = '';
00619 }
00620
00621 if( $rev->isMinor() ) {
00622 $mflag = ChangesList::flag( 'minor' );
00623 } else {
00624 $mflag = '';
00625 }
00626
00627
00628 $canHide = $wgUser->isAllowed( 'deleterevision' );
00629 if( $canHide || ($rev->getVisibility() && $wgUser->isAllowed('deletedhistory')) ) {
00630 if( !$rev->userCan( Revision::DELETED_RESTRICTED ) ) {
00631 $del = $this->mSkin->revDeleteLinkDisabled( $canHide );
00632 } else {
00633 $query = array(
00634 'type' => 'revision',
00635 'target' => $page->getPrefixedDbkey(),
00636 'ids' => $rev->getId()
00637 );
00638 $del = $this->mSkin->revDeleteLink( $query,
00639 $rev->isDeleted( Revision::DELETED_RESTRICTED ), $canHide );
00640 }
00641 $del .= ' ';
00642 } else {
00643 $del = '';
00644 }
00645
00646 $diffHistLinks = '(' . $difftext . $this->messages['pipe-separator'] . $histlink . ')';
00647 $ret = "{$del}{$d} {$diffHistLinks} {$nflag}{$mflag} {$link}{$userlink} {$comment} {$topmarktext}";
00648
00649 # Denote if username is redacted for this edit
00650 if( $rev->isDeleted( Revision::DELETED_USER ) ) {
00651 $ret .= " <strong>" . wfMsgHtml('rev-deleted-user-contribs') . "</strong>";
00652 }
00653
00654 # Tags, if any.
00655 list($tagSummary, $newClasses) = ChangeTags::formatSummaryRow( $row->ts_tags, 'contributions' );
00656 $classes = array_merge( $classes, $newClasses );
00657 $ret .= " $tagSummary";
00658
00659
00660 wfRunHooks( 'ContributionsLineEnding', array( &$this, &$ret, $row ) );
00661
00662 $classes = implode( ' ', $classes );
00663 $ret = "<li class=\"$classes\">$ret</li>\n";
00664 wfProfileOut( __METHOD__ );
00665 return $ret;
00666 }
00667
00673 public function getDatabase() {
00674 return $this->mDb;
00675 }
00676
00677 protected function preventClickjacking() {
00678 $this->preventClickjacking = true;
00679 }
00680
00681 public function getPreventClickjacking() {
00682 return $this->preventClickjacking;
00683 }
00684 }