Suggest install of simplepie lib (been removed from SS core master)

This commit is contained in:
Ingo Schommer 2013-07-01 10:00:08 +02:00
parent f7c33e440d
commit 294074ba04
2 changed files with 13 additions and 5 deletions

View File

@ -66,10 +66,17 @@ if(class_exists('Widget')) {
return $output;
}
include_once(Director::getAbsFile(SAPPHIRE_DIR . '/thirdparty/simplepie/simplepie.inc'));
if(!class_exists('SimplePie')) {
throw new LogicException(
'Please install the "simplepie/simplepie" library by adding it to the "require" '
+ 'section of your composer.json'
);
}
$t1 = microtime(true);
$feed = new SimplePie($this->AbsoluteRssUrl, TEMP_FOLDER);
$feed = new SimplePie();
$feed->set_feed_url($this->AbsoluteRssUrl);
$feed->set_cache_location(TEMP_FOLDER);
$feed->init();
if($items = $feed->get_items(0, $this->NumberToShow)) {
foreach($items as $item) {

View File

@ -18,9 +18,10 @@
{
"silverstripe/cms": ">=3.1.x-dev,<4.0"
},
"suggests":
"suggest":
{
"silverstripe/widgets": "dev-master",
"silverstripe/comments": "dev-master"
"silverstripe/widgets": "Additional 'sidebar features', e.g. a list of recent posts and a tagcloud",
"silverstripe/comments": "Enable user comments on any page type, including blog posts",
"simplepie/simplepie": "Parse RSS feeds, required for the RSS widget"
}
}