summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDries Buytaert2009-03-18 09:50:46 (GMT)
committerDries Buytaert2009-03-18 09:50:46 (GMT)
commit6d4afa2f1610c32d03b2dc7bab7c972f706f5553 (patch)
treeee0f1b42c15b14a23a5fb663f08f1e0ef67d39ca
parent7feb58e5a6680de521306c61cf27eb7226fb09d1 (diff)
- Patch #332266 by mr.baileys, Dave Reid, cwgordon7: fixed broken SQL query in actions code.
-rw-r--r--includes/actions.inc8
1 files changed, 2 insertions, 6 deletions
diff --git a/includes/actions.inc b/includes/actions.inc
index 90c162b..7c7e301 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)));
}