"MDL-13224, convert type of courses limit, everything coming from database is string, merged from 1.9"

This commit is contained in:
dongsheng 2009-04-02 02:49:54 +00:00
parent 0c34c7eb50
commit 8b8ff6ff4c

View File

@ -61,7 +61,8 @@
// limits the number of courses showing up
$courses_limit = 21;
if (!empty($CFG->mycoursesperpage) && is_int($CFG->mycoursesperpage)) {
$CFG->mycoursesperpage = (int)$CFG->mycoursesperpage;
if (!empty($CFG->mycoursesperpage)) {
$courses_limit = $CFG->mycoursesperpage;
}
$courses = get_my_courses($USER->id, 'visible DESC,sortorder ASC', '*', false, $courses_limit);