Skip to content

Commit

Permalink
DML 2.0 regression
Browse files Browse the repository at this point in the history
  • Loading branch information
skodak committed Jan 5, 2009
1 parent ad2aa62 commit 6bf2570
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion backup/restore.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions mod/chat/gui_header_js/chatinput.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@
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!');
}

Expand Down
2 changes: 1 addition & 1 deletion mod/forum/lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down

0 comments on commit 6bf2570

Please sign in to comment.