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