49 if ( !$config->get(
'Feed' ) ) {
53 $feedClasses = $config->get(
'FeedClasses' );
54 if ( !isset( $feedClasses[$this->params[
'feedformat']] ) ) {
58 $this->
getMain()->setCacheMode(
'public' );
61 $this->
getMain()->setCacheMaxAge( 15 );
64 $feedFormat = $this->params[
'feedformat'];
65 $specialClass = $this->params[
'target'] !==
null
66 ? SpecialRecentChangesLinked::class
67 : SpecialRecentChanges::class;
69 $formatter = $this->
getFeedObject( $feedFormat, $specialClass );
80 $rc =
new $specialClass();
82 $rows = $rc->getRows();
98 if ( $specialClass === SpecialRecentChangesLinked::class ) {
99 $title = Title::newFromText( $this->params[
'target'] );
105 $feedObj = $feed->getFeedObject(
106 $this->
msg(
'recentchangeslinked-title',
$title->getPrefixedText() )
107 ->inContentLanguage()->text(),
108 $this->msg(
'recentchangeslinked-feed' )->inContentLanguage()->text(),
113 $feedObj = $feed->getFeedObject(
114 $this->
msg(
'recentchanges' )->inContentLanguage()->text(),
115 $this->
msg(
'recentchanges-feed-description' )->inContentLanguage()->text(),
125 $feedFormatNames = array_keys( $config->get(
'FeedClasses' ) );
137 'associated' =>
false,
154 'hideminor' =>
false,
156 'hideanons' =>
false,
158 'hidepatrolled' =>
false,
159 'hidemyself' =>
false,
160 'hidecategorization' =>
false,
169 'showlinkedto' =>
false,
177 'action=feedrecentchanges'
178 =>
'apihelp-feedrecentchanges-example-simple',
179 'action=feedrecentchanges&days=30'
180 =>
'apihelp-feedrecentchanges-example-30days',
wfEscapeWikiText( $text)
Escapes the given text so that it may be output using addWikiText() without any linking,...
This abstract class implements many basic API functions, and is the base of all API classes.
dieWithError( $msg, $code=null, $data=null, $httpCode=0)
Abort execution with an error.
getParameter( $paramName, $parseLimit=true)
Get a value for the given parameter.
getMain()
Get the main module.
getResult()
Get the result object.
extractRequestParams( $options=[])
Using getAllowedParams(), this function makes an array of the values provided by the user,...
getAllowedParams()
Returns an array of allowed parameters (parameter name) => (default value) or (parameter name) => (ar...
getExamplesMessages()
Returns usage examples for this module.
execute()
Format the rows (generated by SpecialRecentchanges or SpecialRecentchangeslinked) as an RSS/Atom feed...
getFeedObject( $feedFormat, $specialClass)
Return a ChannelFeed object.
getCustomPrinter()
This module uses a custom feed wrapper printer.
Feed to Special:RecentChanges and Special:RecentChangesLinked.
static buildItems( $rows)
Generate the feed items given a row from the database.
msg( $key,... $params)
Get a Message object with context set Parameters are the same as wfMessage()
An IContextSource implementation which will inherit context from another source but allow individual ...
Similar to FauxRequest, but only fakes URL parameters and method (POST or GET) and use the base reque...
static getTitleFor( $name, $subpage=false, $fragment='')
Get a localised Title object for a specified special page name If you don't need a full Title object,...