mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 22:08:20 +01:00
MDL-63211 core: deprecated events for blocking/unblocking contacts
The message_contact_blocked and message_contact_unblocked events were deprecated. The reason being that you will be able to block and unblock any user, regardless if they are a contact or not. This information is also now stored in a separate DB table.
This commit is contained in:
parent
b65bfc8ab4
commit
b393296311
@ -135,3 +135,5 @@ keepsearching,core
|
||||
allfieldsrequired,core
|
||||
previewhtml,core
|
||||
messagedselecteduserfailed,core
|
||||
eventmessagecontactblocked,core_message
|
||||
eventmessagecontactunblocked,core_message
|
||||
|
@ -48,9 +48,7 @@ $string['errortranslatingdefault'] = 'Error translating default setting provided
|
||||
$string['eventnotificationviewed'] = 'Notification viewed';
|
||||
$string['eventnotificationsent'] = 'Notification sent';
|
||||
$string['eventmessagecontactadded'] = 'Message contact added';
|
||||
$string['eventmessagecontactblocked'] = 'Message contact blocked';
|
||||
$string['eventmessagecontactremoved'] = 'Message contact removed';
|
||||
$string['eventmessagecontactunblocked'] = 'Message contact unblocked';
|
||||
$string['eventmessagedeleted'] = 'Message deleted';
|
||||
$string['eventmessageviewed'] = 'Message viewed';
|
||||
$string['eventmessagesent'] = 'Message sent';
|
||||
@ -180,4 +178,6 @@ $string['writeamessage'] = 'Write a message...';
|
||||
$string['you'] = 'You:';
|
||||
|
||||
// Deprecated since Moodle 3.6.
|
||||
$string['eventmessagecontactblocked'] = 'Message contact blocked';
|
||||
$string['eventmessagecontactunblocked'] = 'Message contact unblocked';
|
||||
$string['messagingdisabled'] = 'Messaging is disabled on this site, emails will be sent instead';
|
||||
|
@ -26,6 +26,9 @@ namespace core\event;
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
debugging('core\\event\\message_contact_blocked has been deprecated. Please use
|
||||
core\\event\\message_user_blocked instead', DEBUG_DEVELOPER);
|
||||
|
||||
/**
|
||||
* Message contact blocked event class.
|
||||
*
|
||||
@ -99,4 +102,13 @@ class message_contact_blocked extends base {
|
||||
// Messaging contacts are not backed up, so no need to map them on restore.
|
||||
return array('db' => 'message_contacts', 'restore' => base::NOT_MAPPED);
|
||||
}
|
||||
|
||||
/**
|
||||
* This event has been deprecated.
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public static function is_deprecated() {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@ -26,6 +26,9 @@ namespace core\event;
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
debugging('core\\event\\message_contact_unblocked has been deperecated. Please use
|
||||
core\\event\\message_user_unblocked instead', DEBUG_DEVELOPER);
|
||||
|
||||
/**
|
||||
* Message contact unblocked event class.
|
||||
*
|
||||
@ -99,4 +102,13 @@ class message_contact_unblocked extends base {
|
||||
// Messaging contacts are not backed up, so no need to map them on restore.
|
||||
return array('db' => 'message_contacts', 'restore' => base::NOT_MAPPED);
|
||||
}
|
||||
|
||||
/**
|
||||
* This event has been deprecated.
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public static function is_deprecated() {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user