Go to the documentation of this file.
44 global $wgFeed, $wgFeedClasses, $wgFeedLimit, $wgSitename, $wgLanguageCode;
47 $this->
dieUsage(
'Syndication feeds are not available',
'feed-unavailable' );
50 if ( !isset( $wgFeedClasses[
$params[
'feedformat']] ) ) {
51 $this->
dieUsage(
'Invalid subscription feed type',
'feed-invalid' );
55 if (
$params[
'showsizediff'] && $wgMiserMode ) {
56 $this->
dieUsage(
'Size difference is disabled in Miser Mode',
'sizediffdisabled' );
59 $msg =
wfMessage(
'Contributions' )->inContentLanguage()->text();
60 $feedTitle = $wgSitename .
' - ' . $msg .
' [' . $wgLanguageCode .
']';
63 $target =
$params[
'user'] ==
'newbies'
67 $feed =
new $wgFeedClasses[
$params[
'feedformat']] (
69 htmlspecialchars( $msg ),
75 'namespace' =>
$params[
'namespace'],
78 'tagFilter' =>
$params[
'tagfilter'],
79 'deletedOnly' =>
$params[
'deletedonly'],
80 'topOnly' =>
$params[
'toponly'],
81 'newOnly' =>
$params[
'newonly'],
82 'showSizeDiff' =>
$params[
'showsizediff'],
85 if ( $pager->getLimit() > $wgFeedLimit ) {
86 $pager->setLimit( $wgFeedLimit );
90 if ( $pager->getNumRows() > 0 ) {
92 $limit = $pager->getLimit();
93 foreach ( $pager->mResult
as $row ) {
98 $feedItems[] = $this->
feedItem( $row );
107 if (
$title &&
$title->userCan(
'read', $this->getUser() ) ) {
108 $date = $row->rev_timestamp;
109 $comments =
$title->getTalkPage()->getFullURL();
113 $title->getPrefixedText(),
130 return $revision->getUserText();
139 $msg =
wfMessage(
'colon-separator' )->inContentLanguage()->text();
140 $content = $revision->getContent();
144 $html = nl2br( htmlspecialchars( $content->getNativeData() ) );
153 return '<p>' . htmlspecialchars( $revision->getUserText() ) . $msg .
155 "</p>\n<hr />\n<div>" .
$html .
"</div>";
163 $feedFormatNames = array_keys( $wgFeedClasses );
166 'feedformat' =>
array(
174 'namespace' =>
array(
183 'tagfilter' =>
array(
188 'deletedonly' =>
false,
191 'showsizediff' =>
false,
197 'feedformat' =>
'The format of the feed',
198 'user' =>
'What users to get the contributions for',
199 'namespace' =>
'What namespace to filter the contributions by',
200 'year' =>
'From year (and earlier)',
201 'month' =>
'From month (and earlier)',
202 'tagfilter' =>
'Filter contributions that have these tags',
203 'deletedonly' =>
'Show only deleted contributions',
204 'toponly' =>
'Only show edits that are latest revisions',
205 'newonly' =>
'Only show edits that are page creations',
206 'showsizediff' =>
'Show the size difference between revisions. Disabled in Miser Mode',
211 return 'Returns a user contributions feed.';
215 return array_merge( parent::getPossibleErrors(),
array(
216 array(
'code' =>
'feed-unavailable',
'info' =>
'Syndication feeds are not available' ),
217 array(
'code' =>
'feed-invalid',
'info' =>
'Invalid subscription feed type' ),
218 array(
'code' =>
'sizediffdisabled',
'info' =>
'Size difference is disabled in Miser Mode' ),
224 'api.php?action=feedcontributions&user=Reedy',
getPossibleErrors()
Returns a list of all possible errors returned by the module.
static & makeTitle( $ns, $title, $fragment='', $interwiki='')
Create a new Title from a namespace index and a DB key.
A base class for basic support for outputting syndication feeds in RSS and other formats.
getContext()
Get the RequestContext object.
skin txt MediaWiki includes four core it has been set as the default in MediaWiki since the replacing Monobook it had been been the default skin since before being replaced by Vector largely rewritten in while keeping its appearance Several legacy skins were removed in the as the burden of supporting them became too heavy to bear Those in etc for skin dependent CSS etc for skin dependent JavaScript These can also be customised on a per user by etc This feature has led to a wide variety of user styles becoming that gallery is a good place to ending in php
null means default in associative array with keys and values unescaped Should be merged with default with a value of false meaning to suppress the attribute in associative array with keys and values unescaped noclasses just before the function returns a value If you return an< a > element with HTML attributes $attribs and contents $html will be returned If you return $ret will be returned and may include noclasses & $html
getCustomPrinter()
This module uses a custom feed wrapper printer.
feedItemAuthor( $revision)
getResult()
Get the result object.
execute()
Evaluates the parameters, performs the requested query, and sets up the result.
static stripComment( $text)
Quickie hack...
static getTitleFor( $name, $subpage=false, $fragment='')
Get a localised Title object for a specified special page name.
This abstract class implements many basic API functions, and is the base of all API classes.
getDescription()
Returns the description string for this module.
getParamDescription()
Returns an array of parameter descriptions.
null means default in associative array with keys and values unescaped Should be merged with default with a value of false meaning to suppress the attribute in associative array with keys and values unescaped noclasses just before the function returns a value If you return an< a > element with HTML attributes $attribs and contents $html will be returned If you return $ret will be returned and may include noclasses after processing after in associative array form externallinks including delete and has completed for all link tables default is conds Array Extra conditions for the No matching items in log is displayed if loglist is empty msgKey Array If you want a nice box with a set this to the key of the message First element is the message additional optional elements are parameters for the key that are processed with wfMessage() -> params() ->parseAsBlock() - offset Set to overwrite offset parameter in $wgRequest set to '' to unset offset - wrap String Wrap the message in html(usually something like "<
the array() calling protocol came about after MediaWiki 1.4rc1.
List of Api Query prop modules.
when a variable name is used in a it is silently declared as a new masking the global
static makeTitleSafe( $ns, $title, $fragment='', $interwiki='')
Create a new Title from a namespace index and a DB key.
extractRequestParams( $parseLimit=true)
Using getAllowedParams(), this function makes an array of the values provided by the user,...
presenting them properly to the user as errors is done by the caller $title
dieUsage( $description, $errorCode, $httpRespCode=0, $extradata=null)
Throw a UsageException, which will (if uncaught) call the main module's error handler and die with an...
Content object implementation for representing flat text.
getExamples()
Returns usage examples for this module.
This document is intended to provide useful advice for parties seeking to redistribute MediaWiki to end users It s targeted particularly at maintainers for Linux since it s been observed that distribution packages of MediaWiki often break We ve consistently had to recommend that users seeking support use official tarballs instead of their distribution s and this often solves whatever problem the user is having It would be nice if this could such as
getMain()
Get the main module.
getAllowedParams()
Returns an array of allowed parameters (parameter name) => (default value) or (parameter name) => (ar...