mirror of
https://github.com/silverstripe/silverstripe-blog
synced 2024-10-22 11:05:58 +02:00
Suggest install of simplepie lib (been removed from SS core master)
This commit is contained in:
parent
f7c33e440d
commit
294074ba04
@ -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) {
|
||||
|
@ -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"
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user