function forena_delete_form_submit in Forena Reports 7.2
Same name and namespace in other branches
- 6.2 forena.admin.inc \forena_delete_form_submit()
- 6 forena.admin.inc \forena_delete_form_submit()
- 7 forena.admin.inc \forena_delete_form_submit()
- 7.3 forena.admin.inc \forena_delete_form_submit()
File
- ./
forena.admin.inc, line 2218
Code
function forena_delete_form_submit($form, &$form_state) {
$values = $form_state['values'];
$report_name = $values['report_name'];
if (isset($values['delete_all_languages']) && $values['delete_all_languages'] == 'all') {
foreach (language_list() as $language) {
$report_name = $language->language . '.' . $values['base_name'];
$desc = forena_report_desc($report_name);
forena_delete_report($desc['name']);
}
drupal_set_message(t('Deleted %s', array(
'%s' => $values['base_name'],
)));
}
else {
drupal_set_message(t('Deleted %s', array(
'%s' => $report_name,
)));
forena_delete_report($report_name);
}
$form_state['redirect'] = 'forena';
}