]> git.mjollnir.org Git - moodle.git/commitdiff
DML 2.0 regression
authorskodak <skodak>
Mon, 5 Jan 2009 23:42:51 +0000 (23:42 +0000)
committerskodak <skodak>
Mon, 5 Jan 2009 23:42:51 +0000 (23:42 +0000)
backup/restore.php
mod/chat/gui_header_js/chatinput.php
mod/forum/lib.php

index ff4299cac0d2ac67cdac28e4359ea58f7de0f09e..b2c22cc2286ebbe0285d2db17e193f2caecbc890 100644 (file)
@@ -24,7 +24,7 @@
     $backup_unique_code = optional_param('backup_unique_code',0,PARAM_INT);
 
     //Get and check course
-    if (! $course = get_record("course", "id", $id)) {
+    if (! $course = $DB->get_record("course", array("id"=>$id))) {
         print_error('invalidcourseid');
     }
     // To some reasons, course_startdateoffset value was lost during restoring
index 6d1232c51631255987e4c681512c1a96a5ecc035..35599bf9069d106f4a228ce11008b704a213dce6 100644 (file)
     if (!$chatuser = $DB->get_record('chat_users', array('sid'=>$chat_sid))) {
         print_error('notlogged', 'chat');
     }
-    if (!$chat = get_record('chat', 'id', $chatid)) {
+    if (!$chat = $DB->get_record('chat', array('id'=>$chatid))) {
         error('Could not find that chat room!');
     }
 
-    if (!$course = get_record('course', 'id', $chat->course)) {
+    if (!$course = $DB->get_record('course', array('id'=>$chat->course))) {
         error('Could not find the course this belongs to!');
     }
 
index 2a3beae55a535256b85bc4c96a15513d7b0eb1b3..6376f7052b2827cf1a18d621a40c9efe1736a03f 100644 (file)
@@ -6851,7 +6851,7 @@ function forum_reset_userdata($data) {
         $DB->delete_records_select('forum_posts', "discussion IN ($discussionssql AND f.type <> 'single') AND parent = 0", $params); // now the initial posts for non single simple
 
         // finally all discussions except single simple forums
-        delete_records_select('forum_discussions', "forum IN ($forumssql AND f.type <> 'single')", $params);
+        $DB->delete_records_select('forum_discussions', "forum IN ($forumssql AND f.type <> 'single')", $params);
 
         // remove all grades from gradebook
         if (empty($data->reset_gradebook_grades)) {