$text = wfMsgNoTrans( $message, $target );
if( !wfEmptyMsg( $message, $text ) && $text != '-' ) {
- $wgOut->addHtml( '<div class="mw-contributions-footer">' );
+ $wgOut->addHTML( '<div class="mw-contributions-footer">' );
$wgOut->addWikiText( $text );
- $wgOut->addHtml( '</div>' );
+ $wgOut->addHTML( '</div>' );
}
}
}
$feed = new $wgFeedClasses[$type](
$this->feedTitle(),
- wfMsg( 'tagline' ),
+ wfMsgExt( 'tagline', 'parsemag' ),
$this->getTitle()->getFullUrl() );
// Already valid title
}
}
- /**
- * Quickie hack... strip out wikilinks to more legible form from the comment.
- */
- protected function stripComment( $text ) {
- return preg_replace( '/\[\[([^]]*\|)?([^]]+)\]\]/', '\2', $text );
- }
-
protected function feedItemAuthor( $revision ) {
return $revision->getUserText();
}
protected function feedItemDesc( $revision ) {
if( $revision ) {
- return '<p>' . htmlspecialchars( $revision->getUserText() ) . ': ' .
- htmlspecialchars( $this->stripComment( $revision->getComment() ) ) .
+ return '<p>' . htmlspecialchars( $revision->getUserText() ) . wfMsgForContent( 'colon-separator' ) .
+ htmlspecialchars( FeedItem::stripComment( $revision->getComment() ) ) .
"</p>\n<hr />\n<div>" .
nl2br( htmlspecialchars( $revision->getText() ) ) . "</div>";
}
$difftext .= $this->messages['newarticle'];
}
- if( !$page->getUserPermissionsErrors( 'rollback', $wgUser )
- && !$page->getUserPermissionsErrors( 'edit', $wgUser ) ) {
+ if( $page->userCan( 'rollback') && $page->userCan( 'edit' ) ) {
$topmarktext .= ' '.$sk->generateRollback( $rev );
}
$histlink='('.$sk->makeKnownLinkObj( $page, $this->messages['hist'], 'action=history' ) . ')';
$comment = $wgContLang->getDirMark() . $sk->revComment( $rev, false, true );
- $d = $wgLang->timeanddate( wfTimestamp( TS_MW, $row->rev_timestamp ), true );
+ $date = $wgLang->timeanddate( wfTimestamp( TS_MW, $row->rev_timestamp ), true );
+ $d = $sk->makeKnownLinkObj( $page, $date, 'oldid='.intval($row->rev_id) );
if( $this->target == 'newbies' ) {
$userlink = ' . . ' . $sk->userLink( $row->rev_user, $row->rev_user_text );