Merged from MOODLE_15_STABLE: Fixing bug 3977: properly for HEAD since we're dropping mysql 3 support for 1.6. No need for db compatability checks here.

This commit is contained in:
mjollnir_ 2005-08-31 23:58:42 +00:00
parent 98f7075f13
commit 9ea9d69744

View File

@ -1023,17 +1023,12 @@ function message_get_participants() {
global $CFG;
return get_records_sql("SELECT DISTINCT u.id, u.id
FROM {$CFG->prefix}user as u,
{$CFG->prefix}message as m,
{$CFG->prefix}message_read as mr,
{$CFG->prefix}message_contacts as mc
WHERE m.useridfrom = u.id
OR m.useridto = u.id
OR mr.useridfrom = u.id
OR mr.useridto = u.id
OR mc.userid = u.id
OR mc.contactid = u.id");
return get_records_sql("SELECT useridfrom,useridfrom FROM {$CFG->prefix}message
UNION SELECT useridto,useridto FROM {$CFG->prefix}message
UNION SELECT useridfrom,useridfrom FROM {$CFG->prefix}message_read
UNION SELECT useridto,useridto FROM {$CFG->prefix}message_read
UNION SELECT userid,userid FROM {$CFG->prefix}message_contacts
UNION SELECT contactid,contactid from {$CFG->prefix}message_contacts");
}
?>