function spam_denied_page in Spam 5.3
Same name and namespace in other branches
- 6 spam.module \spam_denied_page()
Generate an error message informing the user that their posting has been blocked by the spam filter. Provide a dynamic link for reporting if their posting was blocked in error.
TODO: We don't need to use the maintenance_page, we could create our own using the current theme.
2 calls to spam_denied_page()
- duplicate_denied_ip in filters/
duplicate/ duplicate.module - duplicate_denied_post in filters/
duplicate/ duplicate.module
1 string reference to 'spam_denied_page'
- spam_menu in ./
spam.module - Drupal _menu() hook.
File
- ./
spam.module, line 1553
Code
function spam_denied_page($message = NULL, $title = NULL) {
drupal_set_header('HTTP/1.1 403 Forbidden');
if (!$message) {
$message = strtr(variable_get('spam_filtered_message', t('<p>Your posting on @site from %IP has been automatically flagged by our spam filters as being inappropriate for this website.</p>At @site we work very hard to keep our web pages free of spam. Unfortunately, sometimes we accidentally block legitimate content. If you are attempting to post legitimate content to this website, you can help us to improve our spam filters and ensure that your post appears on our website by clicking this link:</p><blockquote>%LINK</blockquote>', array(
'@site' => variable_get('site_name', 'Drupal'),
))), array(
'%IP' => $_SERVER['REMOTE_ADDR'],
'%LINK' => _spam_error_link($_SESSION['content']),
));
}
if (!$title) {
$title = t('Your posting was blocked by our spam filter.');
}
drupal_set_title($title);
print theme('maintenance_page', filter_xss_admin($message));
}