You are here

function spam_mark_load in Spam 6

Spam Mark wildcard loader function.

File

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

Code

function spam_mark_load($type, $id, $action) {
  if (is_numeric($id) && ($action == 'spam' || $action == 'not_spam')) {

    // We load these files here in case the menu function is called before _init. See https://drupal.org/node/1194730
    if (spam_invoke_module($type, 'content_module') == $type) {
      if ($action == 'spam') {
        _spam_update_statistics(t('@type manually marked as spam', array(
          '@type' => $type,
        )));
      }
      else {
        _spam_update_statistics(t('@type manually marked as not spam', array(
          '@type' => $type,
        )));
      }
      return $type;
    }
  }
  return FALSE;
}