mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 14:27:22 +01:00
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:
parent
98f7075f13
commit
9ea9d69744
@ -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");
|
||||
}
|
||||
|
||||
?>
|
||||
|
Loading…
x
Reference in New Issue
Block a user