From: dhawes Date: Mon, 24 Jan 2005 02:58:19 +0000 (+0000) Subject: feed titles are stored and displayed again - silly bug X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=947becc73100c1dbb52cd288a7af76dbc159d806;p=moodle.git feed titles are stored and displayed again - silly bug --- diff --git a/blocks/rss_client/block_rss_client_action.php b/blocks/rss_client/block_rss_client_action.php index 948d6e66c9..f0bb5abe10 100644 --- a/blocks/rss_client/block_rss_client_action.php +++ b/blocks/rss_client/block_rss_client_action.php @@ -24,9 +24,21 @@ optional_variable($rsstype); optional_variable($item); + $straddedit = get_string('block_rss_feeds_add_edit', 'block_rss_client'); + if ( isadmin() ) { + $stradmin = get_string('administration'); + $strconfiguration = get_string('configuration'); + $navigation = "wwwroot/$CFG->admin/index.php\">$stradmin -> ". + "wwwroot/$CFG->admin/configure.php\">$strconfiguration -> $straddedit"; + } else if ($courseid != 'none' && $course = get_record('course', 'id', $courseid) ) { + $navigation = "wwwroot/course/view.php?id=$course->id\">$course->shortname -> $straddedit"; + } else { + $navigation = $straddedit; + } + print_header(get_string('block_rss_feeds_add_edit', 'block_rss_client'), get_string('block_rss_feeds_add_edit', 'block_rss_client'), - get_string('block_rss_feeds_add_edit', 'block_rss_client') ); + $navigation ); //check to make sure that the user is allowed to post new feeds $submitters = $CFG->block_rss_client_submitters; @@ -101,11 +113,13 @@ if ($rss === false) { print 'There was an error loading this rss feed. You may want to verify the url you have specified before using it.'; //Daryl Hawes note: localize this line } else { - + print_object($rss); + $dataobject->id = $rssid; if (!empty($rss->channel['description'])) { $dataobject->description = addslashes($rss->channel['description']); - } else if (!empty($rss->channel['title'])) { + } + if (!empty($rss->channel['title'])) { $dataobject->title = addslashes($rss->channel['title']); } if (!update_record('block_rss_client', $dataobject)) {