function spam_delete_node in Spam 5
Delete the node
1 string reference to 'spam_delete_node'
- spam_node_operations_list in ./
spam.module - Return the function to call dependant on the $action requested.
File
- ./
spam.module, line 3096
Code
function spam_delete_node($nid) {
global $user;
$save_user = $user;
if ($nid == 0) {
return;
}
$node = node_load($nid);
if ($node && $node->nid != 0) {
$node->confirm = 1;
$user = user_load(array(
'uid' => 1,
));
node_delete($nid);
$user = $save_user;
watchdog('spam', t('Spam: deleted @type "%subject".', array(
'@type' => node_get_types('name', $node),
'%subject' => $node->title,
)));
spam_log(SPAM_LOG, t('spam_delete_node: deleted node "%title".', array(
'%title' => $node->title,
)), 'node', $node->nid);
}
}