function recipe_import_multi_access in Recipe 6
Extend user_access to handle case where no import formats are available
1 string reference to 'recipe_import_multi_access'
- recipe_menu in ./
recipe.module - Implementation of hook_menu().
File
- ./
recipe.module, line 1712 - recipe.module - share recipes
Code
function recipe_import_multi_access($string, $account = NULL, $reset = FALSE) {
// short circuit if there are no parsers available.
$formats = module_invoke_all('recipeio', 'import_multi');
if (count($formats) == 0) {
return FALSE;
}
// we have a format so continue to user_access
return user_access($string, $account, $reset);
}