| Versionen | |
|---|---|
| drupal6 – drupal7 | 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.
$hash MD5 hash of a function name
Function name
includes/
<?php
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;
}
?>
Kommentare
Kommentar hinzufügen