MDL-39087 Purge all caches at the end of uninstall_plugin()
authorDavid Mudrák <david@moodle.com>
Wed, 10 Apr 2013 09:53:21 +0000 (11:53 +0200)
committerDavid Mudrák <david@moodle.com>
Thu, 11 Apr 2013 23:42:58 +0000 (01:42 +0200)
This is necessary now as many plugins management related features
started to use MUC intensively recently. During the development of this
issue, we realized that the plugin was still considered as installed if
caches were not purged.

lib/adminlib.php

index 3156374..89fa8e8 100644 (file)
@@ -321,6 +321,9 @@ function uninstall_plugin($type, $name) {
     // remove event handlers and dequeue pending events
     events_uninstall($component);
 
+    // Finally purge all caches.
+    purge_all_caches();
+
     echo $OUTPUT->notification(get_string('success'), 'notifysuccess');
 }