You are here

function heartbeat_message_update in Heartbeat 6.4

Updates a heartbeat message

2 calls to heartbeat_message_update()
heartbeat_messages_edit_submit in ./heartbeat.admin.inc
Accept the form submission heartbeat messages to edit.
heartbeat_messages_import_submit in ./heartbeat.admin.inc
Import for heartbeat message templates().

File

./heartbeat.module, line 1423

Code

function heartbeat_message_update($record) {
  $record = _heartbeat_message_prepare($record);
  heartbeat_edit_tags($record->hid, $record->tags);
  $success = db_query("UPDATE {heartbeat_messages} SET message ='%s',\n    message_concat ='%s', attachments ='%s', variables ='%s',\n    description = '%s', concat_args = '%s', perms = %d, custom = %d\n    WHERE message_id = '%s' ", $record->message, $record->message_concat, $record->attachments, $record->variables, $record->description, $record->concat_args, $record->perms, $record->custom, $record->message_id);

  // Add an entry to the watchdog log.
  watchdog('heartbeat', 'Heartbeat: updated message template %id.', array(
    '%id' => $record->message_id,
  ), WATCHDOG_NOTICE);
  return $success;
}