mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 00:46:50 +02:00
MDL-25290 conversion: Converted config to use MUC
This commit is contained in:
parent
9da506c2a3
commit
007bfe8b4d
6 changed files with 76 additions and 57 deletions
|
@ -284,6 +284,7 @@ function message_update_providers($component='moodle') {
|
|||
$DB->delete_records('message_providers', array('id' => $dbprovider->id));
|
||||
$DB->delete_records_select('config_plugins', "plugin = 'message' AND ".$DB->sql_like('name', '?', false), array("%_provider_{$component}_{$dbprovider->name}_%"));
|
||||
$DB->delete_records_select('user_preferences', $DB->sql_like('name', '?', false), array("message_provider_{$component}_{$dbprovider->name}_%"));
|
||||
cache_helper::invalidate_by_definition('core', 'config', array(), 'message');
|
||||
}
|
||||
|
||||
return true;
|
||||
|
@ -574,6 +575,8 @@ function message_provider_uninstall($component) {
|
|||
$DB->delete_records_select('config_plugins', "plugin = 'message' AND ".$DB->sql_like('name', '?', false), array("%_provider_{$component}_%"));
|
||||
$DB->delete_records_select('user_preferences', $DB->sql_like('name', '?', false), array("message_provider_{$component}_%"));
|
||||
$transaction->allow_commit();
|
||||
// Purge all messaging settings from the caches. They are stored by plugin so we have to clear all message settings.
|
||||
cache_helper::invalidate_by_definition('core', 'config', array(), 'message');
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -591,4 +594,6 @@ function message_processor_uninstall($name) {
|
|||
// defaults, they will be removed on the next attempt to update the preferences
|
||||
$DB->delete_records_select('config_plugins', "plugin = 'message' AND ".$DB->sql_like('name', '?', false), array("{$name}_provider_%"));
|
||||
$transaction->allow_commit();
|
||||
// Purge all messaging settings from the caches. They are stored by plugin so we have to clear all message settings.
|
||||
cache_helper::invalidate_by_definition('core', 'config', array(), array('message', "message_{$name}"));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue