Merge branch 'MDL-45298-master' of git://github.com/FMCorz/moodle
authorDan Poltawski <dan@moodle.com>
Wed, 30 Apr 2014 06:15:40 +0000 (14:15 +0800)
committerDan Poltawski <dan@moodle.com>
Wed, 30 Apr 2014 06:15:40 +0000 (14:15 +0800)
lib/db/upgrade.php

index 4443c9b..2f244ee 100644 (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.