You are here

function forena_query_update_sql in Forena Reports 7.3

Submit handler to update the form fields.

1 call to forena_query_update_sql()
forena_query_update in ./forena_query.inc
Function to allow all normal button submits to be for the form.

File

./forena_query.inc, line 286

Code

function forena_query_update_sql($form, &$form_state) {
  $file = $form_state['values']['file'];
  $provider = $form_state['storage']['provider'];
  $block_def = $form_state['storage']['block'];
  $block_def['access'] = $form_state['values']['access'];
  if ($block_def['file'] != $file) {
    $block_def['builder'] = '';
    $new_block = Frx::RepoMan()
      ->sqlBlock($provider, $file);
    if ($new_block) {
      $block_def = array_merge($block_def, $new_block);
    }
  }
  $form_state['storage']['block'] = $block_def;
}