You are here

function devel_admin_settings_validate in Devel 6

Validate callback for the settings form.

File

./devel.module, line 1205

Code

function devel_admin_settings_validate(&$form, &$form_state) {
  if ($form_state['values']['devel_xhprof_enabled']) {
    $path = $form_state['values']['devel_xhprof_directory'];
    $path = empty($path) ? '' : $path . '/xhprof_lib/utils';
    if (!is_dir($path)) {
      form_set_error('devel_xhprof_directory', t('XHProf directory %path not found.', array(
        '%path' => $path,
      )));
    }
  }
}