From 6d4afa2f1610c32d03b2dc7bab7c972f706f5553 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Wed, 18 Mar 2009 09:50:46 +0000 Subject: - Patch #332266 by mr.baileys, Dave Reid, cwgordon7: fixed broken SQL query in actions code. --- includes/actions.inc | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'includes/actions.inc') diff --git a/includes/actions.inc b/includes/actions.inc index 90c162b6c..7c7e301e6 100644 --- a/includes/actions.inc +++ b/includes/actions.inc @@ -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))); } -- cgit v1.2.3