MDL-54892 core: Pass proper parameter for plugin uninstall queries

This commit is contained in:
Tobias Reischmann
2016-06-21 09:14:48 +02:00
parent 0563e83290
commit e23d29dc91
+3 -3
View File
@@ -199,14 +199,14 @@ function uninstall_plugin($type, $name) {
$DB->delete_records('event', array('modulename' => $pluginname));
// Delete scheduled tasks.
$DB->delete_records('task_scheduled', array('component' => $pluginname));
$DB->delete_records('task_scheduled', array('component' => $component));
// Delete Inbound Message datakeys.
$DB->delete_records_select('messageinbound_datakeys',
'handler IN (SELECT id FROM {messageinbound_handlers} WHERE component = ?)', array($pluginname));
'handler IN (SELECT id FROM {messageinbound_handlers} WHERE component = ?)', array($component));
// Delete Inbound Message handlers.
$DB->delete_records('messageinbound_handlers', array('component' => $pluginname));
$DB->delete_records('messageinbound_handlers', array('component' => $component));
// delete all the logs
$DB->delete_records('log', array('module' => $pluginname));