diff --git a/lib/db/upgrade.php b/lib/db/upgrade.php index 4443c9b3ab6..2f244ee22ce 100644 --- a/lib/db/upgrade.php +++ b/lib/db/upgrade.php @@ -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.