You are here

function spam_denied_in_error_page in Spam 5.3

Same name and namespace in other branches
  1. 6 spam.module \spam_denied_in_error_page()

Allow the user to report when their content was inapropriately marked as spam. This for is a likely candidate for a captcha.

1 string reference to 'spam_denied_in_error_page'
spam_menu in ./spam.module
Drupal _menu() hook.

File

./spam.module, line 1569

Code

function spam_denied_in_error_page() {
  if ($_SESSION['content']) {
    $content = unserialize($_SESSION['content']);
    if (is_array($content)) {
      $hash = md5($_SESSION['content']);
      $exists = db_result(db_query("SELECT bid FROM {spam_filters_errors} WHERE content_hash = '%s'", $hash));
      if ($exists) {
        $output = t('You have already reported this content as spam.  Please be patient, a site administrator will review it soon.');
      }
      else {
        return drupal_get_form('spam_error_page');
      }
    }
  }
  return $output;
}