actions_function_lookup

Definition

actions_function_lookup($hash)
drupal/includes/actions.inc, line 229

Description

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

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.
  return db_query("SELECT aid FROM {actions} WHERE MD5(aid) = :hash AND parameters <> ''", array(':hash' => $hash))->fetchField();
}