You are here

function heartbeat_load_message in Heartbeat 6.3

Fetches the translatable message for corresponding action

Parameters

string $hid:

5 calls to heartbeat_load_message()
heartbeat_api_log in ./heartbeat.module
API function to log a message from custom code
heartbeat_rules_default_action in ./heartbeat.rules.inc
Action Implementation: Log an activity Default action for most common heartbeat message activities
heartbeat_rules_default_action_form in ./heartbeat.rules.inc
Action drupal message configuration form.
heartbeat_rules_users_action in ./heartbeat.rules.inc
Action Implementation: Log an activity between two users
heartbeat_rules_users_action_form in ./heartbeat.rules.inc
User action drupal message configuration form.

File

./heartbeat.module, line 816

Code

function heartbeat_load_message($hid) {
  if (!is_numeric($hid)) {
    $where = " message_id = '%s' ";
    $hid = (string) $hid;
  }
  else {
    $where = " hid = %d ";
  }
  $result = db_query("SELECT * from {heartbeat_messages} WHERE " . $where . " LIMIT 1", $hid);
  $message = db_fetch_object($result);
  return $message;
}