Skip to content

Commit

Permalink
MDL-63909 core_message: deprecated web services not used in new UI
Browse files Browse the repository at this point in the history
  • Loading branch information
mdjnelson committed Nov 8, 2018
1 parent 308eb72 commit a6049a7
Show file tree
Hide file tree
Showing 3 changed files with 60 additions and 4 deletions.
12 changes: 8 additions & 4 deletions lib/db/services.php
Original file line number Diff line number Diff line change
Expand Up @@ -1037,7 +1037,8 @@
'classname' => 'core_message_external',
'methodname' => 'data_for_messagearea_contacts',
'classpath' => 'message/externallib.php',
'description' => 'Retrieve the template data for the contact list',
'description' => '** DEPRECATED ** Please do not call this function any more.
Retrieve the template data for the contact list',
'type' => 'read',
'ajax' => true,
'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
Expand All @@ -1046,7 +1047,8 @@
'classname' => 'core_message_external',
'methodname' => 'data_for_messagearea_messages',
'classpath' => 'message/externallib.php',
'description' => 'Retrieve the template data for the messages',
'description' => '** DEPRECATED ** Please do not call this function any more.
Retrieve the template data for the messages',
'type' => 'read',
'ajax' => true,
'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
Expand All @@ -1055,15 +1057,17 @@
'classname' => 'core_message_external',
'methodname' => 'data_for_messagearea_get_most_recent_message',
'classpath' => 'message/externallib.php',
'description' => 'Retrieve the template data for the most recent message',
'description' => '** DEPRECATED ** Please do not call this function any more.
Retrieve the template data for the most recent message',
'type' => 'read',
'ajax' => true,
),
'core_message_data_for_messagearea_get_profile' => array(
'classname' => 'core_message_external',
'methodname' => 'data_for_messagearea_get_profile',
'classpath' => 'message/externallib.php',
'description' => 'Retrieve the template data for the users\'s profile',
'description' => '** DEPRECATED ** Please do not call this function any more.
Retrieve the template data for the users\'s profile',
'type' => 'read',
'ajax' => true,
),
Expand Down
48 changes: 48 additions & 0 deletions message/externallib.php
Original file line number Diff line number Diff line change
Expand Up @@ -1590,6 +1590,7 @@ public static function data_for_messagearea_conversations_is_deprecated() {
/**
* The messagearea contacts return parameters.
*
* @deprecated since 3.6
* @return external_function_parameters
* @since 3.2
*/
Expand All @@ -1600,6 +1601,7 @@ public static function data_for_messagearea_contacts_parameters() {
/**
* Get messagearea contacts parameters.
*
* @deprecated since 3.6
* @param int $userid The id of the user who we are viewing conversations for
* @param int $limitfrom
* @param int $limitnum
Expand Down Expand Up @@ -1639,16 +1641,27 @@ public static function data_for_messagearea_contacts($userid, $limitfrom = 0, $l
/**
* The messagearea contacts return structure.
*
* @deprecated since 3.6
* @return external_single_structure
* @since 3.2
*/
public static function data_for_messagearea_contacts_returns() {
return self::data_for_messagearea_conversations_returns();
}

/**
* Marking the method as deprecated.
*
* @return bool
*/
public static function data_for_messagearea_contacts_is_deprecated() {
return true;
}

/**
* The messagearea messages parameters.
*
* @deprecated since 3.6
* @return external_function_parameters
* @since 3.2
*/
Expand All @@ -1669,6 +1682,7 @@ public static function data_for_messagearea_messages_parameters() {
/**
* Get messagearea messages.
*
* @deprecated since 3.6
* @param int $currentuserid The current user's id
* @param int $otheruserid The other user's id
* @param int $limitfrom
Expand Down Expand Up @@ -1741,6 +1755,7 @@ public static function data_for_messagearea_messages($currentuserid, $otheruseri
/**
* The messagearea messages return structure.
*
* @deprecated since 3.6
* @return external_single_structure
* @since 3.2
*/
Expand All @@ -1762,6 +1777,15 @@ public static function data_for_messagearea_messages_returns() {
);
}

/**
* Marking the method as deprecated.
*
* @return bool
*/
public static function data_for_messagearea_messages_is_deprecated() {
return true;
}

/**
* The conversation messages parameters.
*
Expand Down Expand Up @@ -1867,6 +1891,7 @@ public static function get_conversation_messages_returns() {
/**
* The get most recent message return parameters.
*
* @deprecated since 3.6
* @return external_function_parameters
* @since 3.2
*/
Expand All @@ -1882,6 +1907,7 @@ public static function data_for_messagearea_get_most_recent_message_parameters()
/**
* Get the most recent message in a conversation.
*
* @deprecated since 3.6
* @param int $currentuserid The current user's id
* @param int $otheruserid The other user's id
* @return stdClass
Expand Down Expand Up @@ -1919,16 +1945,27 @@ public static function data_for_messagearea_get_most_recent_message($currentuser
/**
* The get most recent message return structure.
*
* @deprecated since 3.6
* @return external_single_structure
* @since 3.2
*/
public static function data_for_messagearea_get_most_recent_message_returns() {
return self::get_messagearea_message_structure();
}

/**
* Marking the method as deprecated.
*
* @return bool
*/
public static function data_for_messagearea_get_most_recent_message_is_deprecated() {
return true;
}

/**
* The get profile parameters.
*
* @deprecated since 3.6
* @return external_function_parameters
* @since 3.2
*/
Expand All @@ -1944,6 +1981,7 @@ public static function data_for_messagearea_get_profile_parameters() {
/**
* Get the profile information for a contact.
*
* @deprecated since 3.6
* @param int $currentuserid The current user's id
* @param int $otheruserid The id of the user whose profile we are viewing
* @return stdClass
Expand Down Expand Up @@ -1981,6 +2019,7 @@ public static function data_for_messagearea_get_profile($currentuserid, $otherus
/**
* The get profile return structure.
*
* @deprecated since 3.6
* @return external_single_structure
* @since 3.2
*/
Expand All @@ -2002,6 +2041,15 @@ public static function data_for_messagearea_get_profile_returns() {
);
}

/**
* Marking the method as deprecated.
*
* @return bool
*/
public static function data_for_messagearea_get_profile_is_deprecated() {
return true;
}

/**
* Get contacts parameters description.
*
Expand Down
4 changes: 4 additions & 0 deletions message/upgrade.txt
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@ information provided here is intended especially for developers.
- core_message_external::data_for_messagearea_search_users_in_course().
- core_message_external::data_for_messagearea_search_users(),
please use core_message_external::message_search_users() instead.
- core_message_external::data_for_messagearea_contacts().
- core_message_external::data_for_messagearea_messages().
- core_message_external::data_for_messagearea_get_most_recent_message().
- core_message_external::data_for_messagearea_get_profile().
* The following function has been added for getting the privacy messaging preference:
- get_user_privacy_messaging_preference()

Expand Down

0 comments on commit a6049a7

Please sign in to comment.