function feeds_excel_update_6102 in Feeds Excel 6
Same name and namespace in other branches
- 7 feeds_excel.install \feeds_excel_update_6102()
Remind user to enable libraries and relocate the phpExcelReader library.
File
- ./
feeds_excel.install, line 96
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,
)),
);
}
if (!empty($return)) {
$return['#abort'] = array(
'success' => FALSE,
'query' => $t('<strong>Fix the errors above to succesfully update feeds_excel!</strong>'),
);
}
return $return;
}