function spam_log in Spam 5
Same name and namespace in other branches
- 5.3 spam.module \spam_log()
- 6 spam.module \spam_log()
26 calls to spam_log()
- spam_bayesian_filter in ./
spam.module - Simple Bayesian logic to determine the probability that the passed in array of tokens is spam.
- spam_comment in ./
spam.module - Drupal _comment hook. Passes new comments to the spam filter.
- spam_content_filter in ./
spam.module - Determine whether or not provided text is spam.
- spam_cron in ./
spam.module - Drupal _cron hook. Provides ability to automatically expired spam content.
- spam_custom_filter in ./
spam.module
1 string reference to 'spam_log'
File
- ./
spam.module, line 168
Code
function spam_log($level, $message, $source = NULL, $id = NULL) {
// ID is set in spam_content_filter() and spam_page()
global $ID, $SOURCE, $user;
if ($id == NULL) {
$id = $ID;
}
if ($source == NULL) {
$source = $SOURCE;
}
if (variable_get('spam_log_level', SPAM_LOG) >= $level) {
db_query("INSERT INTO {spam_log} (hostname, source, id, uid, entry, timestamp) VALUES('%s', '%s', %d, %d, '%s', %d)", $_SERVER['REMOTE_ADDR'], $source, $id, $user->uid, $message, time());
}
}