MDL-44064 editor_atto: Do not die when a plugin is missing

This commit is contained in:
Frederic Massart 2014-02-10 17:37:31 +08:00 committed by Damyon Wiese
parent 34f5867a11
commit 60a051d471

View File

@ -98,6 +98,12 @@ class atto_texteditor extends texteditor {
foreach ($groups as $group => $plugins) {
$groupplugins = array();
foreach ($plugins as $plugin) {
// Do not die on missing plugin.
if (!core_component::get_component_directory('atto_' . $plugin)) {
debugging('Missing atto plugin ' . $plugin, DEBUG_DEVELOPER);
continue;
}
$jsplugin = array();
$jsplugin['name'] = $plugin;
$jsplugin['params'] = array();