Commit 6d4afa2f authored by Dries's avatar Dries

- Patch #332266 by mr.baileys, Dave Reid, cwgordon7: fixed broken SQL query in actions code.

parent 7feb58e5
......@@ -285,12 +285,8 @@ function actions_synchronize($delete_orphans = FALSE) {
$orphaned = array_keys($actions_in_db);
if ($delete_orphans) {
$results = db_select('actions')
->addField('actions', 'aid')
->addField('actions', 'description')
->condition('callback', $orphaned, 'IN')
->execute();
foreach ($results as $action) {
$actions = db_query('SELECT aid, description FROM {actions} WHERE callback IN (:orphaned)', array(':orphaned' => $orphaned))->fetchAll();
foreach ($actions as $action) {
actions_delete($action->aid);
watchdog('actions', "Removed orphaned action '%action' from database.", array('%action' => filter_xss_admin($action->description)));
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment