MDL-10107 Fixed the definition of message providers ... it now works through files very similar to those for events and capabilities, which makes them easy to add/remove/change as necessary

This commit is contained in:
moodler
2008-07-31 08:01:46 +00:00
parent e70e036c9f
commit 120b375891
26 changed files with 4452 additions and 2310 deletions
+12
View File
@@ -1310,7 +1310,13 @@ function upgrade_blocks_plugins($continueto) {
print_error('nopermissiontoupdateblock', '', '', $block->name);
}
// Update events
events_update_definition($component);
// Update message providers
require_once($CFG->libdir .'/messagelib.php'); // Messagelib functions
message_update_providers($component);
notify(get_string('blocksuccess', '', $blocktitle), 'notifysuccess');
} else {
notify('Upgrading block '. $block->name .' from '. $currblock->version .' to '. $block->version .' FAILED!');
@@ -1378,7 +1384,13 @@ function upgrade_blocks_plugins($continueto) {
notify('Could not set up '.$block->name.' capabilities!');
}
// Update events
events_update_definition($component);
// Update message providers
require_once($CFG->libdir .'/messagelib.php'); // Messagelib functions
message_update_providers($component);
notify(get_string('blocksuccess', '', $blocktitle), 'notifysuccess');
if (!defined('CLI_UPGRADE')|| !CLI_UPGRADE) {
echo '<hr />';