From 7ece4ca9dac35bdad92ce7fc9550b0cd282fdc80 Mon Sep 17 00:00:00 2001 From: Mark Nelson Date: Wed, 5 Dec 2018 11:17:19 +0800 Subject: [PATCH] MDL-63915 core_message: mark items that can be removed in MDL-63261 --- message/classes/api.php | 38 +++++++++---------- message/classes/helper.php | 16 +++++--- .../classes/output/messagearea/contact.php | 3 ++ .../classes/output/messagearea/contacts.php | 3 ++ .../classes/output/messagearea/message.php | 3 ++ .../output/messagearea/message_area.php | 3 ++ .../classes/output/messagearea/messages.php | 3 ++ .../classes/output/messagearea/profile.php | 3 ++ .../messagearea/user_search_results.php | 3 ++ message/externallib.php | 8 ---- 10 files changed, 49 insertions(+), 34 deletions(-) diff --git a/message/classes/api.php b/message/classes/api.php index a53f6b7d05c40..b581931c2924a 100644 --- a/message/classes/api.php +++ b/message/classes/api.php @@ -151,10 +151,9 @@ public static function search_messages($userid, $search, $limitfrom = 0, $limitn /** * Handles searching for user in a particular course in the message area. * - * TODO: This function should be removed once the new group messaging UI is in place and the old messaging UI is removed. - * For now we are not removing/deprecating this function for backwards compatibility with messaging UI. - * But we are deprecating data_for_messagearea_search_users_in_course external function. - * Followup: MDL-63915 + * TODO: This function should be removed once the related web service goes through final deprecation. + * The related web service is data_for_messagearea_search_users_in_course. + * Followup: MDL-63261 * * @param int $userid The user id doing the searching * @param int $courseid The id of the course we are searching in @@ -197,10 +196,9 @@ public static function search_users_in_course($userid, $courseid, $search, $limi /** * Handles searching for user in the message area. * - * TODO: This function should be removed once the new group messaging UI is in place and the old messaging UI is removed. - * For now we are not removing/deprecating this function for backwards compatibility with messaging UI. - * But we are deprecating data_for_messagearea_search_users external function. - * Followup: MDL-63915 + * TODO: This function should be removed once the related web service goes through final deprecation. + * The related web service is data_for_messagearea_search_users. + * Followup: MDL-63261 * * @param int $userid The user id doing the searching * @param string $search The string the user is searching @@ -1022,9 +1020,9 @@ public static function unset_favourite_conversation(int $conversationid, int $us /** * Returns the contacts to display in the contacts area. * - * TODO: This function should be removed once the new group messaging UI is in place and the old messaging UI is removed. - * For now we are not removing/deprecating this function for backwards compatibility with messaging UI. - * Followup: MDL-63915 + * TODO: This function should be removed once the related web service goes through final deprecation. + * The related web service is data_for_messagearea_contacts. + * Followup: MDL-63261 * * @param int $userid The user id * @param int $limitfrom @@ -1192,9 +1190,9 @@ public static function get_non_contacts_with_unread_message_count($userid, $limi /** * Returns the messages to display in the message area. * - * TODO: This function should be removed once the new group messaging UI is in place and the old messaging UI is removed. - * For now we are not removing/deprecating this function for backwards compatibility with messaging UI. - * Followup: MDL-63915 + * TODO: This function should be removed once the related web service goes through final deprecation. + * The related web service is data_for_messagearea_messages. + * Followup: MDL-63261 * * @param int $userid the current user * @param int $otheruserid the other user @@ -1273,9 +1271,9 @@ public static function get_conversation_messages(int $userid, int $convid, int $ /** * Returns the most recent message between two users. * - * TODO: This function should be removed once the new group messaging UI is in place and the old messaging UI is removed. - * For now we are not removing/deprecating this function for backwards compatibility with messaging UI. - * Followup: MDL-63915 + * TODO: This function should be removed once the related web service goes through final deprecation. + * The related web service is data_for_messagearea_get_most_recent_message. + * Followup: MDL-63261 * * @param int $userid the current user * @param int $otheruserid the other user @@ -1318,9 +1316,9 @@ public static function get_most_recent_conversation_message(int $convid, int $cu /** * Returns the profile information for a contact for a user. * - * TODO: This function should be removed once the new group messaging UI is in place and the old messaging UI is removed. - * For now we are not removing/deprecating this function for backwards compatibility with messaging UI. - * Followup: MDL-63915 + * TODO: This function should be removed once the related web service goes through final deprecation. + * The related web service is data_for_messagearea_get_profile. + * Followup: MDL-63261 * * @param int $userid The user id * @param int $otheruserid The id of the user whose profile we want to view. diff --git a/message/classes/helper.php b/message/classes/helper.php index 0bbdde7229cec..60d75ca91f24d 100644 --- a/message/classes/helper.php +++ b/message/classes/helper.php @@ -37,9 +37,9 @@ class helper { /** * Helper function to retrieve the messages between two users * - * TODO: This function should be removed once the new group messaging UI is in place and the old messaging UI is removed. - * For now we are not removing/deprecating this function for backwards compatibility with messaging UI. - * Followup: MDL-63915 + * TODO: This function should be removed once the related web services go through final deprecation. + * The related web services are data_for_messagearea_messages AND data_for_messagearea_get_most_recent_message. + * Followup: MDL-63261 * * @param int $userid the current user * @param int $otheruserid the other user @@ -232,9 +232,9 @@ public static function format_conversation_messages(int $userid, int $convid, ar /** * Helper function to return an array of messages. * - * TODO: This function should be removed once the new group messaging UI is in place and the old messaging UI is removed. - * For now we are not removing/deprecating this function for backwards compatibility with messaging UI. - * Followup: MDL-63915 + * TODO: This function should be removed once the related web services go through final deprecation. + * The related web services are data_for_messagearea_messages AND data_for_messagearea_get_most_recent_message. + * Followup: MDL-63261 * * @param int $userid * @param array $messages @@ -604,6 +604,10 @@ public static function get_member_info(int $referenceuserid, array $userids, boo /** * Backwards compatibility formatter, transforming the new output of get_conversations() into the old format. * + * TODO: This function should be removed once the related web services go through final deprecation. + * The related web services are data_for_messagearea_conversations. + * Followup: MDL-63261 + * * @param array $conversations the array of conversations, which must come from get_conversations(). * @return array the array of conversations, formatted in the legacy style. */ diff --git a/message/classes/output/messagearea/contact.php b/message/classes/output/messagearea/contact.php index 364940cd8a840..ab012378cc519 100644 --- a/message/classes/output/messagearea/contact.php +++ b/message/classes/output/messagearea/contact.php @@ -17,6 +17,9 @@ /** * Contains class used to prepare a contact for display. * + * TODO: This file should be removed once the related web services go through final deprecation. + * Followup: MDL-63261 + * * @package core_message * @copyright 2016 Mark Nelson * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later diff --git a/message/classes/output/messagearea/contacts.php b/message/classes/output/messagearea/contacts.php index db276d67492f9..785d9a9941d39 100644 --- a/message/classes/output/messagearea/contacts.php +++ b/message/classes/output/messagearea/contacts.php @@ -17,6 +17,9 @@ /** * Contains class used to prepare the contacts for display. * + * TODO: This file should be removed once the related web services go through final deprecation. + * Followup: MDL-63261 + * * @package core_message * @copyright 2016 Mark Nelson * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later diff --git a/message/classes/output/messagearea/message.php b/message/classes/output/messagearea/message.php index 5fc7e0579d915..93177e050c8b2 100644 --- a/message/classes/output/messagearea/message.php +++ b/message/classes/output/messagearea/message.php @@ -17,6 +17,9 @@ /** * Contains class used to prepare a message for display. * + * TODO: This file should be removed once the related web services go through final deprecation. + * Followup: MDL-63261 + * * @package core_message * @copyright 2016 Mark Nelson * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later diff --git a/message/classes/output/messagearea/message_area.php b/message/classes/output/messagearea/message_area.php index b5cb3bfdec903..9d2e05d72e6bf 100644 --- a/message/classes/output/messagearea/message_area.php +++ b/message/classes/output/messagearea/message_area.php @@ -17,6 +17,9 @@ /** * Contains class used to prepare the message area for display. * + * TODO: This file should be removed once the related web services go through final deprecation. + * Followup: MDL-63261 + * * @package core_message * @copyright 2016 Mark Nelson * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later diff --git a/message/classes/output/messagearea/messages.php b/message/classes/output/messagearea/messages.php index 7d98e7b5593b3..ce8e75ccbf93d 100644 --- a/message/classes/output/messagearea/messages.php +++ b/message/classes/output/messagearea/messages.php @@ -17,6 +17,9 @@ /** * Contains class used to prepare the messages for display. * + * TODO: This file should be removed once the related web services go through final deprecation. + * Followup: MDL-63261 + * * @package core_message * @copyright 2016 Mark Nelson * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later diff --git a/message/classes/output/messagearea/profile.php b/message/classes/output/messagearea/profile.php index cbeb9eeea8b99..151bba1488b83 100644 --- a/message/classes/output/messagearea/profile.php +++ b/message/classes/output/messagearea/profile.php @@ -17,6 +17,9 @@ /** * Contains class used to prepare a profile for display. * + * TODO: This file should be removed once the related web services go through final deprecation. + * Followup: MDL-63261 + * * @package core_message * @copyright 2016 Mark Nelson * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later diff --git a/message/classes/output/messagearea/user_search_results.php b/message/classes/output/messagearea/user_search_results.php index 622c6292f2f04..ac6635880d32f 100644 --- a/message/classes/output/messagearea/user_search_results.php +++ b/message/classes/output/messagearea/user_search_results.php @@ -17,6 +17,9 @@ /** * Contains class used to display user search results. * + * TODO: This file should be removed once the related web services go through final deprecation. + * Followup: MDL-63261 + * * @package core_message * @copyright 2016 Mark Nelson * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later diff --git a/message/externallib.php b/message/externallib.php index 253cd52c2826e..a779b987cd485 100644 --- a/message/externallib.php +++ b/message/externallib.php @@ -1250,10 +1250,6 @@ public static function data_for_messagearea_search_users_in_course_parameters() * * @deprecated since 3.6 * - * NOTE: We are deprecating this function but not search_users_in_course API function for backwards compatibility - * with messaging UI. But should be removed once new group messaging UI is in place and old messaging UI is removed. - * Followup: MDL-63915 - * * @param int $userid The id of the user who is performing the search * @param int $courseid The id of the course * @param string $search The string being searched @@ -1351,10 +1347,6 @@ public static function data_for_messagearea_search_users_parameters() { * * @deprecated since 3.6 * - * NOTE: We are deprecating this function but not search_users API function for backwards compatibility - * with messaging UI. But should be removed once new group messaging UI is in place and old messaging UI is removed. - * Followup: MDL-63915 - * * @param int $userid The id of the user who is performing the search * @param string $search The string being searched * @param int $limitnum