Permalink
Browse files

get_my_courses() if the parameters passed are identical to the defaul…

…ts... MDL-7416

We are using the defaults then ;-)

Credits for spotting it go to Yu!
Blames for the thinko to MartinL
  • Loading branch information...
1 parent 4b4a3f4 commit c54f92b59c7fe3afe43b6122d8394c3c6c8a85e4 martinlanghoff committed May 16, 2007
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/datalib.php
View
@@ -689,12 +689,12 @@ function get_my_courses($userid, $sort=NULL, $fields=NULL, $doanything=false,$li
$d_fields = 'id, category, sortorder, shortname, fullname, idnumber, newsitems, teacher, teachers, student, students, guest, startdate, visible, cost, enrol, summary, groupmode, groupmodeforce';
$usingdefaults = true;
- if (is_null($sort)) {
+ if (is_null($sort) || $sort === $d_sort) {
$sort = $d_sort;
} else {
$usingdefaults = false;
}
- if (is_null($fields)) {
+ if (is_null($fields) || $fields === $d_fields) {
$fields = $d_fields;
} else {
$usingdefaults = false;

0 comments on commit c54f92b

Please sign in to comment.