You are here

function spam_mark_as_spam_callback in Spam 6

Menu callback that is used for the spam mark links.

This is a wrapper with CSFR protection for spam_mark_as_spam

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

File

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

Code

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