summaryrefslogtreecommitdiff
path: root/includes/actions.inc
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2009-03-18 09:50:46 +0000
committerDries Buytaert <dries@buytaert.net>2009-03-18 09:50:46 +0000
commit6d4afa2f1610c32d03b2dc7bab7c972f706f5553 (patch)
treeee0f1b42c15b14a23a5fb663f08f1e0ef67d39ca /includes/actions.inc
parent7feb58e5a6680de521306c61cf27eb7226fb09d1 (diff)
downloadbrdo-6d4afa2f1610c32d03b2dc7bab7c972f706f5553.tar.gz
brdo-6d4afa2f1610c32d03b2dc7bab7c972f706f5553.tar.bz2
- Patch #332266 by mr.baileys, Dave Reid, cwgordon7: fixed broken SQL query in actions code.
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)));
}