function webform_protected_downloads_set_configuration in Webform Protected Downloads 6
Same name and namespace in other branches
- 7 webform_protected_downloads.module \webform_protected_downloads_set_configuration()
Set the configuration for the given node
Parameters
int $nid :
int $cid :
string $subject :
string $body :
string $text_access :
string $text_noaccess :
Return value
void
1 call to webform_protected_downloads_set_configuration()
- webform_protected_downloads_configuration_form_submit in ./
webform_protected_downloads.form.inc - Implementation of hook_submit().
File
- ./
webform_protected_downloads.module, line 580 - This file contains hook declarations and functions for the Webform Protected Downloads module.
Code
function webform_protected_downloads_set_configuration($nid, $args) {
$configuration = array(
'nid' => $nid,
'mail_field_cid' => $args['mail_field_cid'],
'mail_from' => $args['mail_from'],
'mail_subject' => $args['mail_subject'],
'mail_body' => $args['mail_body'],
'access_type' => $args['access_type'],
'expiration_download' => $args['expiration_download'],
'expiration_session' => $args['expiration_session'],
'retroactive' => $args['retroactive'],
'redirect' => $args['redirect'],
'text_download_access' => $args['text_download_access'],
'text_download_noaccess' => $args['text_download_noaccess'],
);
drupal_write_record('wpd_node_configuration', $configuration, webform_protected_downloads_get_configuration($nid) ? array(
'nid',
) : array());
}