function sms_receive_node_submit in SMS Framework 5
Based on mailhandler_node_submit() Create the node.
1 call to sms_receive_node_submit()
- sms_receive_receive in modules/
sms_receive/ sms_receive.module
File
- modules/
sms_receive/ sms_receive.module, line 312
Code
function sms_receive_node_submit($node) {
node_validate($node);
$error = form_get_errors();
if (!$error) {
// Prepare the node for save and allow modules make changes
$node = node_submit($node);
// Save the node
if ($node->nid) {
if (node_access('update', $node)) {
node_save($node);
}
}
else {
if (node_access('create', $node)) {
node_save($node);
}
}
}
}