Index: includes/actions.inc =================================================================== RCS file: /cvs/drupal/drupal/includes/actions.inc,v retrieving revision 1.16 diff -u -p -r1.16 actions.inc --- includes/actions.inc 5 Sep 2008 09:29:06 -0000 1.16 +++ includes/actions.inc 13 Sep 2008 14:26:05 -0000 @@ -78,12 +78,16 @@ function actions_do($action_ids, $object foreach ($actions as $action_id => $params) { if (is_numeric($action_id)) { // Configurable actions need parameters. $function = $params['callback']; - $context = array_merge($context, $params); - $result[$action_id] = $function($object, $context, $a1, $a2); + if (drupal_function_exists($function)) { + $context = array_merge($context, $params); + $result[$action_id] = $function($object, $context, $a1, $a2); + } } // Singleton action; $action_id is the function name. else { - $result[$action_id] = $action_id($object, $context, $a1, $a2); + if (drupal_function_exists($action_id)) { + $result[$action_id] = $action_id($object, $context, $a1, $a2); + } } } } @@ -93,12 +97,16 @@ function actions_do($action_ids, $object if (is_numeric($action_ids)) { $action = db_fetch_object(db_query("SELECT * FROM {actions} WHERE aid = '%s'", $action_ids)); $function = $action->callback; - $context = array_merge($context, unserialize($action->parameters)); - $result[$action_ids] = $function($object, $context, $a1, $a2); + if (drupal_function_exists($function)) { + $context = array_merge($context, unserialize($action->parameters)); + $result[$action_ids] = $function($object, $context, $a1, $a2); + } } // Singleton action; $action_ids is the function name. else { - $result[$action_ids] = $action_ids($object, $context, $a1, $a2); + if (drupal_function_exists($action_ids)) { + $result[$action_ids] = $action_ids($object, $context, $a1, $a2); + } } } return $result; @@ -236,7 +244,7 @@ function actions_function_lookup($hash) } // Must be an instance; must check database. - $aid = db_result(db_query("SELECT aid FROM {actions} WHERE MD5(aid) = '%s' AND parameters <> ''", $hash)); + $aid = db_result(db_query("SELECT aid FROM {actions} WHERE MD5(aid) = '%s'", $hash)); return $aid; }