Merge branch 'MDL-45298-master' of git://github.com/FMCorz/moodle

This commit is contained in:
Dan Poltawski 2014-04-30 14:15:40 +08:00
commit 4df8bbfc87

View File

@ -3205,13 +3205,6 @@ function xmldb_main_upgrade($oldversion) {
// Check we actually have themes to remove.
if (count($themes) > 0) {
list($insql, $inparams) = $DB->get_in_or_equal($themes, SQL_PARAMS_NAMED);
// Replace the theme usage.
$DB->set_field_select('course', 'theme', 'clean', "theme $insql", $inparams);
$DB->set_field_select('course_categories', 'theme', 'clean', "theme $insql", $inparams);
$DB->set_field_select('user', 'theme', 'clean', "theme $insql", $inparams);
$DB->set_field_select('mnet_host', 'theme', 'clean', "theme $insql", $inparams);
// Replace the theme configs.
if (in_array(get_config('core', 'theme'), $themes)) {
@ -3226,11 +3219,6 @@ function xmldb_main_upgrade($oldversion) {
if (in_array(get_config('core', 'themetablet'), $themes)) {
set_config('themetablet', 'clean');
}
// Hacky emulation of plugin uninstallation.
foreach ($themes as $theme) {
unset_all_config_for_plugin('theme_' . $theme);
}
}
// Main savepoint reached.