MDL-84156 Libraries: Upgrade SimpePie to 1.8.1
- removed sources in the `library/` directory of the SimplePie lib as those were for PSR-0 namespaces and we use PSR-4 - removed the PSR-4 autoloader provided by SimmpePie as we use our own class loading mechanism - updated the instructions in readme_moodle.txt - fixed constants now being namespaced under \SimplePie\SimplePie Signed-off-by: Daniel Ziegenberg <[email protected]>
This commit is contained in:
@@ -85,7 +85,7 @@ class feed_edit_form extends moodleform {
|
||||
$rss->set_timeout(10);
|
||||
$rss->set_feed_url($data['url']);
|
||||
$rss->set_autodiscovery_cache_duration(0);
|
||||
$rss->set_autodiscovery_level(SIMPLEPIE_LOCATOR_NONE);
|
||||
$rss->set_autodiscovery_level(\SimplePie\SimplePie::LOCATOR_NONE);
|
||||
$rss->init();
|
||||
|
||||
if ($rss->error()) {
|
||||
@@ -129,7 +129,7 @@ class feed_edit_form extends moodleform {
|
||||
public static function autodiscover_feed_url($url){
|
||||
$rss = new moodle_simplepie();
|
||||
$rss->set_feed_url($url);
|
||||
$rss->set_autodiscovery_level(SIMPLEPIE_LOCATOR_ALL);
|
||||
$rss->set_autodiscovery_level(\SimplePie\SimplePie::LOCATOR_ALL);
|
||||
// When autodiscovering an RSS feed, simplepie will try lots of
|
||||
// rss links on a page, so set the timeout high
|
||||
$rss->set_timeout(20);
|
||||
|
||||
Reference in New Issue
Block a user