You are here

function spam_mark_as_not_spam_callback in Spam 6

Menu callback that is used for the not spam mark links.

This is a wrapper with CSFR protection for spam_mark_as_not_spam

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

File

./spam.module, line 1761
Spam module, v3 Copyright(c) 2006-2008 Jeremy Andrews <jeremy@tag1consulting.com>. All rights reserved.

Code

function spam_mark_as_not_spam_callback($type, $id, $extra = array()) {
  if (drupal_valid_token($_GET['token'], "not spam {$type} {$id}")) {
    spam_mark_as_not_spam($type, $id, $extra);
  }
  else {
    return drupal_access_denied();
  }
}