MDL-41437 fix plugin install issues

This patch prevents inclusion of settings from plugin that or not yet installed or upgraded,
this matches the original logic where we were using the modules table.
This commit is contained in:
Petr Škoda
2013-09-24 22:43:46 +02:00
parent 161f995849
commit 394372b7da
4 changed files with 63 additions and 0 deletions
+4
View File
@@ -6419,8 +6419,10 @@ function admin_get_root($reload=false, $requirefulltree=true) {
*/
function admin_apply_default_settings($node=NULL, $unconditional=true) {
global $CFG;
require_once($CFG->libdir.'/pluginlib.php');
if (is_null($node)) {
plugin_manager::reset_caches();
$node = admin_get_root(true, true);
}
@@ -6445,6 +6447,8 @@ function admin_apply_default_settings($node=NULL, $unconditional=true) {
$setting->write_setting_flags(null);
}
}
// Just in case somebody modifies the list of active plugins directly.
plugin_manager::reset_caches();
}
/**