MDL-15101 towards messaging conversion

This commit is contained in:
skodak
2008-06-05 13:26:40 +00:00
parent 74d7d73538
commit d756fe69c5
5 changed files with 24 additions and 22 deletions
+2 -2
View File
@@ -22,7 +22,7 @@
$unblockcontact = optional_param('unblockcontact', 0, PARAM_INT); // unblocking a contact
/// 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");
}
@@ -70,7 +70,7 @@
//echo '</font>';
echo '<div class="commands">';
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) {
message_contact_link($user->id, 'add', false, 'user.php?id='.$user->id, true);
message_contact_link($user->id, 'unblock', false, 'user.php?id='.$user->id, true);