function addanother_access

cis7 addanother.module addanother_access($node)
cle7 addanother.module addanother_access($node)
elmsmedia7 addanother.module addanother_access($node)
icor7 addanother.module addanother_access($node)
meedjum_blog7 addanother.module addanother_access($node)
mooc7 addanother.module addanother_access($node)

Check if we should display the Add another verbage on a node.

1 string reference to 'addanother_access'
addanother_menu in sites/all/modules/ulmus/addanother/addanother.module
Implement hook_menu().

File

sites/all/modules/ulmus/addanother/addanother.module, line 73
Presents users with an option to create another node of the same type after a node is added.

Code

function addanother_access($node) {
  if (!node_access('create', $node->type)) {
    return FALSE;
  }
  if (arg(2) == "edit" && !variable_get('addanother_tab_edit_' . $node->type, FALSE)) {
    return FALSE;
  }

  if ($node && variable_get('addanother_tab_' . $node->type, FALSE) && user_access('use add another')) {
    return TRUE;
  }

  return FALSE;
}
Error | ELMSLN API

Error

×

Error message

  • Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/elmsln_community/api.elmsln.org/includes/common.inc:2791) in drupal_send_headers() (line 1499 of /var/www/html/elmsln_community/api.elmsln.org/includes/bootstrap.inc).
  • Error: Call to undefined function apc_delete() in DrupalAPCCache->clear() (line 289 of /var/www/html/elmsln_community/api.elmsln.org/sites/all/modules/apc/drupal_apc_cache.inc).
The website encountered an unexpected error. Please try again later.