You are here

function pdfthumb_settings_validate in PDFThumb 7

Implements form validate.

File

./pdfthumb.module, line 137
Give a way to create pdf thumbnails.

Code

function pdfthumb_settings_validate($form, &$form_state) {
  $open_basedir = ini_get("open_basedir");
  if (!empty($open_basedir)) {
    drupal_set_message(t("open_base_dir restriction in effect. Can not check convert path."), "warning");
  }
  else {
    if (!file_exists($form_state['values']['pdfthumb_convertpath'])) {
      form_set_error('pdfthumb_convertpath', t('I can not find convert. Check the path and try again.'));
    }
  }
}