From e89f157b0ac7e15193e6a2897faf435737baf597 Mon Sep 17 00:00:00 2001 From: martinlanghoff Date: Wed, 19 Sep 2007 07:49:10 +0000 Subject: [PATCH] datalib: get_courses_wmanagers() exclude the sitecourse Should never return the sitecourse - so we exclude it explicitly. --- lib/datalib.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/datalib.php b/lib/datalib.php index 49835aef6e..19e92c2e66 100644 --- a/lib/datalib.php +++ b/lib/datalib.php @@ -660,9 +660,9 @@ function get_courses_wmanagers($categoryid=0, $sort="c.sortorder ASC", $fields=a $sortstatement = "ORDER BY $sort"; } - $where = ''; + $where = 'WHERE c.id != ' . SITEID; if ($categoryclause !== ''){ - $where = "WHERE $categoryclause"; + $where = "$where AND $categoryclause"; } // pull out all courses matching the cat -- 2.39.5