MDL-45298 theme: More permissive usage of retired themes settings

This commit is contained in:
Frederic Massart
2014-04-28 16:27:33 +08:00
parent 254402dbbe
commit c56f0f4a2c
-12
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.