Commit b58d8d23 authored by Frederic Massart's avatar Frederic Massart Committed by Eloy Lafuente
Browse files

MDL-48496 block_rss_client: Do not display curl error messages

parent 82e1d7f1
......@@ -142,7 +142,7 @@
$feed->set_cache_duration($CFG->block_rss_client_timeout*60);
}
if(debugging() && $feed->error()){
if ($CFG->debugdeveloper && $feed->error()) {
return '<p>'. $feedrecord->url .' Failed with code: '.$feed->error().'</p>';
}
......@@ -314,8 +314,7 @@
$feed->init();
if ($feed->error()) {
mtrace ('error');
mtrace ('SimplePie failed with error:'.$feed->error());
mtrace('Error: could not load/find the RSS feed');
$status = false;
} else {
mtrace ('ok');
......
......@@ -89,7 +89,7 @@ class feed_edit_form extends moodleform {
$rss->init();
if ($rss->error()) {
$errors['url'] = get_string('errorloadingfeed', 'block_rss_client', $rss->error());
$errors['url'] = get_string('couldnotfindloadrssfeed', 'block_rss_client');
} else {
$this->title = $rss->get_title();
$this->description = $rss->get_description();
......
......@@ -33,6 +33,7 @@ $string['clientshowchannellinklabel'] = 'Should a link to the original site (cha
$string['clientshowimagelabel'] = 'Show channel image if available :';
$string['configblock'] = 'Configure this block';
$string['couldnotfindfeed'] = 'Could not find feed with id';
$string['couldnotfindloadrssfeed'] = 'Could not find or load the RSS feed.';
$string['customtitlelabel'] = 'Custom title (leave blank to use title supplied by feed):';
$string['deletefeedconfirm'] = 'Are you sure you want to delete this feed?';
$string['disabledrssfeeds'] = 'RSS feeds are disabled';
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment