}
// pull out all course matching the cat
- $courses = get_records_sql("SELECT $fields
+ $visiblecourses = array();
+ if (!($courses = get_records_sql("SELECT $fields
FROM {$CFG->prefix}course c
$categoryselect
- ORDER BY $sort");
- $visiblecourses = array();
+ ORDER BY $sort"))) {
+ return $visiblecourses;
+ }
$totalcount = 0;
if (!$limitnum) {
}
// vim:autoindent:expandtab:shiftwidth=4:tabstop=4:tw=140:
-?>
+?>
\ No newline at end of file