56 $mainConfig = MediaWikiServices::getInstance()->getMainConfig();
57 $sitename = $mainConfig->get( MainConfigNames::Sitename );
58 $languageCode = $mainConfig->get( MainConfigNames::LanguageCode );
59 $feedClasses = $mainConfig->get( MainConfigNames::FeedClasses );
60 if ( !isset( $feedClasses[$this->format] ) ) {
64 if ( !array_key_exists( $this->format, $feedClasses ) ) {
66 $this->format =
'atom';
69 $feedTitle =
"{$sitename} - {$title} [{$languageCode}]";
70 return new $feedClasses[$this->format](
71 $feedTitle, htmlspecialchars( $description ),
$url );
83 # Merge adjacent edits by one user
86 foreach ( $rows as $obj ) {
93 $obj->rc_namespace >= 0 &&
94 $obj->rc_cur_id == $sorted[$n - 1]->rc_cur_id &&
95 $obj->rc_user_text == $sorted[$n - 1]->rc_user_text ) {
96 $sorted[$n - 1]->rc_last_oldid = $obj->rc_last_oldid;
103 $services = MediaWikiServices::getInstance();
104 $commentFormatter = $services->getRowCommentFormatter();
105 $formattedComments = $commentFormatter->formatItems(
106 $commentFormatter->rows( $rows )
107 ->commentKey(
'rc_comment' )
108 ->indexField(
'rc_id' )
111 $nsInfo = $services->getNamespaceInfo();
112 foreach ( $sorted as $obj ) {
113 $title = Title::makeTitle( $obj->rc_namespace, $obj->rc_title );
114 $talkpage = $nsInfo->hasTalkNamespace( $obj->rc_namespace ) && $title->canExist()
115 ? $title->getTalkPage()->getFullURL()
119 if ( $obj->rc_deleted ) {
123 if ( $obj->rc_this_oldid ) {
124 $url = $title->getFullURL( [
125 'diff' => $obj->rc_this_oldid,
126 'oldid' => $obj->rc_last_oldid,
130 $url = $title->getFullURL();
134 $title->getPrefixedText(),
135 FeedUtils::formatDiff( $obj, $formattedComments[$obj->rc_id] ),
138 ( $obj->rc_deleted & RevisionRecord::DELETED_USER )
139 ?
wfMessage(
'rev-deleted-user' )->escaped() : $obj->rc_user_text,