Commit 244aade1 authored by dani's avatar dani
Browse files

MDL-72587 message: Support getting both read and unread messages

parent 214adb79
......@@ -1963,7 +1963,8 @@ class core_message_external extends external_api {
'type' => new external_value(
PARAM_ALPHA, 'type of message to return, expected values are: notifications, conversations and both',
VALUE_DEFAULT, 'both'),
'read' => new external_value(PARAM_BOOL, 'true for getting read messages, false for unread', VALUE_DEFAULT, true),
'read' => new external_value(PARAM_INT, '1 for getting read messages, 0 for unread, 2 for both',
VALUE_DEFAULT, 1),
'newestfirst' => new external_value(
PARAM_BOOL, 'true for ordering by newest first, false for oldest first',
VALUE_DEFAULT, true),
......@@ -1982,13 +1983,13 @@ class core_message_external extends external_api {
* @param int $useridto the user id who received the message
* @param int $useridfrom the user id who send the message. -10 or -20 for no-reply or support user
* @param string $type type of message to return, expected values: notifications, conversations and both
* @param bool $read true for retreiving read messages, false for unread
* @param int $read 1 for getting read messages, 0 for unread, 2 for both
* @param bool $newestfirst true for ordering by newest first, false for oldest first
* @param int $limitfrom limit from
* @param int $limitnum limit num
* @return external_description
*/
public static function get_messages($useridto, $useridfrom = 0, $type = 'both', $read = true,
public static function get_messages($useridto, $useridfrom = 0, $type = 'both', $read = MESSAGE_GET_READ,
$newestfirst = true, $limitfrom = 0, $limitnum = 0) {
global $CFG, $USER;
......
......@@ -62,6 +62,13 @@ define('MESSAGE_DEFAULT_MIN_POLL_IN_SECONDS', 10);
define('MESSAGE_DEFAULT_MAX_POLL_IN_SECONDS', 2 * MINSECS);
define('MESSAGE_DEFAULT_TIMEOUT_POLL_IN_SECONDS', 5 * MINSECS);
/**
* To get only read, unread or both messages or notifications.
*/
define('MESSAGE_GET_UNREAD', 0);
define('MESSAGE_GET_READ', 1);
define('MESSAGE_GET_READ_AND_UNREAD', 2);
/**
* Returns the count of unread messages for user. Either from a specific user or from all users.
*
......@@ -552,17 +559,22 @@ function message_page_type_list(string $pagetype, ?context $parentcontext, ?cont
* @param int $useridto the user id who received the message
* @param int $useridfrom the user id who sent the message. -10 or -20 for no-reply or support user
* @param int $notifications 1 for retrieving notifications, 0 for messages, -1 for both
* @param bool $read true for retrieving read messages, false for unread
* @param int $read Either MESSAGE_GET_READ, MESSAGE_GET_UNREAD or MESSAGE_GET_READ_AND_UNREAD.
* @param string $sort the column name to order by including optionally direction
* @param int $limitfrom limit from
* @param int $limitnum limit num
* @return external_description
* @since 2.8
*/
function message_get_messages($useridto, $useridfrom = 0, $notifications = -1, $read = true,
function message_get_messages($useridto, $useridfrom = 0, $notifications = -1, $read = MESSAGE_GET_READ,
$sort = 'mr.timecreated DESC', $limitfrom = 0, $limitnum = 0) {
global $DB;
if (is_bool($read)) {
// Backwards compatibility, this parameter was a bool before 4.0.
$read = (int) $read;
}
// If the 'useridto' value is empty then we are going to retrieve messages sent by the useridfrom to any user.
$userfieldsapi = \core_user\fields::for_name();
if (empty($useridto)) {
......@@ -652,9 +664,9 @@ function message_get_messages($useridto, $useridfrom = 0, $notifications = -1, $
$notificationsparams[] = $useridfrom;
}
}
if ($read) {
if ($read === MESSAGE_GET_READ) {
$notificationsql .= "AND mr.timeread IS NOT NULL ";
} else {
} else if ($read === MESSAGE_GET_UNREAD) {
$notificationsql .= "AND mr.timeread IS NULL ";
}
$messagesql .= "ORDER BY $sort";
......@@ -663,14 +675,16 @@ function message_get_messages($useridto, $useridfrom = 0, $notifications = -1, $
// Handle messages if needed.
if ($notifications === -1 || $notifications === 0) {
$messages = $DB->get_records_sql($messagesql, $messageparams, $limitfrom, $limitnum);
// Get rid of the messages that have either been read or not read depending on the value of $read.
$messages = array_filter($messages, function ($message) use ($read) {
if ($read) {
return !is_null($message->timeread);
}
if ($read !== MESSAGE_GET_READ_AND_UNREAD) {
// Get rid of the messages that have either been read or not read depending on the value of $read.
$messages = array_filter($messages, function ($message) use ($read) {
if ($read === MESSAGE_GET_READ) {
return !is_null($message->timeread);
}
return is_null($message->timeread);
});
return is_null($message->timeread);
});
}
}
// All.
......
......@@ -1296,8 +1296,6 @@ class core_message_externallib_testcase extends externallib_advanced_testcase {
$this->resetAfterTest(true);
$this->preventResetByRollback();
// This mark the messages as read!.
$sink = $this->redirectMessages();
$user1 = self::getDataGenerator()->create_user();
$user2 = self::getDataGenerator()->create_user();
......@@ -1306,58 +1304,64 @@ class core_message_externallib_testcase extends externallib_advanced_testcase {
$course = self::getDataGenerator()->create_course();
// Send a message from one user to another.
message_post_message($user1, $user2, 'some random text 1', FORMAT_MOODLE);
message_post_message($user1, $user3, 'some random text 2', FORMAT_MOODLE);
message_post_message($user2, $user3, 'some random text 3', FORMAT_MOODLE);
message_post_message($user3, $user2, 'some random text 4', FORMAT_MOODLE);
message_post_message($user3, $user1, 'some random text 5', FORMAT_MOODLE);
$im1 = message_post_message($user1, $user2, 'some random text 1', FORMAT_MOODLE);
$im2 = message_post_message($user1, $user3, 'some random text 2', FORMAT_MOODLE);
$im3 = message_post_message($user2, $user3, 'some random text 3', FORMAT_MOODLE);
$im4 = message_post_message($user3, $user2, 'some random text 4', FORMAT_MOODLE);
$im5 = message_post_message($user3, $user1, 'some random text 5', FORMAT_MOODLE);
$im6 = message_post_message($user1, $user2, 'some random text 6', FORMAT_MOODLE);
// Mark a message as read by user2.
$message = $DB->get_record('messages', ['id' => $im6]);
\core_message\api::mark_message_as_read($user2->id, $message);
$this->setUser($user1);
// Get read conversations from user1 to user2.
$messages = core_message_external::get_messages($user2->id, $user1->id, 'conversations', true, true, 0, 0);
// Get unread conversations from user1 to user2.
$messages = core_message_external::get_messages($user2->id, $user1->id, 'conversations', MESSAGE_GET_UNREAD, true, 0, 0);
$messages = external_api::clean_returnvalue(core_message_external::get_messages_returns(), $messages);
$this->assertCount(1, $messages['messages']);
$this->assertEquals($im1, $messages['messages'][0]['id']);
// Delete the message.
$message = array_shift($messages['messages']);
\core_message\api::delete_message($user1->id, $message['id']);
$messages = core_message_external::get_messages($user2->id, $user1->id, 'conversations', true, true, 0, 0);
// Get read conversations from user1 to user2.
$messages = core_message_external::get_messages($user2->id, $user1->id, 'conversations', MESSAGE_GET_READ, true, 0, 0);
$messages = external_api::clean_returnvalue(core_message_external::get_messages_returns(), $messages);
$this->assertCount(0, $messages['messages']);
$this->assertCount(1, $messages['messages']);
$this->assertEquals($im6, $messages['messages'][0]['id']);
// Get unread conversations from user1 to user2.
$messages = core_message_external::get_messages($user2->id, $user1->id, 'conversations', false, true, 0, 0);
// Get both read and unread conversations from user1 to user2.
$messages = core_message_external::get_messages($user2->id, $user1->id, 'conversations', MESSAGE_GET_READ_AND_UNREAD,
true, 0, 0);
$messages = external_api::clean_returnvalue(core_message_external::get_messages_returns(), $messages);
$this->assertCount(0, $messages['messages']);
$this->assertCount(2, $messages['messages']);
// Delete an unread message.
\core_message\api::delete_message($user1->id, $im1);
// Get read messages send from user1.
$messages = core_message_external::get_messages(0, $user1->id, 'conversations', true, true, 0, 0);
$messages = core_message_external::get_messages($user2->id, $user1->id, 'conversations', MESSAGE_GET_UNREAD, true, 0, 0);
$messages = external_api::clean_returnvalue(core_message_external::get_messages_returns(), $messages);
$this->assertCount(1, $messages['messages']);
$this->assertCount(0, $messages['messages']);
$this->setUser($user2);
// Get read conversations from any user to user2.
$messages = core_message_external::get_messages($user2->id, 0, 'conversations', true, true, 0, 0);
// Get unread conversations from any user to user2.
$messages = core_message_external::get_messages($user2->id, 0, 'conversations', MESSAGE_GET_UNREAD, true, 0, 0);
$messages = external_api::clean_returnvalue(core_message_external::get_messages_returns(), $messages);
$this->assertCount(2, $messages['messages']);
// Conversations from user3 to user2.
$messages = core_message_external::get_messages($user2->id, $user3->id, 'conversations', true, true, 0, 0);
$messages = core_message_external::get_messages($user2->id, $user3->id, 'conversations', MESSAGE_GET_UNREAD, true, 0, 0);
$messages = external_api::clean_returnvalue(core_message_external::get_messages_returns(), $messages);
$this->assertCount(1, $messages['messages']);
// Delete the message.
$message = array_shift($messages['messages']);
\core_message\api::delete_message($user2->id, $message['id']);
\core_message\api::delete_message($user2->id, $im4);
$messages = core_message_external::get_messages($user2->id, $user3->id, 'conversations', true, true, 0, 0);
$messages = core_message_external::get_messages($user2->id, $user3->id, 'conversations', MESSAGE_GET_UNREAD, true, 0, 0);
$messages = external_api::clean_returnvalue(core_message_external::get_messages_returns(), $messages);
$this->assertCount(0, $messages['messages']);
$this->setUser($user3);
// Get read notifications received by user3.
$messages = core_message_external::get_messages($user3->id, 0, 'notifications', true, true, 0, 0);
// Get unread notifications received by user3.
$messages = core_message_external::get_messages($user3->id, 0, 'notifications', MESSAGE_GET_UNREAD, true, 0, 0);
$messages = external_api::clean_returnvalue(core_message_external::get_messages_returns(), $messages);
$this->assertCount(0, $messages['messages']);
......@@ -1445,33 +1449,33 @@ class core_message_externallib_testcase extends externallib_advanced_testcase {
message_send($eventdata);
$this->setUser($user1);
// Get read notifications from any user to user1.
$messages = core_message_external::get_messages($user1->id, 0, 'notifications', true, true, 0, 0);
// Get unread notifications from any user to user1.
$messages = core_message_external::get_messages($user1->id, 0, 'notifications', MESSAGE_GET_UNREAD, true, 0, 0);
$messages = external_api::clean_returnvalue(core_message_external::get_messages_returns(), $messages);
$this->assertCount(3, $messages['messages']);
// Get one read notifications from any user to user1.
$messages = core_message_external::get_messages($user1->id, 0, 'notifications', true, true, 0, 1);
// Get one unread notifications from any user to user1.
$messages = core_message_external::get_messages($user1->id, 0, 'notifications', MESSAGE_GET_UNREAD, true, 0, 1);
$messages = external_api::clean_returnvalue(core_message_external::get_messages_returns(), $messages);
$this->assertCount(1, $messages['messages']);
// Get unread notifications from any user to user1.
$messages = core_message_external::get_messages($user1->id, 0, 'notifications', false, true, 0, 0);
// Get read notifications from any user to user1.
$messages = core_message_external::get_messages($user1->id, 0, 'notifications', MESSAGE_GET_READ, true, 0, 0);
$messages = external_api::clean_returnvalue(core_message_external::get_messages_returns(), $messages);
$this->assertCount(0, $messages['messages']);
// Get read both type of messages from any user to user1.
$messages = core_message_external::get_messages($user1->id, 0, 'both', true, true, 0, 0);
// Get unread both type of messages from any user to user1.
$messages = core_message_external::get_messages($user1->id, 0, 'both', MESSAGE_GET_UNREAD, true, 0, 0);
$messages = external_api::clean_returnvalue(core_message_external::get_messages_returns(), $messages);
$this->assertCount(4, $messages['messages']);
// Get read notifications from no-reply-user to user1.
$messages = core_message_external::get_messages($user1->id, $userfrom->id, 'notifications', true, true, 0, 0);
// Get unread notifications from no-reply-user to user1.
$messages = core_message_external::get_messages($user1->id, $userfrom->id, 'notifications', MESSAGE_GET_UNREAD, true, 0, 0);
$messages = external_api::clean_returnvalue(core_message_external::get_messages_returns(), $messages);
$this->assertCount(1, $messages['messages']);
// Get notifications send by user1 to any user.
$messages = core_message_external::get_messages(0, $user1->id, 'notifications', true, true, 0, 0);
$messages = core_message_external::get_messages(0, $user1->id, 'notifications', MESSAGE_GET_UNREAD, true, 0, 0);
$messages = external_api::clean_returnvalue(core_message_external::get_messages_returns(), $messages);
$this->assertCount(1, $messages['messages']);
// Check we receive custom data as a unserialisable json.
......@@ -1482,7 +1486,7 @@ class core_message_externallib_testcase extends externallib_advanced_testcase {
// Test warnings.
$CFG->messaging = 0;
$messages = core_message_external::get_messages(0, $user1->id, 'both', true, true, 0, 0);
$messages = core_message_external::get_messages(0, $user1->id, 'both', MESSAGE_GET_UNREAD, true, 0, 0);
$messages = external_api::clean_returnvalue(core_message_external::get_messages_returns(), $messages);
$this->assertCount(1, $messages['warnings']);
......@@ -1490,7 +1494,7 @@ class core_message_externallib_testcase extends externallib_advanced_testcase {
// Messaging disabled.
try {
$messages = core_message_external::get_messages(0, $user1->id, 'conversations', true, true, 0, 0);
$messages = core_message_external::get_messages(0, $user1->id, 'conversations', MESSAGE_GET_UNREAD, true, 0, 0);
$this->fail('Exception expected due messaging disabled.');
} catch (moodle_exception $e) {
$this->assertEquals('disabled', $e->errorcode);
......@@ -1500,7 +1504,7 @@ class core_message_externallib_testcase extends externallib_advanced_testcase {
// Invalid users.
try {
$messages = core_message_external::get_messages(0, 0, 'conversations', true, true, 0, 0);
$messages = core_message_external::get_messages(0, 0, 'conversations', MESSAGE_GET_UNREAD, true, 0, 0);
$this->fail('Exception expected due invalid users.');
} catch (moodle_exception $e) {
$this->assertEquals('accessdenied', $e->errorcode);
......@@ -1508,7 +1512,7 @@ class core_message_externallib_testcase extends externallib_advanced_testcase {
// Invalid user ids.
try {
$messages = core_message_external::get_messages(2500, 0, 'conversations', true, true, 0, 0);
$messages = core_message_external::get_messages(2500, 0, 'conversations', MESSAGE_GET_UNREAD, true, 0, 0);
$this->fail('Exception expected due invalid users.');
} catch (moodle_exception $e) {
$this->assertEquals('invaliduser', $e->errorcode);
......@@ -1517,7 +1521,7 @@ class core_message_externallib_testcase extends externallib_advanced_testcase {
// Invalid users (permissions).
$this->setUser($user2);
try {
$messages = core_message_external::get_messages(0, $user1->id, 'conversations', true, true, 0, 0);
$messages = core_message_external::get_messages(0, $user1->id, 'conversations', MESSAGE_GET_UNREAD, true, 0, 0);
$this->fail('Exception expected due invalid user.');
} catch (moodle_exception $e) {
$this->assertEquals('accessdenied', $e->errorcode);
......@@ -1542,7 +1546,7 @@ class core_message_externallib_testcase extends externallib_advanced_testcase {
$this->send_message($user1, $user3, 'some random text 2', 0, 2);
// Get messages sent from user 1.
$messages = core_message_external::get_messages(0, $user1->id, 'conversations', false, false, 0, 0);
$messages = core_message_external::get_messages(0, $user1->id, 'conversations', MESSAGE_GET_UNREAD, false, 0, 0);
$messages = external_api::clean_returnvalue(core_message_external::get_messages_returns(), $messages);
// Confirm the data is correct.
......@@ -1576,7 +1580,7 @@ class core_message_externallib_testcase extends externallib_advanced_testcase {
$this->send_message($user3, $user1, 'some random text 2', 0, 2);
// Get messages sent to user 1.
$messages = core_message_external::get_messages($user1->id, 0, 'conversations', false, false, 0, 0);
$messages = core_message_external::get_messages($user1->id, 0, 'conversations', MESSAGE_GET_UNREAD, false, 0, 0);
$messages = external_api::clean_returnvalue(core_message_external::get_messages_returns(), $messages);
// Confirm the data is correct.
......@@ -1660,7 +1664,7 @@ class core_message_externallib_testcase extends externallib_advanced_testcase {
$this->send_message($user3, $user2, 'How you goin?');
// Retrieve all messages sent by user2 (they are currently unread).
$lastmessages = message_get_messages($user1->id, $user2->id, 0, false);
$lastmessages = message_get_messages($user1->id, $user2->id, 0, MESSAGE_GET_UNREAD);
$messageids = array();
foreach ($lastmessages as $m) {
......@@ -1669,13 +1673,13 @@ class core_message_externallib_testcase extends externallib_advanced_testcase {
}
// Retrieve all messages sent (they are currently read).
$lastmessages = message_get_messages($user1->id, $user2->id, 0, true);
$lastmessages = message_get_messages($user1->id, $user2->id, 0, MESSAGE_GET_READ);
$this->assertCount(2, $lastmessages);
$this->assertArrayHasKey($messageids[0]['messageid'], $lastmessages);
$this->assertArrayHasKey($messageids[1]['messageid'], $lastmessages);
// Retrieve all messages sent by any user (that are currently unread).
$lastmessages = message_get_messages($user1->id, 0, 0, false);
$lastmessages = message_get_messages($user1->id, 0, 0, MESSAGE_GET_UNREAD);
$this->assertCount(1, $lastmessages);
// Invalid message ids.
......@@ -1687,7 +1691,7 @@ class core_message_externallib_testcase extends externallib_advanced_testcase {
}
// A message to a different user.
$lastmessages = message_get_messages($user2->id, $user3->id, 0, false);
$lastmessages = message_get_messages($user2->id, $user3->id, 0, MESSAGE_GET_UNREAD);
$messageid = array_pop($lastmessages)->id;
try {
$messageid = core_message_external::mark_message_read($messageid, time());
......@@ -1719,7 +1723,7 @@ class core_message_externallib_testcase extends externallib_advanced_testcase {
$this->send_message($user3, $user2, 'How you goin?', 1);
// Retrieve all notifications sent by user2 (they are currently unread).
$lastnotifications = message_get_messages($user1->id, $user2->id, 1, false);
$lastnotifications = message_get_messages($user1->id, $user2->id, 1, MESSAGE_GET_UNREAD);
$notificationids = array();
foreach ($lastnotifications as $n) {
......@@ -1729,13 +1733,13 @@ class core_message_externallib_testcase extends externallib_advanced_testcase {
}
// Retrieve all notifications sent (they are currently read).
$lastnotifications = message_get_messages($user1->id, $user2->id, 1, true);
$lastnotifications = message_get_messages($user1->id, $user2->id, 1, MESSAGE_GET_READ);
$this->assertCount(2, $lastnotifications);
$this->assertArrayHasKey($notificationids[1]['notificationid'], $lastnotifications);
$this->assertArrayHasKey($notificationids[0]['notificationid'], $lastnotifications);
// Retrieve all notifications sent by any user (that are currently unread).
$lastnotifications = message_get_messages($user1->id, 0, 1, false);
$lastnotifications = message_get_messages($user1->id, 0, 1, MESSAGE_GET_UNREAD);
$this->assertCount(1, $lastnotifications);
// Invalid notification ids.
......@@ -1747,7 +1751,7 @@ class core_message_externallib_testcase extends externallib_advanced_testcase {
}
// A notification to a different user.
$lastnotifications = message_get_messages($user2->id, $user3->id, 1, false);
$lastnotifications = message_get_messages($user2->id, $user3->id, 1, MESSAGE_GET_UNREAD);
$notificationid = array_pop($lastnotifications)->id;
try {
$notificationid = core_message_external::mark_notification_read($notificationid, time());
......@@ -1781,7 +1785,7 @@ class core_message_externallib_testcase extends externallib_advanced_testcase {
$m3to4 = message_post_message($user3, $user4, 'some random text 4', FORMAT_MOODLE);
// Retrieve all messages sent by user2 (they are currently unread).
$lastmessages = message_get_messages($user1->id, $user2->id, 0, false);
$lastmessages = message_get_messages($user1->id, $user2->id, 0, MESSAGE_GET_UNREAD);
// Delete a message not read, as a user from.
$result = core_message_external::delete_message($m1to2, $user1->id, false);
......
......@@ -263,6 +263,8 @@ class core_message_messagelib_testcase extends advanced_testcase {
* Test message_get_messages.
*/
public function test_message_get_messages() {
global $DB;
$this->resetAfterTest(true);
// Set this user as the admin.
......@@ -287,12 +289,35 @@ class core_message_messagelib_testcase extends advanced_testcase {
$im3 = testhelper::send_fake_message_to_conversation($user1, $ic1->id, 'Message 3');
$im4 = testhelper::send_fake_message_to_conversation($user1, $ic2->id, 'Message 4');
// Retrieve all messages sent from user1 to user2.
$lastmessages = message_get_messages($user2->id, $user1->id, 0, false);
// Mark a message as read by user2.
$message = $DB->get_record('messages', ['id' => $im1]);
\core_message\api::mark_message_as_read($user2->id, $message);
// Retrieve unread messages sent from user1 to user2.
$lastmessages = message_get_messages($user2->id, $user1->id, 0, MESSAGE_GET_UNREAD);
$this->assertCount(1, $lastmessages);
$this->assertArrayHasKey($im3, $lastmessages);
// Get only read messages.
$lastmessages = message_get_messages($user2->id, $user1->id, 0, MESSAGE_GET_READ);
$this->assertCount(1, $lastmessages);
$this->assertArrayHasKey($im1, $lastmessages);
// Get both read and unread.
$lastmessages = message_get_messages($user2->id, $user1->id, 0, MESSAGE_GET_READ_AND_UNREAD);
$this->assertCount(2, $lastmessages);
$this->assertArrayHasKey($im1, $lastmessages);
$this->assertArrayHasKey($im3, $lastmessages);
// Repeat retrieve read/unread messages but using a bool to test backwards compatibility.
$lastmessages = message_get_messages($user2->id, $user1->id, 0, false);
$this->assertCount(1, $lastmessages);
$this->assertArrayHasKey($im3, $lastmessages);
$lastmessages = message_get_messages($user2->id, $user1->id, 0, true);
$this->assertCount(1, $lastmessages);
$this->assertArrayHasKey($im1, $lastmessages);
// Create some group conversations.
$gc1 = \core_message\api::create_conversation(\core_message\api::MESSAGE_CONVERSATION_TYPE_GROUP,
[$user1->id, $user2->id, $user3->id], 'Group chat');
......@@ -302,7 +327,7 @@ class core_message_messagelib_testcase extends advanced_testcase {
// Retrieve all messages sent from user1 to user2 (the result should be the same as before, because only individual
// conversations should be considered by the message_get_messages function).
$lastmessages = message_get_messages($user2->id, $user1->id, 0, false);
$lastmessages = message_get_messages($user2->id, $user1->id, 0, MESSAGE_GET_READ_AND_UNREAD);
$this->assertCount(2, $lastmessages);
$this->assertArrayHasKey($im1, $lastmessages);
$this->assertArrayHasKey($im3, $lastmessages);
......@@ -331,7 +356,7 @@ class core_message_messagelib_testcase extends advanced_testcase {
// Retrieve all messages sent from user1 to user2. There shouldn't be messages, because only individual
// conversations should be considered by the message_get_messages function.
$lastmessages = message_get_messages($user2->id, $user1->id, 0, false);
$lastmessages = message_get_messages($user2->id, $user1->id, 0, MESSAGE_GET_READ_AND_UNREAD);
$this->assertCount(0, $lastmessages);
}
......
......@@ -8,6 +8,7 @@ The following functions have been finally deprecated and can not be used anymore
* get_individual_conversations_between_users()
* The message_jabber notification has been completely removed from core. It has been moved to the plugins database repository, so
it can still be installed as a third-party plugin.
* The type of the parameter $read in the function message_get_messages has changed from boolean to integer. It now accepts either MESSAGE_GET_UNREAD, MESSAGE_GET_READ or MESSAGE_GET_READ_AND_UNREAD.
=== 3.11.2 ===
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment