From 5683b9e56d336fd47c8f55452ae2d032683e2603 Mon Sep 17 00:00:00 2001 From: Andrew Davis Date: Thu, 7 Oct 2010 03:59:50 +0000 Subject: [PATCH] message MDLSITE-1042 prevented messages being automatically marked as read if the popup processor wasnt in use --- lib/messagelib.php | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/lib/messagelib.php b/lib/messagelib.php index 49deb894286..9fc0bdb8303 100644 --- a/lib/messagelib.php +++ b/lib/messagelib.php @@ -132,11 +132,15 @@ function message_send($eventdata) { $messageid = $savemessage->id; unset($savemessage->id); + //MDLSITE-1042 only the popup processor adds rows to message_working + //if the popup processor isnt selected messages will be marked read now and may not be seen + //For example, if the receiver has an incorrect email address configured or all processors deselected + // //if there is no more processors that want to process this we can move message to message_read - if ( $DB->count_records('message_working', array('unreadmessageid' => $messageid)) == 0){ - $DB->insert_record('message_read', $savemessage); - $DB->delete_records('message', array('id' => $messageid)); - } + //if ( $DB->count_records('message_working', array('unreadmessageid' => $messageid)) == 0){ + //$DB->insert_record('message_read', $savemessage); + //$DB->delete_records('message', array('id' => $messageid)); + //} } return true; -- 2.43.0