Permalink
Browse files

Added failsafe code in case config files haven't been updated.

  • Loading branch information...
1 parent 3eecaaf commit 658724df8f2c7401ecbf07297f04ef966a818887 mchurch committed Sep 3, 2004
Showing with 7 additions and 2 deletions.
  1. +7 −2 lib/blocklib.php
View
@@ -931,8 +931,9 @@ function blocks_get_config_default ($cformat='') {
if (!empty($CFG->defaultblocks_site)) {
return $CFG->defaultblocks_site;
}
+ /// Failsafe - in case nothing was defined.
else {
- return $CFG->defaultblocks;
+ return 'site_main_menu,admin,course_list:course_summary,calendar_month';
}
}
/// Return the appropriate block string for the format.
@@ -947,9 +948,13 @@ function blocks_get_config_default ($cformat='') {
if (!empty($format['defaultblocks'])) {
return $format['defaultblocks'];
}
- else {
+ else if (!empty($CFG->defaultblocks)){
return $CFG->defaultblocks;
}
+ /// Failsafe - in case nothing was defined.
+ else {
+ return 'participants,activity_modules,search_forums,admin,course_list:news_items,calendar_upcoming,recent_activity';
+ }
}
}

0 comments on commit 658724d

Please sign in to comment.