function webform_encrypt_webform_component_presave in Webform Encrypt 7
Same name and namespace in other branches
- 6 webform_encrypt.module \webform_encrypt_webform_component_presave()
Implementation of hook_webform_component_presave(). Save encryption settings for a component.
File
- ./
webform_encrypt.module, line 69 - Main module file for the Webform Encrypt module.
Code
function webform_encrypt_webform_component_presave(&$component) {
if (!empty($component['encryption'])) {
$component['extra'] = array_merge($component['extra'], $component['encryption']);
unset($component['encryption']);
if ($component['extra']['encrypt']) {
webform_encrypt_encrypt_component_data($component['nid'], $component['cid'], $component['extra']);
}
else {
webform_encrypt_decrypt_component_data($component['nid'], $component['cid'], $component['extra']);
}
}
}