function casetracker_mail_nodeapi in Case Tracker 5
Implementation of hook_nodeapi().
File
- ./
casetracker_mail.module, line 167 - Enables mail sending and Mailhandler integration for Case Tracker.
Code
function casetracker_mail_nodeapi(&$node, $op, $teaser = NULL, $page = NULL) {
switch ($op) {
case 'insert':
case 'update':
if (in_array($node->type, variable_get('casetracker_case_node_types', array(
'casetracker_basic_case',
)), TRUE)) {
casetracker_mail_send($node);
}
break;
case 'delete':
if (in_array($node->type, variable_get('casetracker_case_node_types', array(
'casetracker_basic_case',
)), TRUE)) {
db_query('DELETE FROM {casetracker_mail} WHERE nid = %d', $node->nid);
}
break;
}
}