function actions_function_lookup

7.x actions.inc actions_function_lookup($hash)
6.x actions.inc actions_function_lookup($hash)

Given an md5 hash of a function name, return the function name.

Faster than actions_actions_map() when you only need the function name.

Parameters

$hash: MD5 hash of a function name

Return value

Function name

6 calls to actions_function_lookup()
system_actions_configure_submit in drupal-6.x/modules/system/system.module
Process system_actions_configure form submissions.
system_actions_configure_validate in drupal-6.x/modules/system/system.module
Validate system_actions_configure form submissions.
trigger_assign_form_submit in drupal-6.x/modules/trigger/trigger.admin.inc
Submit function for trigger_assign_form().
trigger_assign_form_validate in drupal-6.x/modules/trigger/trigger.admin.inc
Validation function for trigger_assign_form().
trigger_unassign in drupal-6.x/modules/trigger/trigger.admin.inc
Confirm removal of an assigned action.

... See full list

File

drupal-6.x/includes/actions.inc, line 268
This is the actions engine for executing stored actions.

Code

function actions_function_lookup($hash) {
  $actions_list = actions_list();
  foreach ($actions_list as $function => $array) {
    if (md5($function) == $hash) {
      return $function;
    }
  }

  // Must be an instance; must check database.
  $aid = db_result(db_query("SELECT aid FROM {actions} WHERE MD5(aid) = '%s' AND parameters <> ''", $hash));
  return $aid;
}