function _video_s3_fsadmin_validate_secret in Video 6.5
Same name and namespace in other branches
- 6.4 plugins/video_s3/filesystem/video_s3.inc \_video_s3_fsadmin_validate_secret()
Replace the empty form value with the variable value.
Used for the access secret.
Parameters
$element: Element to validate
$form_state: Form state
1 string reference to '_video_s3_fsadmin_validate_secret'
- video_s3::admin_settings in plugins/
video_s3/ filesystem/ video_s3.inc
File
- plugins/
video_s3/ filesystem/ video_s3.inc, line 376 - Class file used to store videos in Amazon S3.
Code
function _video_s3_fsadmin_validate_secret($element, &$form_state) {
$key = end($element['#parents']);
$val = $form_state['values'][$key];
$existing = variable_get($key, NULL);
if ($val === '' && $existing !== NULL) {
$form_state['values'][$key] = $existing;
}
}