You are here

function _heartbeat_activity_delete in Heartbeat 6.4

Deletes a heartbeat activity messages.

Parameters

$uaid Integer User activity ID:

6 calls to _heartbeat_activity_delete()
heartbeat_activity_delete_action in views/heartbeat_views.module
Views bulk operations callback to delete multiple activity.
heartbeat_cron in ./heartbeat.module
Implementation of hook_cron(). Delete too old message if this option is set and logs where the node does not exist anymore.
heartbeat_delete_log_confirm_submit in ./heartbeat.pages.inc
Handler for wipe confirmation.
heartbeat_messages_admin_overview_submit in ./heartbeat.admin.inc
Process heartbeat_messages_admin_overview form submissions.
heartbeat_messages_multiple_delete_confirm_submit in ./heartbeat.admin.inc
Process comment_multiple_delete_confirm form submissions.

... See full list

File

./heartbeat.module, line 1446

Code

function _heartbeat_activity_delete($uaid) {
  foreach (heartbeat_get_uaids($uaid) as $uaid) {
    $activity = heartbeat_load_message_instance($uaid);

    // perform the update action, then refresh node statistics
    db_query("DELETE FROM {heartbeat_activity} WHERE uaid = %d", $uaid);

    // Allow modules to respond to the updating of a heartbeat activity message.
    module_invoke_all('heartbeat_activity_delete', $activity);

    // Add an entry to the watchdog log.
    watchdog('heartbeat', 'Heartbeat: deleted message %uaid.', array(
      '%uaid' => $activity->uaid,
    ), WATCHDOG_NOTICE);
  }
}