You are here

function feeds_excel_update_6102 in Feeds Excel 7

Same name and namespace in other branches
  1. 6 feeds_excel.install \feeds_excel_update_6102()

Remind user to enable libraries and relocate the phpExcelReader library.

File

./feeds_excel.install, line 107

Code

function feeds_excel_update_6102() {
  $return = array();
  $t = get_t();
  if (!module_exists('libraries')) {
    $return[] = array(
      'success' => FALSE,
      'query' => $t('The libraries module has to be enabled.'),
    );
  }
  $path = !module_exists('libraries') ? 'sites/all/libraries/phpExcelReader' : libraries_get_path('phpExcelReader');
  if (!file_exists($path . '/Excel/reader.php')) {
    $return[] = array(
      'success' => FALSE,
      'query' => $t('The phpExcelReader library has to be located or relocated at %path.', array(
        '%path' => $path,
      )),
    );
  }
  return $return;
}