52 $mainConfig = MediaWikiServices::getInstance()->getMainConfig();
53 $sitename = $mainConfig->get( MainConfigNames::Sitename );
54 $languageCode = $mainConfig->get( MainConfigNames::LanguageCode );
55 $feedClasses = $mainConfig->get( MainConfigNames::FeedClasses );
56 if ( !isset( $feedClasses[$this->format] ) ) {
60 if ( !array_key_exists( $this->format, $feedClasses ) ) {
62 $this->format =
'atom';
65 $feedTitle =
"{$sitename} - {$title} [{$languageCode}]";
66 return new $feedClasses[$this->format](
67 $feedTitle, htmlspecialchars( $description ), $url );
79 # Merge adjacent edits by one user
82 foreach ( $rows as $obj ) {
89 $obj->rc_namespace >= 0 &&
90 $obj->rc_cur_id == $sorted[$n - 1]->rc_cur_id &&
91 $obj->rc_user_text == $sorted[$n - 1]->rc_user_text ) {
92 $sorted[$n - 1]->rc_last_oldid = $obj->rc_last_oldid;
99 $services = MediaWikiServices::getInstance();
100 $commentFormatter = $services->getRowCommentFormatter();
101 $formattedComments = $commentFormatter->formatItems(
102 $commentFormatter->rows( $rows )
103 ->commentKey(
'rc_comment' )
104 ->indexField(
'rc_id' )
107 $nsInfo = $services->getNamespaceInfo();
108 foreach ( $sorted as $obj ) {
109 $title = Title::makeTitle( $obj->rc_namespace, $obj->rc_title );
110 $talkpage = $nsInfo->hasTalkNamespace( $obj->rc_namespace ) &&
$title->canExist()
111 ?
$title->getTalkPage()->getFullURL()
115 if ( $obj->rc_deleted ) {
119 if ( $obj->rc_this_oldid ) {
120 $url =
$title->getFullURL( [
121 'diff' => $obj->rc_this_oldid,
122 'oldid' => $obj->rc_last_oldid,
126 $url =
$title->getFullURL();
130 $title->getPrefixedText(),
134 ( $obj->rc_deleted & RevisionRecord::DELETED_USER )
135 ?
wfMessage(
'rev-deleted-user' )->escaped() : $obj->rc_user_text,