Commit 54ec7b98 authored by Aaron Wells's avatar Aaron Wells Committed by Robert Lyon

Don't call the module bootstrap code during install/upgrade

Bug 547932: The module bootstrap code relies on the existence of the
module_installed table, which isn't present until after you upgrade.

Change-Id: I34075dec8e4d8671b71b3023774b44343a5d50ca
parent fc9ee332
......@@ -399,11 +399,15 @@ else {
}
// Run modules bootstrap code.
if (get_config('installed')) {
if ($plugins = plugins_installed('module')) {
foreach ($plugins as &$plugin) {
if (safe_require_plugin('module', $plugin->name)) {
call_static_method(generate_class_name('module', $plugin->name), 'bootstrap');
if (!defined('INSTALLER')) {
// make sure the table exists if upgrading from older version
require_once('ddl.php');
if (table_exists(new XMLDBTable('module_installed'))) {
if ($plugins = plugins_installed('module')) {
foreach ($plugins as &$plugin) {
if (safe_require_plugin('module', $plugin->name)) {
call_static_method(generate_class_name('module', $plugin->name), 'bootstrap');
}
}
}
}
......
......@@ -1548,8 +1548,10 @@ function plugins_installed($plugintype, $all=false) {
}
}
}
return $records[$plugintype][$all];
if (isset($records[$plugintype])) {
return $records[$plugintype][$all];
}
return false;
}
/**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment