diff --git a/code/RSSWidget.php b/code/RSSWidget.php index 3209965..99d60c0 100644 --- a/code/RSSWidget.php +++ b/code/RSSWidget.php @@ -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')); diff --git a/lang/en_US.php b/lang/en_US.php index 6609931..5d5acf7 100644 --- a/lang/en_US.php +++ b/lang/en_US.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,