You are here

function webform_email_update in Webform 7.4

Same name and namespace in other branches
  1. 6.3 includes/webform.emails.inc \webform_email_update()
  2. 7.3 includes/webform.emails.inc \webform_email_update()

Update an existing e-mail setting with new values.

Parameters

$email: An array of settings for sending an e-mail containing a nid, eid, and all other fields from the e-mail form.

Return value

false|int On success SAVED_NEW or SAVED_UPDATED, depending on the operation performed, FALSE on failure.

2 calls to webform_email_update()
webform_email_edit_form_submit in includes/webform.emails.inc
Submit handler for webform_email_edit_form().
webform_node_update in ./webform.module
Implements hook_node_update().

File

includes/webform.emails.inc, line 746
Provides interface and database handling for e-mail settings of a webform.

Code

function webform_email_update($email) {
  $email['excluded_components'] = implode(',', $email['excluded_components']);
  $email['extra'] = empty($email['extra']) ? '' : serialize($email['extra']);
  return drupal_write_record('webform_emails', $email, array(
    'nid',
    'eid',
  ));
}