]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-984adding forgottent rs_close() - thanks Eloy! merged from MOODLE_18_STABLE
authorskodak <skodak>
Fri, 18 May 2007 09:52:11 +0000 (09:52 +0000)
committerskodak <skodak>
Fri, 18 May 2007 09:52:11 +0000 (09:52 +0000)
group/db/upgrade.php

index b071675da640ef02e95cc857ae383153d78aa196..ddad4dee664b9680e3a87baf51e4f5c84b85fc2d 100644 (file)
@@ -61,13 +61,14 @@ function undo_groupings() {
     }
 
     $db->debug = false;
-    if ($rs && $rs->RecordCount() > 0) {
+    if ($rs->RecordCount() > 0) {
         while ($group = rs_fetch_next_record($rs)) {
             if (!record_exists('groups_courses_groups', 'courseid', $group->courseid, 'groupid', $group->groupid)) {
                 insert_record('groups_courses_groups', $group);
             }
         }
     }
+    rs_close($rs);
     $db->debug = true;
 
     delete_records('groups_courses_groupings');