function _oa_notifications_can_comment in Open Atrium Notifications 7.2
Helper function to return true if comment form is enabled for the node
Parameters
$node:
2 calls to _oa_notifications_can_comment()
- _oa_notifications_allow_edit in ./
oa_notifications.module - Helper function to determine if notifications can be added to page
- _oa_notification_show_skip in ./
oa_notifications.module - Helper to determine if the skip notification checkbox should be shown
File
- ./
oa_notifications.module, line 712
Code
function _oa_notifications_can_comment($node) {
$result = FALSE;
if (oa_notifications_is_notification_type($node)) {
$comment_type = variable_get('comment_' . $node->type, COMMENT_NODE_OPEN);
$result = user_access('post comments') && $comment_type == COMMENT_NODE_OPEN && isset($node->comment) && $node->comment == COMMENT_NODE_OPEN;
}
return $result;
}