You are here

function _sheetnode_phpexcel_settings_validate in Sheetnode 5

Same name and namespace in other branches
  1. 6 modules/sheetnode_phpexcel/sheetnode_phpexcel.module \_sheetnode_phpexcel_settings_validate()
  2. 7.2 modules/sheetnode_phpexcel/sheetnode_phpexcel.module \_sheetnode_phpexcel_settings_validate()
  3. 7 modules/sheetnode_phpexcel/sheetnode_phpexcel.module \_sheetnode_phpexcel_settings_validate()

File

modules/sheetnode_phpexcel/sheetnode_phpexcel.module, line 140

Code

function _sheetnode_phpexcel_settings_validate($form, $form_values) {
  $path = rtrim($form_values['sheetnode_phpexcel_library_path'], '/');
  if (!is_dir($path) || !is_file($path . '/Classes/PHPExcel.php')) {
    form_set_error('sheetnode_phpexcel_library_path', t('The path you entered does not point to a valid location. Please enter the location of the extracted PHPExcel package.'));
    return;
  }
}