You are here

function pdfpreview_admin_settings_validate in PDFPreview 6

Implements hook_form_FORM_ID_validate()

File

./pdfpreview.module, line 190
This module creates a formatter for CCK filefields that shows a snapshot of the first page of pdf files as link to the file.

Code

function pdfpreview_admin_settings_validate(&$form, &$form_state) {
  if (!_pdfpreview_prepare_filesystem(file_directory_path() . '/' . $form_state['values']['pdfpreview_pathtoimages'])) {
    form_set_error('pdfpreview_pathtoimages', t('Invalid path @path', array(
      '@path' => $form_state['values']['pdfpreview_pathtoimages'],
    )));
  }
}