added paramater to change the template name, fixing bug 26479

This commit is contained in:
Jeroen De Dauw 2011-05-14 15:10:40 +00:00
parent b2d75da767
commit a789ea5969
3 changed files with 5 additions and 4 deletions

View file

@ -19,7 +19,7 @@ $messages['en'] = array(
'rss-invalid-url' => 'Not a valid URL: $1',
'rss-parse-error' => 'Error parsing XML for RSS',
'rss-ns-permission' => 'RSS is not allowed in this namespace',
'rss-item' => '{{RSSPost | title = {{{title}}} | link = {{{link}}} | date = {{{date}}} | author = {{{author}}} }}',
'rss-item' => '{{$1 | title = {{{title}}} | link = {{{link}}} | date = {{{date}}} | author = {{{author}}} }}',
);
/** Afrikaans (Afrikaans)

View file

@ -35,7 +35,7 @@ $wgExtensionCredits['parserhook'][] = array(
'Jeroen De Dauw',
'Mark A. Hershberger'
),
'version' => '1.8',
'version' => '1.9',
'url' => 'http://www.mediawiki.org/wiki/Extension:RSS',
'descriptionmsg' => 'rss-desc',
);
@ -63,4 +63,4 @@ $wgRSSNamespaces = null; // Ignore the RSS tag in all but the namespaces list
$wgRSSUserAgent = 'MediaWikiRSS/0.02 (+http://www.mediawiki.org/wiki/Extension:RSS) / MediaWiki RSS extension';
// Proxy server to use for fetching feeds
$wgRSSProxy = false;
$wgRSSProxy = false;

View file

@ -70,7 +70,8 @@ class RSSParser {
$article = new Article( $titleObject, 0 );
$this->itemTemplate = $article->fetchContent();
} else {
$this->itemTemplate = wfMsgNoTrans( 'rss-item' );
$templateName = isset( $args['templatename'] ) ? $args['templatename'] : 'RSSPost';
$this->itemTemplate = wfMsgNoTrans( 'rss-item', $templateName );
}
}