function antispam_content_is_spam in AntiSpam 7
Same name and namespace in other branches
- 6 antispam.module \antispam_content_is_spam()
Check if specified content is marked as spam.
Parameters
string $content_type: Content type; can be either 'node' or 'comment' .
integer $content_id: Content ID; can be either a nid or a cid.
Return value
boolean TRUE if content is marked as spam; FALSE otherwise.
4 calls to antispam_content_is_spam()
- antispam_callback_set_spam_status in ./
antispam.module - Menu callback; mark/unmark content as spam.
- antispam_comment_view in ./
antispam.module - Implements hook_comment_view().
- antispam_confirm_multiple_operation_submit in ./
antispam.admin.inc - confirm_form callback; perform the actual operation against selected content.
- antispam_node_view in ./
antispam.module - Implements hook_node_view().
File
- ./
antispam.module, line 1218 - Primary hook implementations for the Antispam module.
Code
function antispam_content_is_spam($content_type, $content_id) {
return db_query_range('SELECT 1 FROM {antispam_spam_marks} WHERE content_type=:content_type AND content_id=:content_id', 0, 1, array(
':content_type' => $content_type,
':content_id' => $content_id,
))
->fetchField();
}