You are here

function message_realm_save in Message 6

Message realm save.

Parameters

$message_instance:

Return value

The message realm object.

2 calls to message_realm_save()
message_action_assign_message_instance_to_realm in includes/message.rules.inc
Action: Assign a message instance to realm.
message_save_message_to_realms in ./message.module
API function; Save a message instance and save it to realms.

File

./message.module, line 472
API functions to manipulate messages.

Code

function message_realm_save($message_realm) {
  if ($existing = message_realm_load($message_realm->rid)) {
    drupal_write_record('message_realm', $message_realm, 'rid');
  }
  else {
    drupal_write_record('message_realm', $message_realm);
  }
  return $message_realm;
}