]> git.mjollnir.org Git - moodle.git/commitdiff
"MDL-13224, convert type of courses limit, everything coming from database is string...
authordongsheng <dongsheng>
Thu, 2 Apr 2009 02:49:54 +0000 (02:49 +0000)
committerdongsheng <dongsheng>
Thu, 2 Apr 2009 02:49:54 +0000 (02:49 +0000)
my/index.php

index 9edf5d549aaa4cf4c7ca8391ff8641c4dff2edc7..9670f5bf22d1e442330e126af79f0d34c0d79083 100644 (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);