MDL-48496 block_rss_client: Do not display curl error messages

This commit is contained in:
Frederic Massart 2014-12-05 15:31:42 +08:00 committed by Eloy Lafuente (stronk7)
parent 82e1d7f151
commit b58d8d23f3
3 changed files with 4 additions and 4 deletions

View File

@ -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');

View File

@ -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();

View File

@ -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';