mirror of
https://github.com/silverstripe/silverstripe-blog
synced 2024-10-22 11:05:58 +02:00
BUGFIX: Prevent infinite loops in RSSWidget.
ENHANCEMENT: Improve the word of the RSSWidget text.
This commit is contained in:
parent
d55d5e21c2
commit
517df83ae2
@ -19,7 +19,7 @@ class RSSWidget extends Widget {
|
||||
"RSSTitle" => 'RSS Feed'
|
||||
);
|
||||
static $cmsTitle = "RSS Feed";
|
||||
static $description = "Shows the latest entries of a RSS feed.";
|
||||
static $description = "Downloads another page's RSS feed and displays items in a list.";
|
||||
|
||||
/**
|
||||
* If the RssUrl is relative, convert it to absolute with the
|
||||
@ -41,7 +41,7 @@ class RSSWidget extends Widget {
|
||||
function getCMSFields() {
|
||||
return new FieldSet(
|
||||
new TextField("RSSTitle", _t('RSSWidget.CT', "Custom title for the feed")),
|
||||
new TextField("RssUrl", _t('RSSWidget.URL', "URL of RSS Feed")),
|
||||
new TextField("RssUrl", _t('RSSWidget.URL', "URL of the other page's RSS feed. Please make sure this URL points to an RSS feed.")),
|
||||
new NumericField("NumberToShow", _t('RSSWidget.NTS', "Number of Items to show"))
|
||||
);
|
||||
}
|
||||
@ -51,6 +51,11 @@ class RSSWidget extends Widget {
|
||||
|
||||
function FeedItems() {
|
||||
$output = new DataObjectSet();
|
||||
|
||||
// Protection against infinite loops when an RSS widget pointing to this page is added to this page
|
||||
if(stristr($_SERVER['HTTP_USER_AGENT'], 'SimplePie')) {
|
||||
return $output;
|
||||
}
|
||||
|
||||
include_once(Director::getAbsFile(SAPPHIRE_DIR . '/thirdparty/simplepie/SimplePie.php'));
|
||||
|
||||
|
@ -37,14 +37,14 @@ $lang['en_US']['BlogEntry.ss']['POSTEDON'] = 'on';
|
||||
$lang['en_US']['BlogEntry.ss']['TAGS'] = 'Tags:';
|
||||
$lang['en_US']['BlogEntry.ss']['UNPUBLISHTHIS'] = 'Unpublish this post';
|
||||
$lang['en_US']['BlogEntry.ss']['VIEWALLPOSTTAGGED'] = 'View all posts tagged';
|
||||
$lang['en_US']['BlogHolder']['HAVENTPERM'] = 'Posting blogs is an administrator task. Please log in.';
|
||||
$lang['en_US']['BlogHolder']['HAVENTPERM'] = 'You do not have sufficient permissions to post blog entries. Please log in.';
|
||||
$lang['en_US']['BlogHolder']['PLURALNAME'] = array(
|
||||
'Blog Holders',
|
||||
50,
|
||||
'Pural name of the object, used in dropdowns and to generally identify a collection of this object in the interface'
|
||||
);
|
||||
$lang['en_US']['BlogHolder']['POST'] = 'Post blog entry';
|
||||
$lang['en_US']['BlogHolder']['RSSFEED'] = 'RSS feed of this blog';
|
||||
$lang['en_US']['BlogHolder']['RSSFEED'] = 'RSS feed of these blogs';
|
||||
$lang['en_US']['BlogHolder']['SINGULARNAME'] = array(
|
||||
'Blog Holder',
|
||||
50,
|
||||
@ -77,6 +77,16 @@ $lang['en_US']['BlogSummary.ss']['COMMENTS'] = 'Comments';
|
||||
$lang['en_US']['BlogSummary.ss']['POSTEDBY'] = 'Posted by';
|
||||
$lang['en_US']['BlogSummary.ss']['POSTEDON'] = 'on';
|
||||
$lang['en_US']['BlogSummary.ss']['VIEWFULL'] = 'View full post titled -';
|
||||
$lang['en_US']['BlogTree']['PLURALNAME'] = array(
|
||||
'Blog Tres',
|
||||
50,
|
||||
'Pural name of the object, used in dropdowns and to generally identify a collection of this object in the interface'
|
||||
);
|
||||
$lang['en_US']['BlogTree']['SINGULARNAME'] = array(
|
||||
'Blog Tree',
|
||||
50,
|
||||
'Singular name of the object, used in dropdowns and to generally identify a single object in the interface'
|
||||
);
|
||||
$lang['en_US']['RSSWidget']['CT'] = 'Custom title for the feed';
|
||||
$lang['en_US']['RSSWidget']['NTS'] = 'Number of Items to show';
|
||||
$lang['en_US']['RSSWidget']['PLURALNAME'] = array(
|
||||
@ -89,7 +99,7 @@ $lang['en_US']['RSSWidget']['SINGULARNAME'] = array(
|
||||
50,
|
||||
'Singular name of the object, used in dropdowns and to generally identify a single object in the interface'
|
||||
);
|
||||
$lang['en_US']['RSSWidget']['URL'] = 'URL of RSS Feed';
|
||||
$lang['en_US']['RSSWidget']['URL'] = 'URL of the other page\'s RSS Feed. Please make sure this URL points to an RSS feed.';
|
||||
$lang['en_US']['SubscribeRSSWidget']['PLURALNAME'] = array(
|
||||
'Subscribe R S S Widgets',
|
||||
50,
|
||||
|
Loading…
Reference in New Issue
Block a user