You are here

function heartbeat_event_id in Heartbeat 6.2

Fetches the id for corresponding action

Parameters

string $action:

2 calls to heartbeat_event_id()
friendlist_activity_rules_action in user_activity/modules/friendlist_activity/friendlist_activity.rules.inc
Action Implementation: Log an activity
user_activity_rules_default_action in user_activity/user_activity.rules.inc
Action Implementation: Log an activity

File

./heartbeat.module, line 418
To fully understand this, you have to be familiar with the rules module. Lots of documentation can be found on http://drupal.org/node/298480 for an introduction and tutorial, but http://drupal.org/node/298486 is a lot of handy info for developers.

Code

function heartbeat_event_id($action) {
  $result = db_query("SELECT hid from {heartbeat_messages} WHERE event = '%s' LIMIT 1", $action);
  $res = db_fetch_object($result);
  return $res->hid;
}