You are here

function forena_query_save_block in Forena Reports 7.3

Same name and namespace in other branches
  1. 8 forena_query/forena_query.inc \forena_query_save_block()
  2. 7.5 forena_query.inc \forena_query_save_block()
  3. 7.4 forena_query.inc \forena_query_save_block()
1 string reference to 'forena_query_save_block'
forena_query_builder_form in ./forena_query.inc

File

./forena_query.inc, line 369

Code

function forena_query_save_block($form, &$form_state) {
  $form_state['rebuild'] = FALSE;
  $block_name = $form_state['storage']['block_name'];
  if (isset($form_state['values']['save_as_name'])) {
    $block_name = $form_state['storage']['provider'] . '/' . trim($form_state['values']['save_as_name']);
  }
  $data = $form_state['storage']['block'];
  Frx::RepoMan()
    ->saveBlock($block_name, $data);
  drupal_set_message($block_name . ' saved');
}