Skip to content

Commit

Permalink
Fix a couple of notices that I just... noticed :-)
Browse files Browse the repository at this point in the history
  • Loading branch information
defacer committed Aug 3, 2004
1 parent f3b0ce4 commit 9c81fc3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions calendar/lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -1032,7 +1032,7 @@ function calendar_set_filters(&$courses, &$group, &$user, $courseeventsfrom = NU
// For each course...
foreach($groupcourses as $courseid) {
// If the user is an editing teacher in there,
if(!empty($USER) && isteacheredit($courseid, $USER->id)) {
if(!empty($USER->id) && isteacheredit($courseid, $USER->id)) {
// Show events from all groups
if(($grouprecords = get_groups($courseid)) !== false) {
$grouparray = array_merge($grouparray, array_keys($grouprecords));
Expand Down Expand Up @@ -1098,7 +1098,7 @@ function calendar_get_default_courses($ignoreref = false) {
}

$courses = array();
if(isadmin($USER->id)) {
if(!empty($USER->id) && isadmin($USER->id)) {
$courses = get_records_sql('SELECT id, 1 FROM '.$CFG->prefix.'course');
return $courses;
}
Expand Down

0 comments on commit 9c81fc3

Please sign in to comment.