From: skodak Date: Sat, 7 Jun 2008 15:44:19 +0000 (+0000) Subject: MDL-15108 some forgotten conversions X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=f3c55e42ebd46fa2c6ccb9474c6e371c4db18b73;p=moodle.git MDL-15108 some forgotten conversions --- diff --git a/course/editcategory.php b/course/editcategory.php index 269eb6f241..41aa89431f 100644 --- a/course/editcategory.php +++ b/course/editcategory.php @@ -131,12 +131,12 @@ if ($id && !$categoryadd && !$categoryupdate && false) { $count = $DB->get_record_sql('SELECT MAX(sortorder) AS max, 1 FROM {course} WHERE category=' . $category->id); $count = $count->max + 100; - begin_sql(); + $DB->begin_sql(); foreach ($courses as $course) { $DB->set_field('course', 'sortorder', $count, array('id'=>$course->id)); $count++; } - commit_sql(); + $DB->commit_sql(); fix_course_sortorder($category->id); } } @@ -258,14 +258,14 @@ if ($id && !$categoryadd && !$categoryupdate && false) { } if ($swapcourse and $movecourse) { // Renumber everything for robustness - begin_sql(); + $DB->begin_sql(); if (!( $DB->set_field("course", "sortorder", $max, aray("id"=>$swapcourse->id)) && $DB->set_field("course", "sortorder", $swapcourse->sortorder, array("id"=>$movecourse->id)) && $DB->set_field("course", "sortorder", $movecourse->sortorder, array("id"=>$swapcourse->id)) )) { notify("Could not update that course!"); } - commit_sql(); + $DB->commit_sql(); } }