summaryrefslogtreecommitdiff
path: root/includes/actions.inc
diff options
context:
space:
mode:
Diffstat (limited to 'includes/actions.inc')
-rw-r--r--includes/actions.inc8
1 files changed, 2 insertions, 6 deletions
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)));
}