MDL-36941 core: removed 'message_working' table
This commit is contained in:
@@ -169,15 +169,9 @@ class manager {
|
||||
)->trigger();
|
||||
}
|
||||
|
||||
// If messaging is disabled and they previously had forum notifications handled by the popup processor
|
||||
// or any processor that puts a row in message_working then the notification will remain forever
|
||||
// unread. To prevent this mark the message read if messaging is disabled.
|
||||
if (empty($CFG->messaging) && $eventdata->notification) {
|
||||
\core_message\api::mark_notification_as_read($savemessage);
|
||||
}
|
||||
|
||||
// If there is no more processors that want to process this we can mark the message as read.
|
||||
if ($DB->count_records('message_working', array('unreadmessageid' => $savemessage->id)) == 0) {
|
||||
if (empty($CFG->messaging)) {
|
||||
// If they have deselected all processors and its a notification mark it read. The user doesn't want to be bothered.
|
||||
// The same goes if the messaging is completely disabled.
|
||||
if ($eventdata->notification) {
|
||||
$savemessage->timeread = null;
|
||||
\core_message\api::mark_notification_as_read($savemessage);
|
||||
|
||||
Reference in New Issue
Block a user