From: skodak Date: Thu, 5 Jun 2008 13:26:40 +0000 (+0000) Subject: MDL-15101 towards messaging conversion X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=d756fe69c587df0eae4d6c90d8ccbcbe75387aef;p=moodle.git MDL-15101 towards messaging conversion --- diff --git a/message/discussion.php b/message/discussion.php index bd067dc43d..f690da706e 100644 --- a/message/discussion.php +++ b/message/discussion.php @@ -18,7 +18,7 @@ $noframesjs = optional_param('noframesjs', 0, PARAM_BOOL); /// Check the user we are talking to is valid - if (! $user = get_record('user', 'id', $userid)) { + if (! $user = $DB->get_record('user', array('id'=>$userid))) { print_error("User ID was incorrect"); } @@ -92,7 +92,7 @@ } /// Check that the user is not blocking us!! - if ($contact = get_record('message_contacts', 'userid', $user->id, 'contactid', $USER->id)) { + if ($contact = $DB->get_record('message_contacts', array('userid'=>$user->id, 'contactid'=>$USER->id))) { if ($contact->blocked and !has_capability('moodle/site:readallmessages', get_context_instance(CONTEXT_SYSTEM))) { print_heading(get_string('userisblockingyou', 'message')); exit; @@ -127,7 +127,7 @@ echo print_user_picture($user, SITEID, $user->picture, 48, true, true, 'userwindow'); echo '

'.$userfullname.'

'; echo '