function node_spam_scan in Spam 6
Scan node content before it is posted into the database.
1 string reference to 'node_spam_scan'
- node_spamapi_form_alter in content/
spam_content_node.inc - Form alter gets its own function so we can reference &$form without causing errors in PHP4 installations. (If we use spamapi, we have to set a default, which PHP4 doesn't support.)
File
- content/
spam_content_node.inc, line 236 - Include file for integration with the node system.
Code
function node_spam_scan($form, &$form_state) {
if ($form_state['clicked_button']['#value'] == t('Save')) {
$node = $form['#post'];
$node['type'] = $form['type']['#value'];
$_SESSION['spam_form'] = $form;
spam_scan($node, 'node');
}
// spam_form is used if we catch spam in spam_scan, we can now free it
if (isset($_SESSION['spam_form'])) {
unset($_SESSION['spam_form']);
}
}