bug fixes

This commit is contained in:
dhawes 2004-12-31 03:38:22 +00:00
parent 6825eec6f9
commit 9723afd1d0
3 changed files with 2 additions and 5 deletions

View File

@ -20,6 +20,7 @@ class block_rss_client extends block_base {
} }
function get_content() { function get_content() {
require_once($CFG->dirroot .'/rss/templib.php');
global $CFG, $editing; global $CFG, $editing;
if($this->content !== NULL) { if($this->content !== NULL) {
@ -36,7 +37,6 @@ class block_rss_client extends block_base {
return $this->content; return $this->content;
} }
require_once($CFG->dirroot .'/rss/templib.php');
$output = ''; $output = '';
$rssid = -1; $rssid = -1;
$display_description = false; $display_description = false;

View File

@ -26,9 +26,6 @@
print_header('Add/Edit RSS Feeds','Add/Edit RSS Feeds','Add/Edit RSS Feeds' ); print_header('Add/Edit RSS Feeds','Add/Edit RSS Feeds','Add/Edit RSS Feeds' );
//check to make sure that the user is allowed to post new feeds //check to make sure that the user is allowed to post new feeds
if (empty( $CFG->block_rss_client_submitters)) {
$CFG->block_rss_client_submitters = 0;
}
$submitters = $CFG->block_rss_client_submitters; $submitters = $CFG->block_rss_client_submitters;
$isteacher = false; $isteacher = false;
if ($courseid != 'none'){ if ($courseid != 'none'){

View File

@ -4,7 +4,7 @@ global $CFG;
//initialize config vars for rss_client block if missing //initialize config vars for rss_client block if missing
if (empty($CFG->block_rss_client_submitters) ) { if (empty($CFG->block_rss_client_submitters) ) {
$CFG->block_rss_client_submitters = 2; //default to admin only $CFG->block_rss_client_submitters = 1; //default to admin only
} }
if (empty($CFG->block_rss_client_num_entries) ) { if (empty($CFG->block_rss_client_num_entries) ) {
$CFG->block_rss_client_num_entries = 5; //default to 5 entries per block $CFG->block_rss_client_num_entries = 5; //default to 5 entries per block