function forena_query_load_include in Forena Reports 7.3
Load include block as source of builder.
_state
Parameters
$form:
1 string reference to 'forena_query_load_include'
File
- ./
forena_query.inc, line 258
Code
function forena_query_load_include($form, &$form_state) {
$form_state['rebuild'] = TRUE;
@(list($provider, $block) = @explode('/', $form_state['values']['block'], 2));
$block_def = @Frx::RepoMan()
->loadBlock($form_state['values']['block']);
if (!$block_def) {
$block_def = array(
'access' => '',
'type' => 'sql',
'file' => '',
'source' => '',
);
$form_state['storage']['step'] = 'sql';
}
else {
$form_state['storage']['step'] = 'builder';
}
$form_state['storage']['block'] = $block_def;
$form_state['storage']['block']['locked'] = FALSE;
$form_state['storage']['provider'] = $provider;
$form_state['storage']['builder']['block_name'] = $block;
$form_state['storage']['block_name'] = $form_state['values']['block'];
$form_state['storage']['new'] = TRUE;
$form_state['input']['file'] = $form_state['values']['file'] = @$form_state['storage']['block']['file'];
}