From: martinlanghoff Date: Wed, 19 Sep 2007 07:49:23 +0000 (+0000) Subject: course/lib: print_courses() - no need to worry about sitecourse X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=55c47e48a9f580aa02328d4713b42d8872a49674;p=moodle.git course/lib: print_courses() - no need to worry about sitecourse get_courses_wmanagers() excludes the sitecourse, so we no longer check for it. And check explicitly for an empty course array. --- diff --git a/course/lib.php b/course/lib.php index 54eded80bd..62478e271d 100644 --- a/course/lib.php +++ b/course/lib.php @@ -1776,9 +1776,9 @@ function print_courses($category, $hidesitecourse = false) { array('password','summary','currency')); } - if ($courses) { + if (count($courses) > 0) { foreach ($courses as $course) { - if ($hidesitecourse and ($course->id == SITEID)) { + if ($hidesitecourse) { continue; } if ($course->visible == 1