From 55c47e48a9f580aa02328d4713b42d8872a49674 Mon Sep 17 00:00:00 2001 From: martinlanghoff Date: Wed, 19 Sep 2007 07:49:23 +0000 Subject: [PATCH] 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. --- course/lib.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 -- 2.39.5