1.20.x system.admin.inc system_logging_settings_validate($form, &$form_state)

Validates the submitted logging form.

File

modules/system/system.admin.inc, line 1658
Admin page callbacks for the System module.

Code

function system_logging_settings_validate($form, &$form_state) {
  // Cleanup enabled severity levels. Form API sets the value of unselected
  // checkboxes to 0.
  $form_state['values']['watchdog_enabled_severity_levels'] = array_keys(array_filter($form_state['values']['watchdog_enabled_severity_levels'], function($v) {
    return $v !== 0;
  }));
}