You are here

function _video_s3_fsadmin_validate_secret in Video 6.4

Same name and namespace in other branches
  1. 6.5 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

array $element:

array $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 292

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;
  }
}